{
  "openapi": "3.0.1",
  "info": {
    "title": "Grants.gov API & SAM.gov Scraper — Federal Grants Feed",
    "description": "Monitor federal grants and contract opportunities via the official Grants.gov and SAM.gov APIs, plus recent USAspending awards. Keyword search, normalized JSON, new/updated flags for scheduled runs and webhooks. Pay per opportunity record ($0.001).",
    "version": "0.1",
    "x-build-id": "C0oAfpJax58BA3xfl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/owlabee~grants-gov-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-owlabee-grants-gov-api",
        "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/owlabee~grants-gov-api/runs": {
      "post": {
        "operationId": "runs-sync-owlabee-grants-gov-api",
        "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/owlabee~grants-gov-api/run-sync": {
      "post": {
        "operationId": "run-sync-owlabee-grants-gov-api",
        "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",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "type": "array",
            "description": "Search terms, one per line. Each keyword is searched in every enabled source. Grants.gov OR-matches the words of a keyword; SAM.gov matches the notice title. The prefilled value is the cheap example used by Apify's daily automated test.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which official sources to query. Grants.gov needs no key. SAM.gov needs the free personal API key in \"SAM.gov API key\" below and is skipped (with a log line) when the key is missing. State & local reads official open-data bid, grant and award datasets (no login, no key); pick them under \"State & local jurisdictions\". NIH RePORTER and NSF awards return recent research awards (recipient, amount, principal investigators by name), capped per keyword by \"Max awards per keyword\"; Federal Register returns notices that match \"notice of funding opportunity\" plus the keyword, with the deadline as published text. None of them needs a key.",
            "items": {
              "type": "string",
              "enum": [
                "grantsGov",
                "samGov",
                "sled",
                "nihReporter",
                "nsfAwards",
                "federalRegister"
              ],
              "enumTitles": [
                "Grants.gov (federal grants)",
                "SAM.gov (federal contract opportunities)",
                "State & local bids and grants (open data: LA, NYC, Montgomery County MD, Mesa AZ, Cook County IL, Illinois; opt-in: E-Rate, Delaware, California grants, NY SUCF, TxDOT)",
                "NIH RePORTER (recent NIH research awards: who won)",
                "NSF awards (recent NSF research awards: who won)",
                "Federal Register (notices of funding opportunity)"
              ]
            },
            "default": [
              "grantsGov"
            ]
          },
          "oppStatuses": {
            "title": "Grants.gov opportunity statuses",
            "type": "array",
            "description": "Grants.gov statuses to include. \"posted\" = open for applications, \"forecasted\" = announced but not yet open.",
            "items": {
              "type": "string",
              "enum": [
                "forecasted",
                "posted",
                "closed",
                "archived"
              ],
              "enumTitles": [
                "Forecasted",
                "Posted",
                "Closed",
                "Archived"
              ]
            },
            "default": [
              "posted"
            ]
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only opportunities posted in the last N days (1–365). For USAspending awards this is the award start-date window, for NIH the award notice date, for NSF the award date, for the Federal Register the publication date. State & local datasets without a posting date (nyc-sca, illinois, ca-grants, txdot-lettings, cook-county-buying-plan, san-diego-county, nyc-mwbe-upcoming) return their current listing.",
            "default": 30
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound on dataset items across all keywords and sources per run (opportunities, awards and error items). Use together with the run's maximum cost to control spend.",
            "default": 500
          },
          "fetchDetails": {
            "title": "Fetch Grants.gov details",
            "type": "boolean",
            "description": "Call the Grants.gov fetchOpportunity endpoint for each emitted grant to add award ceiling/floor, estimated funding, expected awards, eligibilities, funding categories and the description. Each detail fetch is a separate paid event.",
            "default": false
          },
          "maxDetails": {
            "title": "Max detail fetches",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on Grants.gov detail fetches per run (only used when \"Fetch Grants.gov details\" is on).",
            "default": 100
          },
          "samApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Your free personal SAM.gov public API key (sam.gov → sign in → Account Details → Public API Key). Required only for the SAM.gov source. Stored encrypted and never logged."
          },
          "samFilters": {
            "title": "SAM.gov filters",
            "type": "object",
            "description": "Optional SAM.gov filters: {\"naics\": \"541511\", \"setAside\": \"SBA\", \"state\": \"VA\", \"ptype\": \"o\"}. ptype codes: o = Solicitation, k = Combined Synopsis/Solicitation, p = Presolicitation, r = Sources Sought, s = Special Notice, a = Award Notice (comma-separate several). setAside codes: SBA, SBP, 8A, 8AN, HZC, HZS, SDVOSBC, SDVOSBS, WOSB, WOSBSS, EDWOSB, EDWOSBSS, LAS, IEE, ISBEE, BICiv, VSA, VSS.",
            "default": {}
          },
          "sledJurisdictions": {
            "title": "State & local jurisdictions",
            "type": "array",
            "description": "Which state and local datasets the \"State & local\" source reads. Empty = the original six (la-city, nyc-sca, montgomery-md, mesa-az, cook-county-il, illinois); that meaning is fixed, so a saved input never starts running, and paying for, datasets added later. Datasets added on 2026-11-07 run only when you pick them: erate-470 = E-Rate FCC Form 470, every US school and library seeking internet, Wi-Fi and telecom bids (narrow it with \"States\"); delaware = State of Delaware open bids, with UNSPSC codes; delaware-closed = Delaware recently closed bids; ca-grants = California Grants Portal, active and forecasted state grants with eligible applicants and amounts; ny-sucf = New York State University Construction Fund design and construction procurements; txdot-lettings = TxDOT highway lettings in the next 42 days, one record per project; txdot-bid-tabulations = TxDOT bid results of the last 24 months with the apparent low bidder; baton-rouge = City of Baton Rouge and East Baton Rouge Parish bid openings (the window applies to the bid date); cook-county-buying-plan = Cook County contracts planned for the year; san-diego-county = San Diego County contracting forecast; montgomery-md-awards = Montgomery County proposed awardees; nyc-mwbe-upcoming = New York City M/WBE upcoming small purchases with NIGP codes; la-city-awards = City of Los Angeles RAMP contract awards. `all` = every dataset, including ones added in future versions (the cost grows with them). Each dataset and keyword is one search run.",
            "items": {
              "type": "string",
              "enum": [
                "la-city",
                "nyc-sca",
                "montgomery-md",
                "mesa-az",
                "cook-county-il",
                "illinois",
                "erate-470",
                "delaware",
                "delaware-closed",
                "ca-grants",
                "ny-sucf",
                "txdot-lettings",
                "txdot-bid-tabulations",
                "baton-rouge",
                "cook-county-buying-plan",
                "san-diego-county",
                "montgomery-md-awards",
                "nyc-mwbe-upcoming",
                "la-city-awards",
                "all"
              ],
              "enumTitles": [
                "City of Los Angeles, CA (open bids)",
                "New York City, NY (School Construction Authority anticipated RFPs)",
                "Montgomery County, MD (solicitations)",
                "City of Mesa, AZ (purchasing solicitations)",
                "Cook County, IL (intent to execute)",
                "State of Illinois (future construction solicitations)",
                "E-Rate FCC Form 470, all US schools and libraries (telecom and internet bids)",
                "State of Delaware (open bids, UNSPSC codes)",
                "State of Delaware (recently closed bids)",
                "California Grants Portal (state grants)",
                "New York State University Construction Fund (design and construction bids)",
                "Texas DOT lettings (next 42 days, per project)",
                "Texas DOT bid tabulations (apparent low bidder)",
                "City of Baton Rouge / East Baton Rouge Parish, LA (bid openings)",
                "Cook County, IL (buying plan: planned contracts)",
                "San Diego County, CA (contracting forecast)",
                "Montgomery County, MD (proposed awardees)",
                "New York City, NY (M/WBE upcoming small purchases)",
                "City of Los Angeles, CA (RAMP awards)",
                "All datasets, including ones added later"
              ]
            },
            "default": []
          },
          "sledStates": {
            "title": "States (national state & local datasets)",
            "type": "array",
            "description": "Optional two-letter state codes, e.g. [\"AZ\", \"CA\"]. Narrows national datasets (today erate-470) to applicants in those states; datasets that cover one state or city are not affected. Empty = every state.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "default": []
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional free Socrata app token. It only raises the open-data portals' shared rate limits; the State & local source works without it. Stored encrypted and never logged."
          },
          "includeRecentAwards": {
            "title": "Include recent USAspending awards",
            "type": "boolean",
            "description": "Also query USAspending.gov for grants and contracts recently awarded for the same keywords — useful to see who recently won similar awards. Each award is a dataset item charged at the opportunity rate.",
            "default": false
          },
          "maxAwards": {
            "title": "Max awards per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on award records per keyword from each award source: USAspending (only used when \"Include recent USAspending awards\" is on), NIH RePORTER and NSF awards.",
            "default": 50
          },
          "onlyNewSinceLastRun": {
            "title": "Only new or updated since last run",
            "type": "boolean",
            "description": "Monitor mode for schedules: remember what was seen per source and keyword in the state store and emit only opportunities that are new or whose key fields changed, flagged with isNew / isUpdated. The first run is a baseline and emits (and charges for) everything.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that holds the monitor snapshots. Use a different name per schedule if two schedules share keywords.",
            "default": "gov-opportunity-feed-state"
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "pattern": "^https?://.+",
            "type": "string",
            "description": "If set, the Actor POSTs a JSON run summary plus the emitted items (max 500) to this URL when it finishes. Failures are logged, never fatal."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}