{
  "openapi": "3.0.1",
  "info": {
    "title": "NIH RePORTER Grants Scraper – Federal Research Funding API",
    "description": "Search NIH grants via the official NIH RePORTER API: keyword, fiscal year, institute, activity code, org, state, PI, award-amount and award-date filters, plus an optional PubMed join. Auto-chunks past the API's 15,000-row wall. Watch mode returns only what's new since last run. Research grants API.",
    "version": "0.1",
    "x-build-id": "jmW2BR2jfIokNRmT0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchsmith~nih-reporter-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchsmith-nih-reporter-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/fetchsmith~nih-reporter-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetchsmith-nih-reporter-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/fetchsmith~nih-reporter-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetchsmith-nih-reporter-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": {
          "startUrl": {
            "title": "NIH RePORTER search URL",
            "type": "string",
            "description": "Optional shortcut: build the search on reporter.nih.gov, then paste the address bar here — e.g. \"https://reporter.nih.gov/search/FIJedD1bG0epAlP7QhG9lw/projects\". Any tab of a shared search works (/projects, /charts, /publications …); a bare search id works too. NIH resolves the saved search on its side, so it REPLACES every filter field below (keyword, fiscal years, ICs, activity codes, org, PI, amounts, project numbers) — the run log names any you left set. Max results, abstract/publication options and the watch label still apply. Note: NIH does not promise a shared link lives forever; if it stops resolving, the run fails with a clear message and you can paste a fresh one."
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Full-text search across project title, abstract and NIH indexing terms (e.g. \"CRISPR\", \"alzheimer\", \"mRNA vaccine\"). Leave empty to return everything matching the other filters.",
            "default": "cancer"
          },
          "fiscalYears": {
            "title": "Fiscal years",
            "uniqueItems": true,
            "type": "array",
            "description": "NIH fiscal years to include, e.g. 2024, 2025. A project appears once per fiscal year it was funded in. Leave empty for all years (1985 onwards)."
          },
          "agencyIcCodes": {
            "title": "NIH Institute / Center (IC)",
            "uniqueItems": true,
            "type": "array",
            "description": "Administering institute abbreviations: NCI, NIAID, NHLBI, NIGMS, NIDDK, NINDS, NIMH, NIA, NICHD, NIDA, NIAMS, NEI, NIEHS, NIDCD, NIDCR, NIAAA, NIBIB, NHGRI, NIMHD, NINR, NLM, NCATS, NCCIH, FIC, OD, CC, CIT, CSR, NIOSH, plus AHRQ, CDC, FDA, HRSA, SAMHSA, ACF, ACL, ASPR, VA, OASH, NCRR (defunct 2011, historical grants only), ADAMHA (pre-1992 predecessor agency), and the CDC sub-centers ATSDR, NCCDPHP, NCHHSTP, NCIPC, NCBDDD, NCEZID, NCHS. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "activityCodes": {
            "title": "Activity codes",
            "uniqueItems": true,
            "type": "array",
            "description": "NIH activity (award mechanism) codes, e.g. R01, R21, R43, F32, K99, U54, P01, N01. A code that isn't real returns zero rows with no error, so a made-up or misspelled code silently looks like an empty search -- the run's log warns if a supplied code isn't on our live-observed list of ~201 known codes, but still sends it as-is. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "awardTypes": {
            "title": "Award types",
            "uniqueItems": true,
            "type": "array",
            "description": "Application type code: 1 = new, 2 = competing renewal, 3 = supplement, 4 = competing extension, 5 = non-competing continuation, 7 = change of institution, 9 = change of NIH institute.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9"
              ],
              "enumTitles": [
                "1 - New",
                "2 - Competing renewal",
                "3 - Supplement",
                "4 - Competing extension",
                "5 - Non-competing continuation",
                "6 - Other",
                "7 - Change of institution",
                "8 - Other",
                "9 - Change of NIH institute"
              ]
            }
          },
          "orgNames": {
            "title": "Organization names",
            "uniqueItems": true,
            "type": "array",
            "description": "Funded organizations, e.g. \"Stanford University\", \"Moderna\". Partial names match.",
            "items": {
              "type": "string"
            }
          },
          "orgStates": {
            "title": "Organization states",
            "uniqueItems": true,
            "type": "array",
            "description": "Two-letter US state codes of the funded organization, e.g. CA, MA, NY.",
            "items": {
              "type": "string"
            }
          },
          "piNames": {
            "title": "Principal investigator names",
            "uniqueItems": true,
            "type": "array",
            "description": "Match projects whose PI name contains any of these strings, e.g. \"Doudna\".",
            "items": {
              "type": "string"
            }
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Only projects whose award amount is at least this many dollars. Caveat: NIH RePORTER applies amount filtering as a range, so using either amount field excludes projects with no award amount recorded (~3% of rows in a measured FY2024 sample)."
          },
          "maxAwardAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Only projects whose award amount is at most this many dollars. Can be combined with the minimum for an exact band (e.g. 100000-500000). Same no-award-amount caveat as the minimum field."
          },
          "awardNoticeDateFrom": {
            "title": "Award notice date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only projects whose official award/notice-of-award date is on or after this date, e.g. \"2024-06-01\". Distinct from fiscal year: a project's fiscal year rarely matches its calendar award date. Must be YYYY-MM-DD; NIH RePORTER silently ignores any other format instead of rejecting it, so this Actor rejects a malformed value up front rather than send a filter that quietly does nothing."
          },
          "awardNoticeDateTo": {
            "title": "Award notice date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Only projects whose official award/notice-of-award date is on or before this date. Can be combined with the \"from\" date for an exact window (e.g. new awards in a given week or month)."
          },
          "projectNums": {
            "title": "Project numbers (exact lookup)",
            "uniqueItems": true,
            "type": "array",
            "description": "Look up specific projects by full project number (5R01CA234538-06) or core number (R01CA234538). When set, EVERY other filter is ignored, so a keyword or fiscal-year filter can never silently hide the project you asked for by number.",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active projects only",
            "type": "boolean",
            "description": "Only projects that are currently active (within their project period).",
            "default": false
          },
          "newlyAddedOnly": {
            "title": "Newly added projects only",
            "type": "boolean",
            "description": "Only projects NIH RePORTER has added to the index recently — use this for cheap incremental pulls instead of re-scanning a whole fiscal year. Measured 2026-09-11: ~8.9k projects index-wide, almost all FY2026.",
            "default": false
          },
          "watchLabel": {
            "title": "Watch label (only new since last run)",
            "type": "string",
            "description": "Optional. Give this saved query a name (e.g. \"crispr-nci-weekly\") to turn on watch mode: the Actor remembers which projects it has already delivered under that name and returns ONLY projects that are new since the previous run. The first run on a new label is a free baseline run — it records what already matches and returns zero results; every run after that returns and charges for new projects only. Change any other filter and the label starts a fresh baseline, so \"new\" always means new for the exact query you are watching. Leave empty for a normal one-off search."
          },
          "watchChanges": {
            "title": "Also alert on project changes",
            "type": "boolean",
            "description": "Only used with Watch label. When on, a project you were already alerted on is re-delivered (charged again) if its project end date, budget end date, award amount or active flag changes since you last saw it -- e.g. a no-cost extension pushing the end date out, an administrative supplement changing the award amount, or the project ending (active -> inactive). Tagged with _watchChangeType and _watchPrevious showing exactly what moved. Off by default, so a plain watchLabel only ever alerts on brand-new projects, same as before this option existed.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL (notify on completion)",
            "type": "string",
            "description": "Optional. An http(s) URL to POST a small JSON summary to when the run finishes — projects pushed, watch-label new/changed counts if Watch label is set, and the run's dataset ID so you can fetch the results. A convenience for callers who want a completion ping without setting up an Apify platform webhook (which needs separate Console/API configuration per Task, not per run). Best-effort: a failed or slow webhook is logged as a warning and never fails the run or affects charging — it fires after every project has already been pushed and charged. Leave empty to skip."
          },
          "excludeSubprojects": {
            "title": "Exclude subprojects",
            "type": "boolean",
            "description": "Exclude subproject records of multi-component awards (P01/U54 centers), which otherwise duplicate their parent project.",
            "default": true
          },
          "includePublications": {
            "title": "Include linked PubMed publications",
            "type": "boolean",
            "description": "Join each project to the PubMed papers it produced (PMIDs + count) via NIH RePORTER's publications endpoint. Batched, so it costs roughly one extra request per 25 projects.",
            "default": true
          },
          "includeAbstract": {
            "title": "Include abstract text",
            "type": "boolean",
            "description": "Include the full project abstract and public-health-relevance statement. Turn off for a smaller dataset.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many project records. You are charged per result returned.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}