{
  "openapi": "3.0.1",
  "info": {
    "title": "US Federal Grants & Funding Scraper - Grants.gov, NIH & NSF",
    "description": "Scrape US federal grants in one actor: open Grants.gov opportunities to apply for, plus awarded NIH RePORTER & NSF research projects with abstracts, PIs, organizations, contact emails and lead scores. Monitoring mode for new funding. No API key, no browser.",
    "version": "0.1",
    "x-build-id": "clT4l4ZeiqaM474iZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~us-federal-grants-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-us-federal-grants-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/scrapesage~us-federal-grants-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-us-federal-grants-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/scrapesage~us-federal-grants-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-us-federal-grants-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": {
          "searchType": {
            "title": "Data source",
            "enum": [
              "grantOpportunities",
              "nihProjects",
              "nsfAwards"
            ],
            "type": "string",
            "description": "<code>grantOpportunities</code> = open/forecasted grant opportunities you can APPLY for (Grants.gov). <code>nihProjects</code> = awarded NIH biomedical research projects (NIH RePORTER). <code>nsfAwards</code> = awarded NSF science & engineering grants (PI emails included).",
            "default": "grantOpportunities"
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Free-text keywords, each run against the selected source, e.g. <code>cancer</code>, <code>cybersecurity</code>, <code>climate</code>, <code>artificial intelligence</code>. Leave empty to list everything matching your filters (newest/biggest first).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (optional)",
            "type": "array",
            "description": "Scrape specific records directly. Supports Grants.gov detail URLs (<code>grants.gov/search-results-detail/{id}</code>), NIH project URLs (<code>reporter.nih.gov/project-details/{id}</code>) and NSF award URLs (<code>nsf.gov/awardsearch/showAward?AWD_ID={id}</code>).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "oppStatuses": {
            "title": "Opportunity statuses (Grants.gov)",
            "type": "string",
            "description": "Pipe-separated statuses to include: <code>forecasted</code>, <code>posted</code>, <code>closed</code>, <code>archived</code>. Default returns active funding (<code>forecasted|posted</code>). Grant opportunities only.",
            "default": "forecasted|posted"
          },
          "grantsAgencies": {
            "title": "Agency codes (Grants.gov)",
            "type": "array",
            "description": "Filter by Grants.gov agency code(s), e.g. <code>HHS-NIH11</code>, <code>NSF</code>, <code>USAID</code>, <code>DOD</code>. Grant opportunities only.",
            "items": {
              "type": "string"
            }
          },
          "eligibilities": {
            "title": "Applicant eligibility codes (Grants.gov)",
            "type": "array",
            "description": "Filter by eligible-applicant code(s), e.g. <code>25</code> (Others/individuals), <code>12</code> (Nonprofits 501c3), <code>06</code> (Higher ed), <code>21</code> (Small businesses). Grant opportunities only.",
            "items": {
              "type": "string"
            }
          },
          "fundingCategories": {
            "title": "Funding category codes (Grants.gov)",
            "type": "array",
            "description": "Filter by funding-category code(s), e.g. <code>HL</code> (Health), <code>ST</code> (Science & Tech), <code>ED</code> (Education), <code>ENV</code> (Environment). Grant opportunities only.",
            "items": {
              "type": "string"
            }
          },
          "fundingInstruments": {
            "title": "Funding instrument codes (Grants.gov)",
            "type": "array",
            "description": "Filter by instrument code(s): <code>G</code> (Grant), <code>CA</code> (Cooperative Agreement), <code>PC</code> (Procurement Contract), <code>O</code> (Other). Grant opportunities only.",
            "items": {
              "type": "string"
            }
          },
          "cfda": {
            "title": "CFDA / Assistance Listing numbers (Grants.gov)",
            "type": "array",
            "description": "Filter by CFDA / Assistance Listing number(s), e.g. <code>93.393</code>. Grant opportunities only.",
            "items": {
              "type": "string"
            }
          },
          "includeOpportunityDetails": {
            "title": "Include full opportunity detail (Grants.gov)",
            "type": "boolean",
            "description": "For each opportunity, fetch the full record: description, award ceiling/floor, total funding, expected number of awards, eligibility, applicant types, funding instruments, CFDA programs and the agency contact email/name/phone. One extra request per opportunity. Strongly recommended (the value is in the detail).",
            "default": true
          },
          "fiscalYears": {
            "title": "Fiscal years (NIH)",
            "type": "array",
            "description": "Limit NIH projects to these fiscal year(s), e.g. <code>2025</code>, <code>2024</code>. NIH projects only.",
            "items": {
              "type": "string"
            }
          },
          "nihInstitutes": {
            "title": "NIH institutes/centers (NIH)",
            "type": "array",
            "description": "Filter by NIH funding institute/center abbreviation(s), e.g. <code>NCI</code> (cancer), <code>NIAID</code>, <code>NHLBI</code>, <code>NIMH</code>, <code>NIA</code>. NIH projects only.",
            "items": {
              "type": "string"
            }
          },
          "orgStates": {
            "title": "Organization states (NIH)",
            "type": "array",
            "description": "Two-letter US state code(s) of the awardee organization, e.g. <code>CA</code>, <code>MA</code>, <code>NY</code>. NIH projects only.",
            "items": {
              "type": "string"
            }
          },
          "orgNames": {
            "title": "Organization names (NIH)",
            "type": "array",
            "description": "Limit to awardee organizations whose name matches, e.g. <code>harvard</code>, <code>stanford</code>. NIH projects only.",
            "items": {
              "type": "string"
            }
          },
          "piNames": {
            "title": "Principal investigator names (NIH)",
            "type": "array",
            "description": "Limit to projects led by a PI whose name matches, e.g. <code>doudna</code>. NIH projects only.",
            "items": {
              "type": "string"
            }
          },
          "onlyActiveProjects": {
            "title": "Only currently active NIH projects",
            "type": "boolean",
            "description": "Return only NIH projects that are currently active (within their project period). NIH projects only.",
            "default": false
          },
          "includeNihPublications": {
            "title": "Include NIH publication counts",
            "type": "boolean",
            "description": "For each NIH project, look up how many publications it has produced (and recent PubMed IDs) — a strong research-impact signal. One extra request per project. NIH projects only.",
            "default": false
          },
          "nsfStates": {
            "title": "Organization states (NSF)",
            "type": "array",
            "description": "Two-letter US state code(s) of the awardee organization, e.g. <code>CA</code>, <code>TX</code>. NSF awards only.",
            "items": {
              "type": "string"
            }
          },
          "nsfDateStart": {
            "title": "Award start date from (NSF)",
            "type": "string",
            "description": "Only NSF awards starting on/after this date (YYYY-MM-DD). NSF awards only."
          },
          "nsfDateEnd": {
            "title": "Award start date to (NSF)",
            "type": "string",
            "description": "Only NSF awards starting on/before this date (YYYY-MM-DD). NSF awards only."
          },
          "awardAmountMin": {
            "title": "Min award amount USD (NIH)",
            "type": "integer",
            "description": "Only NIH projects at or above this award amount. NIH projects only."
          },
          "awardAmountMax": {
            "title": "Max award amount USD (NIH)",
            "type": "integer",
            "description": "Only NIH projects at or below this award amount. NIH projects only."
          },
          "enrichOrganizationContacts": {
            "title": "Enrich organization contacts (website crawl)",
            "type": "boolean",
            "description": "When a record carries an organization/info website, crawl it (home + contact/about) for extra emails, phones and social links — turning awardees into ready-to-contact leads. NSF and Grants.gov records benefit most.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records to return per run (across all keywords).",
            "default": 100
          },
          "monitorMode": {
            "title": "Monitoring mode — only new records",
            "type": "boolean",
            "description": "Remember records already returned in previous runs (in a named key-value store) and emit only NEW ones each run. Works alongside Apify Schedules — schedule the run, this dedupes the output so you only ever pay for and see new funding.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name for the monitoring memory. Use a distinct key per saved search so their 'seen' histories stay separate.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Parallel detail/enrichment requests. These government APIs rate-limit heavy use — keep this modest.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The default Apify Proxy is enough — Grants.gov, NIH RePORTER and NSF are open government data with no anti-bot.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}