{
  "openapi": "3.0.1",
  "info": {
    "title": "US Federal Contracts: USAspending Awards, SAM.gov Opportunities",
    "description": "Contract awards USA and federal procurement data from USAspending (no key) by recipient name or UEI, agency, NAICS, state, date range, amount: US government contracts Excel, federal grants. SAM.gov opportunities and SAM.gov data (free SAM.gov key). Alerts, SAM.gov export, federal contracts export.",
    "version": "0.1",
    "x-build-id": "DUvpx0bbiWykoZY9e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/euroscrape~us-federal-contracts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-euroscrape-us-federal-contracts",
        "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/euroscrape~us-federal-contracts/runs": {
      "post": {
        "operationId": "runs-sync-euroscrape-us-federal-contracts",
        "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/euroscrape~us-federal-contracts/run-sync": {
      "post": {
        "operationId": "run-sync-euroscrape-us-federal-contracts",
        "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": {
          "daysBack": {
            "title": "📅 Days back",
            "minimum": 1,
            "maximum": 3660,
            "type": "integer",
            "description": "Awards with an action (signature, modification, payment) in the last N days. USAspending publishes contracts about 3 days after the action, grants later. Ignored if 'From date' is set.",
            "default": 7
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "First action date to include (YYYY-MM-DD). Overrides 'Days back'."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Last action date to include (YYYY-MM-DD). Default: today."
          },
          "newAwardsOnly": {
            "title": "New awards only",
            "type": "boolean",
            "description": "Keep only awards whose FIRST action is in the period (new contracts, not modifications of older ones). Slower on USAspending's side: use windows of 30 days or less.",
            "default": false
          },
          "awardTypes": {
            "title": "🏛️ Award types",
            "type": "array",
            "description": "Families of federal awards to read. One search per family.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idv",
                "grants",
                "loans",
                "direct_payments",
                "other"
              ],
              "enumTitles": [
                "Contracts (definitive, purchase orders, delivery orders, BPA calls)",
                "Indefinite delivery vehicles (IDV, GWAC, BOA…)",
                "Grants",
                "Loans",
                "Direct payments",
                "Other financial assistance"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "keywords": {
            "title": "🔎 Keywords",
            "type": "array",
            "description": "Words searched by USAspending in the award description, recipient name and identifiers, e.g. cloud, cybersecurity, janitorial, drone. Also sent to SAM.gov as title words.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop rows whose description, recipient or title contains one of these words.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes, 2 to 6 digits, e.g. 541512 (computer systems design), 5415 (all computer services), 23 (construction).",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product or service codes, e.g. D302 (IT systems development), R425 (engineering support), S201 (custodial). Awards only.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier agency names as on USAspending, e.g. Department of Defense, Department of Veterans Affairs, General Services Administration, National Aeronautics and Space Administration.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "🗺️ Place of performance (states)",
            "type": "array",
            "description": "Where the work is performed: two-letter codes or names, e.g. TX, Virginia, DC. Empty = everywhere.",
            "items": {
              "type": "string"
            }
          },
          "recipientStates": {
            "title": "Recipient states",
            "type": "array",
            "description": "Where the recipient company is registered (SAM registration address). Awards only.",
            "items": {
              "type": "string"
            }
          },
          "recipientSearch": {
            "title": "Recipient name or UEI",
            "type": "array",
            "description": "Find the awards of given companies: part of the name or the UEI, e.g. Lockheed, Booz Allen. Awards only.",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "💵 Minimum amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep awards of at least this amount (total obligated). Awards only."
          },
          "maxAmount": {
            "title": "Maximum amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep awards up to this amount, e.g. 250000 for small purchases."
          },
          "setAsides": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "Small-business set-asides, e.g. SBA (total small business), 8A, SDVOSBC (service-disabled veteran), WOSB (women-owned), HZC (HUBZone). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort awards by",
            "enum": [
              "amount",
              "date",
              "start"
            ],
            "type": "string",
            "description": "Order in which awards are read and delivered; matters when 'Maximum rows' cuts the list.",
            "default": "amount"
          },
          "includeOpportunities": {
            "title": "📣 Also read SAM.gov opportunities (needs a key)",
            "type": "boolean",
            "description": "Adds the solicitations and notices posted on SAM.gov in the period, filtered by your keywords, NAICS (one), state (one) and set-aside (one). Requires your free SAM.gov Public API Key (see below).",
            "default": false
          },
          "samGovApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Your personal SAM.gov Public API Key (free): sign in at sam.gov with a login.gov account, then Profile → Account Details → Public API Key (one-time verification). A key from api.data.gov does NOT work on SAM.gov. New non-federal accounts have a small daily request quota at first. Used only for the SAM.gov calls of your run."
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "SAM.gov notice types to include.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "combined",
                "presolicitation",
                "sources_sought",
                "special_notice",
                "award_notice",
                "justification",
                "intent_to_bundle"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined synopsis/solicitation",
                "Presolicitation",
                "Sources sought",
                "Special notice",
                "Award notice",
                "Justification",
                "Intent to bundle"
              ]
            },
            "default": [
              "solicitation",
              "combined",
              "presolicitation"
            ]
          },
          "includeSummary": {
            "title": "Include summaries",
            "type": "boolean",
            "description": "Adds one free 'summary' row per award family (count, total and median amount, top agencies, top recipients, top states, NAICS, set-aside share) and one for opportunities.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many awards and opportunities (summary rows are not counted). The first 20 rows of every run are free.",
            "default": 500
          },
          "monitorName": {
            "title": "🔔 Monitor name (new awards only)",
            "type": "string",
            "description": "Give your saved search a name and schedule it: the first run is the baseline, every later run returns only awards and opportunities not delivered before (changeType: \"new\")."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Get a message for each new award or opportunity. Create a bot with @BotFather and paste its token."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Your chat or group ID (send /start to the bot first)."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Channel settings → Integrations → Webhooks."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Slack app → Incoming Webhooks."
          },
          "webhookUrl": {
            "title": "Webhook URL (Make, Zapier, n8n, Google Sheets)",
            "type": "string",
            "description": "One POST per run with {\"count\": N, \"items\": [...]} for the new rows only."
          },
          "maxNotifications": {
            "title": "Maximum messages per run",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Telegram, Discord and Slack messages per run (the webhook always receives everything).",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}