{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Contract Opportunities + Incumbent Intel",
    "description": "New and recently posted U.S. federal contract opportunities from the official public SAM.gov extract, optionally joined to the last related USAspending award. No contact PII. No API key required.",
    "version": "0.1",
    "x-build-id": "thdJuWwrxx8127fQE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cherry_hippopotamus~federal-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cherry_hippopotamus-federal-contract-opportunities",
        "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/cherry_hippopotamus~federal-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-cherry_hippopotamus-federal-contract-opportunities",
        "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/cherry_hippopotamus~federal-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-cherry_hippopotamus-federal-contract-opportunities",
        "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": "Match if any keyword appears in the title, description, or solicitation number (case-insensitive). Leave empty to skip the keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes or prefixes",
            "type": "array",
            "description": "Match notices whose NAICS starts with any of these values (for example 5415 matches 541511).",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC / classification codes or prefixes",
            "type": "array",
            "description": "Optional product/service classification prefixes.",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "Optional set-aside codes from the extract (for example SBA, 8A, SDVOSBC). Case-insensitive exact match on the code.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Two-letter US state or territory codes. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies or departments",
            "type": "array",
            "description": "Match if any of these substrings appear in the department, sub-tier, or office name.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Limit to these notice types. Leave empty for all types in the extract.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "combined",
                "sources_sought",
                "presolicitation",
                "award",
                "special_notice",
                "justification",
                "surplus",
                "intent_to_bundle",
                "modification"
              ]
            }
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Look back this many days from today (America/Denver). Ignored when dateFrom is set. Capped at 90.",
            "default": 7
          },
          "dateFrom": {
            "title": "Posted from (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional inclusive start date. The window cannot exceed 90 days."
          },
          "dateTo": {
            "title": "Posted to (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional inclusive end date. Defaults to today."
          },
          "openForResponseOnly": {
            "title": "Open for response only",
            "type": "boolean",
            "description": "When true, keep only notices that are still marked Active and have a response deadline today or later (or no deadline).",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "delta",
              "full"
            ],
            "type": "string",
            "description": "delta returns only notices not seen in the named state store. full returns every match in the window (still records state so a later delta run can skip them).",
            "default": "delta"
          },
          "source": {
            "title": "Source",
            "enum": [
              "extract",
              "api"
            ],
            "type": "string",
            "description": "extract (default) reads the official public SAM.gov Contract Opportunities full CSV — no API key. api calls the Get Opportunities v2 search and requires samApiKey. Personal SAM.gov accounts are typically limited to about 10 API requests per day.",
            "default": "extract"
          },
          "samApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Required only when source is api. Create a key on your SAM.gov Account Details page. This field is secret and is never written to the dataset, logs, or telemetry. Do not use a login-walled or non-public key to pull restricted data."
          },
          "enrichIncumbent": {
            "title": "Attach incumbent intel (USAspending)",
            "type": "boolean",
            "description": "When true, look up a recent related contract award on the public USAspending API (no key) and attach incumbent name, award id, and amount. The incumbent-intel event is charged only when a record is actually attached. Off in the Store prefill to keep the daily test short.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on billable opportunity rows per run. The extract is streamed and stopped once this cap (and the date window) is satisfied — the Actor does not download the entire ~214 MB file on a typical run.",
            "default": 1000
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Apify key-value store used to remember notice ids between delta runs.",
            "default": "federal-contract-opportunities-state"
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Key inside the state store. Advanced; leave the default unless you run isolated snapshots.",
            "default": "snapshot"
          },
          "disableTelemetry": {
            "title": "Disable telemetry",
            "type": "boolean",
            "description": "Turn off anonymous PostHog usage events (status, sanitized input, error counts). The public ingest key cannot query or modify your data.",
            "default": 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}