{
  "openapi": "3.0.1",
  "info": {
    "title": "Grants.gov Federal Grant Opportunities Scraper",
    "description": "Extract US federal grant opportunities from Grants.gov via its official public API: title, agency, ALN/CFDA, open and close dates, status, and optionally synopsis, award ceiling/floor, eligibility and attachments. Pay per result.",
    "version": "0.1",
    "x-build-id": "dHeBqPNHVOTSC0377"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hridayrungta~grants-gov-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hridayrungta-grants-gov-scraper",
        "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/hridayrungta~grants-gov-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hridayrungta-grants-gov-scraper",
        "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/hridayrungta~grants-gov-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hridayrungta-grants-gov-scraper",
        "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": {
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Full-text search over opportunity titles and descriptions, e.g. `wildfire` or `rural broadband`. Grants.gov OR-matches multiple words and ignores quotes, so one specific term usually works best. Leave empty to list everything that matches the other filters."
          },
          "oppStatuses": {
            "title": "Opportunity statuses",
            "type": "array",
            "description": "Which opportunities to include. `posted` = open for applications, `forecasted` = announced but not yet open, `closed` = deadline passed, `archived` = historical.",
            "items": {
              "type": "string",
              "enum": [
                "posted",
                "forecasted",
                "closed",
                "archived"
              ],
              "enumTitles": [
                "Posted (open now)",
                "Forecasted (coming soon)",
                "Closed",
                "Archived"
              ]
            },
            "default": [
              "posted",
              "forecasted"
            ]
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Agency codes, one per line. Empty = all agencies. Department codes are expanded automatically to cover their sub-agencies, so `HHS` also returns NIH, CDC and the rest. Examples: `HHS`, `USDA`, `DOD`, `NSF`, `DOE`, `ED`, `EPA`, `DOI`. A specific sub-agency works too, e.g. `HHS-NIH11`, `USDA-NIFA`, `DOC-NIST`. Unknown codes return zero results rather than an error.",
            "items": {
              "type": "string"
            }
          },
          "fundingCategories": {
            "title": "Funding categories",
            "type": "array",
            "description": "Category of funding activity codes, one per line: AG Agriculture, AR Arts, BC Business and Commerce, CD Community Development, CP Consumer Protection, DPR Disaster Prevention and Relief, ED Education, ELT Employment/Labor/Training, EN Energy, ENV Environment, FN Food and Nutrition, HL Health, HO Housing, HU Humanities, IIJ Infrastructure Investment and Jobs Act, IS Information and Statistics, ISS Income Security and Social Services, LJL Law/Justice/Legal Services, NR Natural Resources, O Other, RD Regional Development, ST Science and Technology, T Transportation.",
            "items": {
              "type": "string"
            }
          },
          "eligibilities": {
            "title": "Eligible applicant types",
            "type": "array",
            "description": "Applicant eligibility codes, one per line: 00 State governments, 01 County governments, 02 City or township governments, 04 Special district governments, 05 Independent school districts, 06 Public/State institutions of higher education, 07 Federally recognized tribal governments, 08 Public/Indian housing authorities, 11 Other tribal organizations, 12 501(c)(3) nonprofits, 13 Other nonprofits, 20 Private institutions of higher education, 21 Individuals, 22 For-profit organizations, 23 Small businesses, 25 Others, 99 Unrestricted.",
            "items": {
              "type": "string"
            }
          },
          "aln": {
            "title": "Assistance Listing Number (ALN / CFDA)",
            "type": "string",
            "description": "Filter to one Assistance Listing Number, formerly CFDA number, e.g. `93.243` or `10.500`. Sent to the API as its `cfda` parameter."
          },
          "postedSince": {
            "title": "Posted since",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only keep opportunities whose open (posting) date is on or after this date, `YYYY-MM-DD`. Filtered client-side and never billed. Combine with a scheduled daily run to get only what is new."
          },
          "includeDetails": {
            "title": "Include full details",
            "type": "boolean",
            "description": "Call fetchOpportunity for every result to add synopsis, award ceiling/floor, expected number of awards, estimated funding, cost sharing, funding instruments, eligible applicants, category of funding, last-updated date and attachments. One extra API request per opportunity (same price per record).",
            "default": false
          },
          "maxItems": {
            "title": "Max opportunities",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many opportunities have been saved. This is also your cost cap: you are billed once per saved record.",
            "default": 200
          },
          "requestsPerSecond": {
            "title": "Requests per second",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Throttle for calls to api.grants.gov (1-5). The public API has no published rate limit; 2 is a polite default.",
            "default": 2
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries with exponential backoff for network errors, 5xx and 429 responses before a request is given up.",
            "default": 4
          },
          "sortBy": {
            "title": "Sort by",
            "type": "string",
            "description": "Sort expression, `<field>|asc` or `<field>|desc`. Accepted fields: `openDate`, `closeDate`, `agency`, `oppNum`. Keep `openDate|desc` (newest first) so `postedSince` runs can stop early. The direction is required, and an unrecognised value fails the run up front because Grants.gov answers it with zero results instead of an error.",
            "default": "openDate|desc"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The Grants.gov API is public and works without a proxy; enable Apify Proxy only if your runs are rate limited.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}