{
  "openapi": "3.0.1",
  "info": {
    "title": "US Federal Grants Monitor",
    "version": "0.1",
    "x-build-id": "WBdIaPzaae02G2HuV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lowlanddata~grants-gov-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lowlanddata-grants-gov-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/lowlanddata~grants-gov-monitor/runs": {
      "post": {
        "operationId": "runs-sync-lowlanddata-grants-gov-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/lowlanddata~grants-gov-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-lowlanddata-grants-gov-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text terms searched across the opportunity. Leave empty to watch everything matching the other filters.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agency codes",
            "type": "array",
            "description": "Grants.gov agency codes, e.g. USDA, DOD, DOC, ED, DOE. Every run logs the codes valid for your search with their counts - copy them from there rather than guessing.",
            "items": {
              "type": "string"
            }
          },
          "eligibilities": {
            "title": "Eligibility codes",
            "type": "array",
            "description": "Applicant-type codes, e.g. 02 for city or township governments, 25 for others. The run log lists the codes available for your search.",
            "items": {
              "type": "string"
            }
          },
          "fundingCategories": {
            "title": "Funding category codes",
            "type": "array",
            "description": "Category codes such as ACA, ENV or HL. Listed in the run log for your search.",
            "items": {
              "type": "string"
            }
          },
          "fundingInstruments": {
            "title": "Funding instruments",
            "type": "array",
            "description": "CA (cooperative agreement), G (grant), PC (procurement contract) or O (other).",
            "items": {
              "type": "string"
            }
          },
          "oppStatuses": {
            "title": "Opportunity statuses",
            "type": "array",
            "description": "Which statuses to watch. Default is posted plus forecasted - the two a bidder can act on.",
            "items": {
              "type": "string",
              "enum": [
                "posted",
                "forecasted",
                "closed",
                "archived"
              ]
            },
            "default": [
              "posted",
              "forecasted"
            ]
          },
          "newestFirst": {
            "title": "Newest first",
            "type": "boolean",
            "description": "Fetch newest postings first. Useful on the free plan: the 25-item cap then keeps the most recent opportunities instead of arbitrary ones.",
            "default": false
          },
          "scrapeDetails": {
            "title": "Fetch the full synopsis",
            "type": "boolean",
            "description": "Adds the description, award ceiling and floor, cost-sharing flag and response date. Costs one extra request per alerted opportunity, so it is off by default. Contact names, emails and phone numbers are never extracted, with or without this setting.",
            "default": false
          },
          "alertOn": {
            "title": "Alert on",
            "enum": [
              "new",
              "new-and-updated"
            ],
            "type": "string",
            "description": "\"new\" alerts only on opportunities never seen before. \"new-and-updated\" also alerts when a seen opportunity changes status or moves its deadline.",
            "default": "new"
          },
          "emitBaseline": {
            "title": "Emit the first-run baseline",
            "type": "boolean",
            "description": "On the very first run, push everything currently matching. Turn off to start silent and receive only what appears afterwards.",
            "default": true
          },
          "maxItems": {
            "title": "Max results per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on rows pushed in one run. Anything over the cap alerts on the next run instead.",
            "default": 500
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store holding what this monitor has already seen. Use a different name to run several independent watch profiles.",
            "default": "grants-gov-monitor-state"
          },
          "resetState": {
            "title": "Reset the monitor state",
            "type": "boolean",
            "description": "Discard what this profile has seen and start a fresh baseline. Use after changing filters if you want the new profile re-baselined.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The grants.gov API is public and unauthenticated; the default Apify proxy is plenty.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}