{
  "openapi": "3.0.1",
  "info": {
    "title": "Grants.gov Scraper: Federal Grant Opportunities Feed",
    "description": "Federal grant database from Grants.gov: grant opportunities by keyword, agency and eligibility, with full details and new grant alerts for nonprofits.",
    "version": "0.1",
    "x-build-id": "X3qeHjHKTzKjyYpt8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/finaldynamics~grants-gov-opportunity-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-finaldynamics-grants-gov-opportunity-feed",
        "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/finaldynamics~grants-gov-opportunity-feed/runs": {
      "post": {
        "operationId": "runs-sync-finaldynamics-grants-gov-opportunity-feed",
        "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/finaldynamics~grants-gov-opportunity-feed/run-sync": {
      "post": {
        "operationId": "run-sync-finaldynamics-grants-gov-opportunity-feed",
        "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": "Words to search for, as in the Grants.gov search box. Leave empty to include all opportunities.",
            "default": ""
          },
          "statuses": {
            "title": "Opportunity statuses",
            "type": "array",
            "description": "One or more of posted, forecasted, closed or archived. Any other value stops the run before anything is charged.",
            "items": {
              "type": "string"
            },
            "default": [
              "posted"
            ]
          },
          "agencyCodes": {
            "title": "Agency codes",
            "type": "array",
            "description": "Grants.gov agency codes, such as USDOJ-OJP-NIJ or HHS-NIH. Codes are not checked against the agency list, so check the spelling.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "fundingCategories": {
            "title": "Funding category codes",
            "type": "array",
            "description": "Grants.gov category codes, such as EN (Energy), ENV (Environment), ED (Education) or HL (Health).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "eligibilities": {
            "title": "Applicant eligibility codes",
            "type": "array",
            "description": "Grants.gov applicant type codes: 01 county governments, 02 city or township governments, 25 others, and other published codes.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "fundingInstruments": {
            "title": "Funding instrument codes",
            "type": "array",
            "description": "Grants.gov instrument codes: G grant, CA cooperative agreement, O other or PC procurement contract.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "postedWithinDays": {
            "title": "Posted within days",
            "minimum": 0,
            "type": "integer",
            "description": "Keep opportunities that opened in the last N days (US Eastern dates, today included). Opportunities with a future open date are kept. 0 turns this filter off; while it is on, opportunities without an open date are left out.",
            "default": 7
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most opportunities one run delivers, up to 5,000. With \"Only new or changed opportunities\", a run that reaches this limit saves nothing, so set it above the number you expect.",
            "default": 200
          },
          "includeDetails": {
            "title": "Include full synopsis",
            "type": "boolean",
            "description": "Add the description, funding, eligibility, contact and forecast dates. Each synopsis read costs $0.003, including reads that find an opportunity unchanged; failed reads are free. A run reads at most 2 × Maximum results + 50 synopses, retries included, then stops.",
            "default": false
          },
          "newOnly": {
            "title": "Only new or changed opportunities",
            "type": "boolean",
            "description": "The first run delivers every match. Later runs deliver only opportunities you have not had yet, plus changed ones marked as updates. With the full synopsis, a change is a new version or update time; without it, a new status, close date or title. Turning the synopsis on or off between runs does not cause false updates. A run that stops at a limit or fails saves nothing, so the next run delivers its opportunities again.",
            "default": false
          },
          "stateStoreId": {
            "title": "Key-value store for new-only runs",
            "type": "string",
            "description": "Needed for \"Only new or changed opportunities\": create a key-value store in Apify Console and enter its ID here. The actor remembers each opportunity for 400 days after it last saw it.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}