{
  "openapi": "3.0.1",
  "info": {
    "title": "NIH RePORTER Funded Projects Scraper",
    "description": "NIH-funded research projects from the official NIH RePORTER Project API v2: award amount, dates, PIs, program officer, institution and NIH institute.",
    "version": "0.1",
    "x-build-id": "MsSYgaypeKcySNZIg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/knotty_mistveil~nih-reporter-projects/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-knotty_mistveil-nih-reporter-projects",
        "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/knotty_mistveil~nih-reporter-projects/runs": {
      "post": {
        "operationId": "runs-sync-knotty_mistveil-nih-reporter-projects",
        "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/knotty_mistveil~nih-reporter-projects/run-sync": {
      "post": {
        "operationId": "run-sync-knotty_mistveil-nih-reporter-projects",
        "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": {
          "fiscalYears": {
            "title": "Fiscal years",
            "type": "array",
            "description": "NIH fiscal years to include (a fiscal year starts on 1 October, so FY2026 runs 1 Oct 2025 - 30 Sep 2026). Leave empty to search every year. Default: the current fiscal year.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 7300,
            "type": "integer",
            "description": "Look-back window in days on the award notice date, ending today. Ignored when Date from / Date to are set.",
            "default": 30
          },
          "dateFrom": {
            "title": "Date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Start of the award-notice-date window, YYYY-MM-DD (inclusive). Overrides Days back."
          },
          "dateTo": {
            "title": "Date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "End of the award-notice-date window, YYYY-MM-DD (inclusive). Defaults to today."
          },
          "activityCodes": {
            "title": "Activity codes",
            "type": "array",
            "description": "NIH activity codes, e.g. R01, R21, U01, K99, F31, T32, P30. Empty = all. A project is kept when its activity code matches any of these.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "NIH institutes / centers",
            "type": "array",
            "description": "Administering institute or center abbreviations, e.g. NCI, NIAID, NHLBI, NIMHD, NIGMS, NIA, NIMH, NINDS, NIDDK. Empty = all of NIH and the other agencies RePORTER indexes.",
            "items": {
              "type": "string"
            }
          },
          "orgStates": {
            "title": "Organisation states",
            "type": "array",
            "description": "Two-letter state or province codes of the recipient organisation, e.g. CA, NY, MA, TX. Empty = all locations.",
            "items": {
              "type": "string"
            }
          },
          "orgNames": {
            "title": "Organisation names",
            "type": "array",
            "description": "Recipient organisation name fragments, matched as a case-insensitive substring, e.g. stanford, harvard, \"johns hopkins\". Empty = all organisations.",
            "items": {
              "type": "string"
            }
          },
          "piNames": {
            "title": "Principal investigator names",
            "type": "array",
            "description": "Principal investigator name fragments (first, last or full name), matched by NIH's own any-name search, e.g. smith, \"jane doe\". Empty = all investigators.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words searched across the project title, NIH index terms and abstract. By default every word must appear somewhere in those fields (see Keyword match). A phrase in one entry is searched as its separate words. Empty = no keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "keywordsOperator": {
            "title": "Keyword match",
            "enum": [
              "and",
              "or"
            ],
            "type": "string",
            "description": "How multiple keyword words combine. AND keeps a project only when every word appears; OR keeps it when any word appears.",
            "default": "and"
          },
          "minAward": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only projects whose award amount is at least this many US dollars. Projects with no published award amount are excluded when this is set. Empty = no minimum."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many projects. You are charged per project delivered, so this is also the cost cap. Newest award-notice date first, so a value below the window's volume drops the OLDEST projects in the window. The API can be paged only to its first 15,000 matches; narrow the window or fiscal years to reach more.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}