{
  "openapi": "3.0.1",
  "info": {
    "title": "Grants.gov Scraper: US Federal Grant Opportunities API",
    "description": "Search Grants.gov for US federal grant opportunities and funding announcements. Filter by keyword, agency, funding category, eligibility (nonprofits, small businesses, universities, tribes), status or closing date, with deadlines and award amounts. JSON, CSV or Excel. No API key.",
    "version": "0.1",
    "x-build-id": "DK8CkwE2QcdNaf91b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexus-scrapers~grants-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexus-scrapers-grants-gov-opportunities",
        "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/nexus-scrapers~grants-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-nexus-scrapers-grants-gov-opportunities",
        "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/nexus-scrapers~grants-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-nexus-scrapers-grants-gov-opportunities",
        "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": {
          "statuses": {
            "title": "Opportunity status",
            "type": "array",
            "description": "Which opportunities to return. 'Posted' = open for applications (default). 'Forecasted' = announced in advance, not yet open. 'Closed' and 'Archived' are past opportunities.",
            "items": {
              "type": "string",
              "enum": [
                "forecasted",
                "posted",
                "closed",
                "archived"
              ],
              "enumTitles": [
                "Forecasted (planned, not yet open for applications)",
                "Posted (open for applications)",
                "Closed (deadline passed, still listed)",
                "Archived (older opportunities)"
              ]
            },
            "default": [
              "posted"
            ]
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search words, matched by Grants.gov itself (title, description, opportunity number). Several words narrow the search. Leave empty to search everything."
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Agency codes as used by Grants.gov. A bare department code such as 'HHS', 'DOD', 'USDA' or 'ED' includes its sub-agencies; a full code such as 'HHS-NIH11' (NIH), 'NSF' or 'DOT-NHTSA' selects exactly one.",
            "items": {
              "type": "string"
            }
          },
          "fundingCategories": {
            "title": "Funding categories",
            "type": "array",
            "description": "Grants.gov funding activity categories (any of the selected).",
            "items": {
              "type": "string",
              "enum": [
                "AG",
                "AR",
                "BC",
                "CD",
                "CP",
                "DPR",
                "ED",
                "ELT",
                "EN",
                "ENV",
                "FN",
                "HL",
                "HO",
                "HU",
                "ISS",
                "IS",
                "IIJ",
                "LJL",
                "NR",
                "OZ",
                "O",
                "RT",
                "RD",
                "ST",
                "T"
              ],
              "enumTitles": [
                "Agriculture",
                "Arts",
                "Business and Commerce",
                "Community Development",
                "Consumer Protection",
                "Disaster Prevention and Relief",
                "Education",
                "Employment, Labor and Training",
                "Energy",
                "Environment",
                "Food and Nutrition",
                "Health",
                "Housing",
                "Humanities",
                "Income Security and Social Services",
                "Information and Statistics",
                "Infrastructure Investment and Jobs Act (IIJA)",
                "Law, Justice and Legal Services",
                "Natural Resources",
                "Opportunity Zone Benefits",
                "Other",
                "Recreation and Tourism",
                "Regional Development",
                "Science and Technology and other Research and Development",
                "Transportation"
              ]
            }
          },
          "eligibilities": {
            "title": "Eligible applicants",
            "type": "array",
            "description": "Only opportunities open to these kinds of applicants (for example Small businesses, Individuals, State governments).",
            "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 and State controlled institutions of higher education",
                "Native American tribal governments (Federally recognized)",
                "Public housing authorities/Indian housing authorities",
                "Native American tribal organizations (other than Federally recognized tribal governments)",
                "Nonprofits having a 501(c)(3) status with the IRS, other than institutions of higher education",
                "Nonprofits that do not have a 501(c)(3) status with the IRS, other than institutions of higher education",
                "Private institutions of higher education",
                "Individuals",
                "For profit organizations other than small businesses",
                "Small businesses",
                "Others (see the additional eligibility text of the opportunity)",
                "Unrestricted (open to any type of entity)"
              ]
            }
          },
          "fundingInstruments": {
            "title": "Funding instruments",
            "type": "array",
            "description": "Grant, Cooperative Agreement, Procurement Contract or Other (any of the selected).",
            "items": {
              "type": "string",
              "enum": [
                "G",
                "CA",
                "PC",
                "O"
              ],
              "enumTitles": [
                "Grant",
                "Cooperative Agreement",
                "Procurement Contract",
                "Other"
              ]
            }
          },
          "alnNumber": {
            "title": "Assistance Listing (ALN / CFDA) number",
            "type": "string",
            "description": "One Assistance Listing number (formerly CFDA), for example '93.543', or a prefix such as '93' or '93.5*'."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "newest",
              "closing-soon"
            ],
            "type": "string",
            "description": "Newest first (default) or soonest deadline first.",
            "default": "newest"
          },
          "daysBack": {
            "title": "Posted in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only opportunities posted in the last N days (server-side filter). Ignored if 'Posted from' or 'Posted to' is set. 0 = no date limit.",
            "default": 0
          },
          "dateFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Earliest posting date, format YYYY-MM-DD. Overrides 'last N days'."
          },
          "dateTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Latest posting date (inclusive), format YYYY-MM-DD."
          },
          "closingWithinDays": {
            "title": "Closing within N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only opportunities whose application deadline falls between today and N days from now; results are then sorted by deadline. Opportunities without a deadline are excluded. 0 = off."
          },
          "minValue": {
            "title": "Minimum funding (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum estimated value in USD (total program funding, or the award ceiling when the total is not stated). Amounts are only in the detail records, so this turns on 'Include full details' and reads up to 500 opportunities; opportunities without a stated amount are excluded."
          },
          "maxValue": {
            "title": "Maximum funding (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Maximum estimated value in USD, same rules as the minimum."
          },
          "includeDetails": {
            "title": "Include full details",
            "type": "boolean",
            "description": "Fetch each opportunity's full record (one extra request each, about 0.2 s per result): description, award ceiling/floor, total funding, expected number of awards, eligibility text, attachments. Switch off for a faster list of titles, agencies and dates only.",
            "default": true
          },
          "includeContact": {
            "title": "Include agency contact",
            "type": "boolean",
            "description": "Add the contact name, e-mail and phone that the agency publishes in the notice (grantsContact). Off by default: it can contain a named person. Turns on 'Include full details'.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of opportunities to return. You are charged per result, so keep this low while testing.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}