{
  "openapi": "3.0.1",
  "info": {
    "title": "Grants.gov Federal Grant Search",
    "description": "Search and extract structured federal grant opportunity data from Grants.gov -- the U.S. government's central portal for over 1,000 grant-making agencies and more than $500 billion in annual federal funding.",
    "version": "2.0",
    "x-build-id": "mEebP3fpo4gFhe6ga"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~grants-gov-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-grants-gov-search",
        "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/ryanclinton~grants-gov-search/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-grants-gov-search",
        "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/ryanclinton~grants-gov-search/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-grants-gov-search",
        "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": {
          "keyword": {
            "title": "Search Keyword",
            "type": "string",
            "description": "Keyword or phrase to search for in grant opportunities. Optional when you supply a Multi-search list below."
          },
          "preset": {
            "title": "Preset",
            "enum": [
              "",
              "nonprofit",
              "small_business_sbir",
              "university_research",
              "local_government",
              "climate",
              "healthcare"
            ],
            "type": "string",
            "description": "One-click buyer preset. Prefills eligibility / funding-category / status defaults for a common applicant type. Any filter you set explicitly always wins over the preset."
          },
          "agency": {
            "title": "Agency",
            "type": "string",
            "description": "Funding agency code (e.g., HHS, NSF, DOE, EPA, DOC, DOD, USDA, DOI, ED, DOS)."
          },
          "fundingInstrument": {
            "title": "Funding Instrument",
            "enum": [
              "",
              "G",
              "CA",
              "PC",
              "O"
            ],
            "type": "string",
            "description": "Type of funding instrument to filter by.",
            "default": ""
          },
          "eligibility": {
            "title": "Eligibility",
            "enum": [
              "",
              "00",
              "01",
              "02",
              "04",
              "05",
              "06",
              "07",
              "08",
              "11",
              "12",
              "13",
              "20",
              "21",
              "22",
              "23",
              "25",
              "99"
            ],
            "type": "string",
            "description": "Eligible applicant type code to filter by.",
            "default": ""
          },
          "status": {
            "title": "Opportunity Status",
            "enum": [
              "",
              "forecasted",
              "posted",
              "closed",
              "archived"
            ],
            "type": "string",
            "description": "Filter by opportunity status.",
            "default": ""
          },
          "fundingCategory": {
            "title": "Funding Category",
            "enum": [
              "",
              "AG",
              "AR",
              "BC",
              "CD",
              "CP",
              "DPR",
              "ED",
              "ELT",
              "EN",
              "ENV",
              "FN",
              "HL",
              "HO",
              "HU",
              "IIJ",
              "IS",
              "ISS",
              "LJL",
              "NR",
              "O",
              "OZ",
              "RD",
              "ST",
              "T"
            ],
            "type": "string",
            "description": "Category of funding activity.",
            "default": ""
          },
          "searches": {
            "title": "Multi-search (portfolio)",
            "type": "array",
            "description": "Run several searches in one scheduled run. Each item is an object with any of: keyword, agency, eligibility, status, fundingInstrument, fundingCategory, name. Every result is tagged with the search name(s) it matched and deduplicated across searches. Example: [{\"name\":\"clean-energy\",\"keyword\":\"renewable energy\",\"agency\":\"DOE\"},{\"name\":\"telehealth\",\"keyword\":\"telehealth\",\"agency\":\"HHS\"}]"
          },
          "agencies": {
            "title": "Agencies (fan-out)",
            "type": "array",
            "description": "Run the base search once per agency code. Combined with Eligibilities / Funding categories below, runs the cross-product (capped at 20 searches).",
            "items": {
              "type": "string"
            }
          },
          "eligibilities": {
            "title": "Eligibilities (fan-out)",
            "type": "array",
            "description": "Run the base search once per eligibility code.",
            "items": {
              "type": "string"
            }
          },
          "fundingCategories": {
            "title": "Funding categories (fan-out)",
            "type": "array",
            "description": "Run the base search once per funding-category code.",
            "items": {
              "type": "string"
            }
          },
          "detailLevel": {
            "title": "Detail level",
            "enum": [
              "search",
              "full"
            ],
            "type": "string",
            "description": "'search' returns the index fields (fast). 'full' enriches every opportunity with award ceiling/floor, cost-sharing, eligible applicant types, funding categories, agency contacts and the synopsis via the keyless detail endpoint (one extra request per opportunity).",
            "default": "search"
          },
          "profile": {
            "title": "Grant-fit profile",
            "type": "object",
            "description": "Score each opportunity against your organization. Object with any of: organizationType (string), topics (array of strings), minAward (number), maxDeadlineDays (number), requiresNoCostShare (boolean). Award / cost-share / eligibility checks require detailLevel='full'. Example: {\"organizationType\":\"nonprofit\",\"topics\":[\"workforce\",\"cybersecurity\"],\"maxDeadlineDays\":90,\"requiresNoCostShare\":true}"
          },
          "onlyClosingWithinDays": {
            "title": "Only closing within N days",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only opportunities whose deadline is within this many days (drops forecasted, undated and closed)."
          },
          "excludeClosingWithinDays": {
            "title": "Exclude closing within N days",
            "minimum": 1,
            "type": "integer",
            "description": "Drop opportunities whose deadline is fewer than this many days away (too soon to prepare a competitive application)."
          },
          "closeDateFrom": {
            "title": "Close date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Keep only opportunities closing on or after this date."
          },
          "closeDateTo": {
            "title": "Close date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Keep only opportunities closing on or before this date."
          },
          "postedDateFrom": {
            "title": "Posted date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Keep only opportunities posted on or after this date."
          },
          "postedDateTo": {
            "title": "Posted date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Keep only opportunities posted on or before this date."
          },
          "watchlistName": {
            "title": "Watchlist name (cross-run monitoring)",
            "type": "string",
            "description": "Name this search to monitor it over time. Each run remembers prior results under this name and flags every opportunity NEW, STATUS_CHANGED, REOPENED, DEADLINE_CHANGED, AWARD_AMOUNT_CHANGED, CONTACT_CHANGED, or UNCHANGED. Leave empty for a one-shot search."
          },
          "emitOnlyChanges": {
            "title": "Emit only changes",
            "type": "boolean",
            "description": "Watchlist mode only: return just the opportunities that are new or materially changed since the last run (skip UNCHANGED). Ideal for scheduled, webhook-driven alerting.",
            "default": false
          },
          "calendarMode": {
            "title": "Build grant calendar",
            "type": "boolean",
            "description": "Watchlist mode only: also emit a 'calendar' record mapping recurring annual programs to their expected release months. Fills in as the watchlist accumulates multi-year history.",
            "default": false
          },
          "includeProgramIntelligence": {
            "title": "Program intelligence",
            "type": "boolean",
            "description": "Emit a 'program' record per CFDA / Assistance Listing number, aggregating its opportunities (agencies, average award, survival metrics). In watchlist mode these accrue cross-run program history (timesObserved, first/latest observed, cycle pattern, award trend) — a proprietary asset that deepens every scheduled run.",
            "default": false
          },
          "outputProfile": {
            "title": "Output detail",
            "enum": [
              "standard",
              "minimal",
              "alert"
            ],
            "type": "string",
            "description": "'standard' returns every field; 'minimal' returns only the decision fields; 'alert' returns a Slack/webhook-ready alert card (title, severity, body).",
            "default": "standard"
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of unique grant opportunities to return (1-1000).",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}