{
  "openapi": "3.0.1",
  "info": {
    "title": "US Federal Grant Opportunities: Search and Weekly Alerts",
    "description": "Search US federal grant opportunities on Grants.gov by keyword, agency, eligibility, funding category, ALN number and posted or closing dates, or watch for new and changed opportunities since your last run. Award ceiling, floor, funding, close date, eligibility, link. $0.003 per opportunity.",
    "version": "0.3",
    "x-build-id": "F1j0ebwcNaYXzC8ij"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagleaner~grants-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagleaner-grants-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/datagleaner~grants-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-datagleaner-grants-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/datagleaner~grants-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-datagleaner-grants-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": {
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search words, as in the Grants.gov search box, e.g. `small business`, `rural broadband`, `youth mentoring`."
          },
          "statuses": {
            "title": "Opportunity status",
            "type": "array",
            "description": "Which opportunities to include. Leave empty for open (`posted`) opportunities only.",
            "items": {
              "type": "string",
              "enum": [
                "posted",
                "forecasted",
                "closed",
                "archived"
              ]
            },
            "default": [
              "posted"
            ]
          },
          "agencies": {
            "title": "Agency codes",
            "type": "array",
            "description": "Grants.gov agency codes; a top-level code such as `HHS`, `USDA`, `DOE`, `NSF`, `DOC` also matches its sub-agencies. Example: `HHS-NIH11`.",
            "items": {
              "type": "string"
            }
          },
          "eligibilities": {
            "title": "Eligibility type codes",
            "type": "array",
            "description": "Who may apply, by Grants.gov code: `00` State governments, `01` County, `02` City or township, `04` Special district, `05` Independent school districts, `06` Public and state controlled higher education, `07` Federally recognized tribes, `08` Public housing authorities, `11` Other tribal organizations, `12` Nonprofits with 501(c)(3) status, `13` Nonprofits without 501(c)(3), `20` Private higher education, `21` Individuals, `22` For-profits other than small businesses, `23` Small businesses, `25` Others, `99` Unrestricted.",
            "items": {
              "type": "string"
            }
          },
          "fundingCategories": {
            "title": "Funding category codes",
            "type": "array",
            "description": "Grants.gov category codes: `AG` Agriculture, `AR` Arts, `BC` Business and Commerce, `CD` Community Development, `ED` Education, `ELT` Employment and Training, `EN` Energy, `ENV` Environment, `HL` Health, `HU` Humanities, `ISS` Income Security and Social Services, `LJL` Law and Justice, `NR` Natural Resources, `ST` Science and Technology, `T` Transportation, `O` Other.",
            "items": {
              "type": "string"
            }
          },
          "fundingInstruments": {
            "title": "Funding instrument codes",
            "type": "array",
            "description": "`G` Grant, `CA` Cooperative Agreement, `PC` Procurement Contract, `O` Other.",
            "items": {
              "type": "string"
            }
          },
          "alnNumbers": {
            "title": "ALN / CFDA numbers",
            "type": "array",
            "description": "Assistance Listing Numbers (formerly CFDA), e.g. `93.226`, `10.912`. An opportunity matches if it lists any of them.",
            "items": {
              "type": "string"
            }
          },
          "opportunityNumbers": {
            "title": "Opportunity numbers",
            "type": "array",
            "description": "Look up specific funding opportunity numbers, e.g. `G27AS00081`.",
            "items": {
              "type": "string"
            }
          },
          "postedAfter": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Date as `YYYY-MM-DD`."
          },
          "postedBefore": {
            "title": "Posted on or before",
            "type": "string",
            "description": "Date as `YYYY-MM-DD`."
          },
          "closingAfter": {
            "title": "Closes on or after",
            "type": "string",
            "description": "Date as `YYYY-MM-DD`. Opportunities with no close date (forecasts, rolling deadlines) are left out when a closing window is set."
          },
          "closingBefore": {
            "title": "Closes on or before",
            "type": "string",
            "description": "Date as `YYYY-MM-DD`, e.g. to list grants due within the next 30 days."
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "openDate|desc",
              "openDate|asc",
              "closeDate|asc",
              "closeDate|desc"
            ],
            "type": "string",
            "description": "Result order.",
            "default": "openDate|desc"
          },
          "includeDetails": {
            "title": "Fetch award amounts and eligibility",
            "type": "boolean",
            "description": "One extra Grants.gov request per opportunity for award ceiling, floor, estimated funding, eligibility and summary. Same price either way; switch off for a faster title, agency and date list.",
            "default": true
          },
          "maxResults": {
            "title": "Max opportunities",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many billed rows.",
            "default": 100
          },
          "watchMode": {
            "title": "Watch mode (new and changed since last run)",
            "type": "boolean",
            "description": "Return only opportunities that are new or changed (title, status, close date, amounts, eligibility) compared with your previous run in the named store below. The first run reports everything that matches as new. Schedule it weekly for a digest.",
            "default": false
          },
          "storeName": {
            "title": "Watch store name",
            "type": "string",
            "description": "Name of the key-value store that keeps the last-seen state. Use a different name for each watched search.",
            "default": "grants-watch"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}