{
  "openapi": "3.0.1",
  "info": {
    "title": "US Grants Monitor 🇺🇸 (Grants.gov alerts + NIH award history)",
    "description": "Track new US federal grant opportunities on Grants.gov by agency, topic or assistance listing number, and see who already won similar grants and how much on NIH RePORTER. Monitor mode alerts on new postings. No API key. Platform usage included.",
    "version": "0.1",
    "x-build-id": "LYBCLrOlT2LUXkbL5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tagadanar~us-grants-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tagadanar-us-grants-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/tagadanar~us-grants-monitor/runs": {
      "post": {
        "operationId": "runs-sync-tagadanar-us-grants-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/tagadanar~us-grants-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-tagadanar-us-grants-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "opportunities",
              "awards",
              "both"
            ],
            "type": "string",
            "description": "<code>opportunities</code> searches open/forecasted grant opportunities on Grants.gov. <code>awards</code> looks up who already won similar NIH grants and how much, on NIH RePORTER. <code>both</code> runs both and returns one dataset tagged by <code>recordType</code>.",
            "default": "opportunities"
          },
          "keywords": {
            "title": "Keywords / topics",
            "type": "array",
            "description": "Words or phrases to search, e.g. <code>climate resilience</code>, <code>rural broadband</code>. Used as the Grants.gov full-text search and the NIH RePORTER title/terms/abstract search. Multiple entries are combined with OR. Provide at least one of keywords, agencies or ALN numbers.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Funding agencies to scope the search to. For opportunities, Grants.gov top-level agency codes, e.g. <code>NSF</code>, <code>NASA</code>, <code>HHS</code>, <code>DHS</code> (find codes at <code>grants.gov/search-grants</code>). For award history, NIH institute/center abbreviations, e.g. <code>NHLBI</code>, <code>NIEHS</code> (a different vocabulary, so the same list is passed to both and matches what it can). Provide at least one of keywords, agencies or ALN numbers.",
            "items": {
              "type": "string"
            }
          },
          "alnNumbers": {
            "title": "ALN / CFDA numbers",
            "type": "array",
            "description": "Assistance Listing Numbers (formerly CFDA numbers) to filter Grants.gov opportunities, e.g. <code>93.859</code>, <code>47.041</code>. Not used for NIH award history. Provide at least one of keywords, agencies or ALN numbers.",
            "items": {
              "type": "string"
            }
          },
          "oppStatuses": {
            "title": "Opportunity statuses",
            "type": "array",
            "description": "Which Grants.gov opportunity statuses to include. Opportunities only.",
            "items": {
              "type": "string",
              "enum": [
                "forecasted",
                "posted",
                "closed",
                "archived"
              ],
              "enumTitles": [
                "Forecasted (not yet open)",
                "Posted (currently open)",
                "Closed",
                "Archived"
              ]
            },
            "default": [
              "posted",
              "forecasted"
            ]
          },
          "activityCodes": {
            "title": "NIH activity codes",
            "type": "array",
            "description": "NIH award mechanism codes to filter award history, e.g. <code>R01</code>, <code>R21</code>, <code>K01</code>, <code>U01</code>. Award history only. Leave empty for all mechanisms.",
            "items": {
              "type": "string"
            }
          },
          "fiscalYears": {
            "title": "Fiscal years",
            "type": "array",
            "description": "Fiscal years to search for award history, e.g. <code>2025</code>, <code>2026</code>. Award history only. Defaults to the current and previous fiscal year.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Include opportunity details",
            "type": "boolean",
            "description": "Fetch the full Grants.gov detail record for each opportunity (award ceiling/floor, expected number of awards, full description, last-updated date). One extra request per opportunity, capped by max results. Turn off for a faster, lighter run with only the search-result fields. Opportunities only.",
            "default": true
          },
          "maxResults": {
            "title": "Max results per mode",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after collecting this many records per mode (so <code>both</code> can return up to this many opportunities and this many awards). Caps cost and runtime on broad queries.",
            "default": 50
          },
          "monitorMode": {
            "title": "Monitor mode (alert on new opportunities only)",
            "type": "boolean",
            "description": "Remember opportunities already seen across runs and return only new ones. Applies to grant opportunities only (award history is a point-in-time lookup, not a stream of new events, so it is never diffed). Built for a scheduled run: the first run establishes the baseline, later runs report and charge for new opportunities only.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL (Slack-compatible)",
            "type": "string",
            "description": "When monitor mode finds new opportunities, post a text digest here (Slack incoming webhook or any endpoint accepting <code>{\"text\": \"...\"}</code> JSON)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}