{
  "openapi": "3.0.1",
  "info": {
    "title": "Grants.gov Opportunity Search: Federal Grants API",
    "description": "Search open and forecasted US federal grants on Grants.gov (official API) by keyword, agency, eligibility (e.g. small businesses, nonprofits), category or ALN. Get deadlines, award ceiling/floor, total funding, eligibility and descriptions. Misses are free status rows.",
    "version": "0.1",
    "x-build-id": "vhtEvCRcaEVc66gCC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/swillz~grants-gov-opportunity-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-swillz-grants-gov-opportunity-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/swillz~grants-gov-opportunity-search/runs": {
      "post": {
        "operationId": "runs-sync-swillz-grants-gov-opportunity-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/swillz~grants-gov-opportunity-search/run-sync": {
      "post": {
        "operationId": "run-sync-swillz-grants-gov-opportunity-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Each keyword is a separate Grants.gov full-text search (title, description, agency), e.g. [\"artificial intelligence\",\"rural broadband\"]. Leave empty to search by filters only. Results are de-duplicated across keywords.",
            "items": {
              "type": "string"
            }
          },
          "opportunityNumbers": {
            "title": "Opportunity numbers",
            "type": "array",
            "description": "Exact funding opportunity numbers to look up, e.g. [\"DE-FOA-0003631\",\"RFA-AI-27-005\"]. Misses come back as free not_found rows.",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Opportunity statuses",
            "type": "array",
            "description": "Which opportunities to include. Default posted (open for applications) and forecasted (expected soon). Add closed or archived for past calls.",
            "items": {
              "type": "string",
              "enum": [
                "posted",
                "forecasted",
                "closed",
                "archived"
              ],
              "enumTitles": [
                "Posted (open)",
                "Forecasted",
                "Closed",
                "Archived"
              ]
            },
            "default": [
              "posted",
              "forecasted"
            ]
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Grants.gov agency codes, e.g. [\"NSF\",\"HHS-NIH11\",\"DOE\",\"USDA-NIFA\"]. A top-level code (\"HHS\", \"DOE\", \"USDA\") includes all its sub-agencies. Leave empty for all agencies.",
            "items": {
              "type": "string"
            }
          },
          "eligibilities": {
            "title": "Eligible applicant types",
            "type": "array",
            "description": "Only opportunities open to these applicant types (codes or labels), e.g. [\"23\"] or [\"Small businesses\"]. Note: many calls are \"Unrestricted\" (99); add it to include them. Leave empty for any.",
            "items": {
              "type": "string",
              "enum": [
                "00",
                "01",
                "02",
                "04",
                "05",
                "06",
                "07",
                "08",
                "11",
                "12",
                "13",
                "20",
                "21",
                "22",
                "23",
                "25",
                "99"
              ],
              "enumTitles": [
                "State governments",
                "County governments",
                "City or township governments",
                "Special district governments",
                "Independent school districts",
                "Public/State institutions of higher education",
                "Native American tribal governments (federally recognized)",
                "Public housing / Indian housing authorities",
                "Native American tribal organizations (other)",
                "Nonprofits with 501(c)(3), other than higher education",
                "Nonprofits without 501(c)(3), other than higher education",
                "Private institutions of higher education",
                "Individuals",
                "For-profit organizations other than small businesses",
                "Small businesses",
                "Others (see eligibility text)",
                "Unrestricted"
              ]
            }
          },
          "fundingCategories": {
            "title": "Funding categories",
            "type": "array",
            "description": "Only these funding activity categories, e.g. [\"ST\",\"HL\"] (Science/R&D, Health). Leave empty for any.",
            "items": {
              "type": "string",
              "enum": [
                "ACA",
                "AG",
                "AR",
                "BC",
                "CD",
                "CP",
                "DPR",
                "ED",
                "ELT",
                "EN",
                "EIC",
                "ENV",
                "FN",
                "HL",
                "HO",
                "HU",
                "ISS",
                "IS",
                "IIJ",
                "LJL",
                "NR",
                "OZ",
                "O",
                "RA",
                "RT",
                "RD",
                "ST",
                "T"
              ],
              "enumTitles": [
                "Affordable Care Act",
                "Agriculture",
                "Arts",
                "Business and Commerce",
                "Community Development",
                "Consumer Protection",
                "Disaster Prevention and Relief",
                "Education",
                "Employment, Labor and Training",
                "Energy",
                "Energy Infrastructure and Critical Minerals",
                "Environment",
                "Food and Nutrition",
                "Health",
                "Housing",
                "Humanities",
                "Income Security and Social Services",
                "Information and Statistics",
                "Infrastructure Investment and Jobs Act",
                "Law, Justice and Legal Services",
                "Natural Resources",
                "Opportunity Zone Benefits",
                "Other",
                "Recovery Act",
                "Recreation and Tourism",
                "Regional Development",
                "Science, Technology and R&D",
                "Transportation"
              ]
            }
          },
          "fundingInstruments": {
            "title": "Funding instruments",
            "type": "array",
            "description": "Grant, Cooperative Agreement, Procurement Contract or Other. Leave empty for any.",
            "items": {
              "type": "string",
              "enum": [
                "G",
                "CA",
                "PC",
                "O"
              ],
              "enumTitles": [
                "Grant",
                "Cooperative Agreement",
                "Procurement Contract",
                "Other"
              ]
            }
          },
          "assistanceListings": {
            "title": "Assistance listings (ALN/CFDA)",
            "type": "array",
            "description": "Assistance Listing numbers, e.g. [\"47.075\",\"93.866\"]. Leave empty for any.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only opportunities posted in the last N days, e.g. 1 for a daily alert or 7 for a weekly digest. 0 = any date.",
            "default": 0
          },
          "closingWithinDays": {
            "title": "Closing within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only opportunities whose application deadline is today or within the next N days, e.g. 30. Opportunities without a deadline are excluded when set. 0 = any.",
            "default": 0
          },
          "minAwardCeiling": {
            "title": "Minimum award ceiling (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only opportunities whose maximum award per recipient is at least this amount, e.g. 500000. Opportunities that publish no ceiling are excluded when set. 0 = any.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "closingSoonest",
              "newest",
              "relevance"
            ],
            "type": "string",
            "description": "closingSoonest (nearest deadline first, default), newest (most recently posted first) or relevance (Grants.gov keyword relevance).",
            "default": "closingSoonest"
          },
          "maxResults": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum opportunities returned per keyword or filter search (1-5000). Default 100.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include award amounts, eligibility and description",
            "type": "boolean",
            "description": "Fetch each opportunity's full record: award floor/ceiling, total funding, expected awards, eligible applicants, eligibility text, cost sharing and description. Turn off for faster title/deadline-only lists (same price).",
            "default": true
          },
          "includeDescription": {
            "title": "Include description text",
            "type": "boolean",
            "description": "Add the plain-text synopsis (descriptionText). Turn off for smaller rows.",
            "default": true
          },
          "maxDescriptionChars": {
            "title": "Max description length",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Truncate descriptionText to this many characters (200-20000). Default 4000.",
            "default": 4000
          },
          "dedupe": {
            "title": "De-duplicate across searches",
            "type": "boolean",
            "description": "Return each opportunity once even if several keywords match it (charged once). Default on.",
            "default": true
          },
          "includeStatusRows": {
            "title": "Add status rows for misses (free)",
            "type": "boolean",
            "description": "Add one free row (status no_results, not_found, invalid_input, service_unavailable or skipped_charge_limit, with a reason) for each search that returned nothing. Not charged. Turn off for opportunities only.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}