{
  "openapi": "3.0.1",
  "info": {
    "title": "NIH RePORTER Award Monitor",
    "description": "First-seen and change-detection over the live NIH RePORTER research-award feed. Polls the v2 projects API and normalizes each award to one flat record (IDs, title, PI, organization, fiscal year, amount, funding IC, dates, abstract), emitting new awards plus re-emits on changes. Keyless.",
    "version": "0.1",
    "x-build-id": "xsAYezsiwCuomOOpc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bytehavenstudios~nih-reporter-award-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bytehavenstudios-nih-reporter-award-monitor",
        "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/bytehavenstudios~nih-reporter-award-monitor/runs": {
      "post": {
        "operationId": "runs-sync-bytehavenstudios-nih-reporter-award-monitor",
        "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/bytehavenstudios~nih-reporter-award-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-bytehavenstudios-nih-reporter-award-monitor",
        "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": {
          "textSearch": {
            "title": "Text search",
            "type": "string",
            "description": "Optional free-text passed to RePORTER `advanced_text_search` — matched against project title, abstract, and terms. Space-separated words are ANDed. Empty = no text filter."
          },
          "orgNames": {
            "title": "Organizations",
            "type": "array",
            "description": "Optional list of grantee organization names (RePORTER `org_names`, matched as contains). Empty = all organizations.",
            "items": {
              "type": "string"
            }
          },
          "piNames": {
            "title": "Principal investigators",
            "type": "array",
            "description": "Optional list of PI names (RePORTER `pi_names` any-name match). Empty = all investigators.",
            "items": {
              "type": "string"
            }
          },
          "fundingIc": {
            "title": "Funding IC / agency",
            "type": "array",
            "description": "Optional list of NIH Institute/Center or agency abbreviations to restrict funding to (RePORTER `agencies`, e.g. NCI, NHLBI, NIAID). Empty = all ICs.",
            "items": {
              "type": "string"
            }
          },
          "fiscalYears": {
            "title": "Fiscal years",
            "type": "array",
            "description": "Optional list of fiscal years to restrict to (RePORTER `fiscal_years`, e.g. 2026). Empty = all years within the award-notice window.",
            "items": {
              "type": "string"
            }
          },
          "awardAmountMin": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Restrict to awards at/above this total dollar amount (maps to RePORTER `award_amount_range.min_amount`). Server-side filter. 0 = no floor.",
            "default": 0
          },
          "since": {
            "title": "Awarded since (delta cursor)",
            "type": "string",
            "description": "Lower bound of the award-notice window — maps to RePORTER `award_notice_date.from_date` (YYYY-MM-DD). Leave empty to default to a recent trailing window. Ignored if 'Only new/changed since last run' is on (the stored high-water-mark drives the cursor instead)."
          },
          "until": {
            "title": "Awarded until (optional upper bound)",
            "type": "string",
            "description": "Optional upper bound of the award-notice window (maps to RePORTER `award_notice_date.to_date`, YYYY-MM-DD). Leave empty for now (up to current date)."
          },
          "monitorNewOnly": {
            "title": "Only new/changed since last run",
            "type": "boolean",
            "description": "Persist a per-award fingerprint (application id → award amount + project-end date + funding IC + abstract/terms presence) in the Actor's key-value store and, on the next run, emit only awards that are newly-seen OR whose fingerprint changed (a supplement revising the amount, a no-cost extension moving the end date, a later-added abstract). Turns this Actor into a first-seen + change monitor across scheduled runs. The award-notice high-water-mark drives the delta window automatically.",
            "default": true
          },
          "maxResults": {
            "title": "Max awards per run",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the total number of award records emitted. 0 = no cap (page until the window is exhausted, honoring the 500-per-page ceiling, the 15,000-record search limit, and the 1 req/sec rate limit).",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The RePORTER API is a clean, open, public JSON host and needs NO proxy. You may enable Apify Proxy only to distribute requests across IPs for very large historical pulls. Default: no proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}