{
  "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": "iEHaJObR1zgZ772lf"
  },
  "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. Unknown values are rejected before charging.",
            "items": {
              "type": "string"
            },
            "default": [
              "posted"
            ]
          },
          "agencyCodes": {
            "title": "Agency codes",
            "type": "array",
            "description": "Grants.gov agency codes, such as USDOJ-OJP-NIJ or HHS-NIH. Passed through without checking the agency list.",
            "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 opened in the last N US Eastern calendar days, including today. Future-dated rows are retained. Zero disables the date filter; undated rows are dropped only while it is active.",
            "default": 7
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum rows delivered. Reaching this limit marks the run truncated. Values above 5000 are capped at 5000.",
            "default": 200
          },
          "includeDetails": {
            "title": "Include full synopsis",
            "type": "boolean",
            "description": "Include description, funding, eligibility, contact and forecast dates. Each successful detail fetch costs $0.003, including unchanged comparisons; failed detail requests are uncharged. Detail requests, including retries, are capped at 2 * maxResults + 50 per run.",
            "default": false
          },
          "newOnly": {
            "title": "Only new or changed opportunities",
            "type": "boolean",
            "description": "First run delivers all matches. Later runs deliver unseen IDs or changed fingerprints. With details, compare version and full lastUpdatedDate; unchanged comparisons pay only for successful detail fetches. Without details, compare status, close date and title. Switching schemes compares stored search parts without false updates. Truncated and failed runs do not advance state.",
            "default": false
          },
          "stateStoreId": {
            "title": "State key-value store ID",
            "type": "string",
            "description": "Needed for \"only new and changed\" on Apify: create a key-value store in Apify Console and select it here. The actor remembers what it has delivered for 400 days.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}