{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Contract Awards Scraper: New Gov Contract Winners",
    "description": "Returns new US federal contract awards from USAspending.gov: winning company, UEI, city and state, awarding agency, amount, NAICS, PSC, description, award date and award page link. Filter by date, amount, NAICS, state, agency and keyword. Grants and IDVs optional. Company-level data only.",
    "version": "1.0",
    "x-build-id": "HPgiJDJzYk1HOY6UZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/agents001~us-federal-contract-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-agents001-us-federal-contract-awards",
        "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/agents001~us-federal-contract-awards/runs": {
      "post": {
        "operationId": "runs-sync-agents001-us-federal-contract-awards",
        "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/agents001~us-federal-contract-awards/run-sync": {
      "post": {
        "operationId": "run-sync-agents001-us-federal-contract-awards",
        "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": {
          "awardTypes": {
            "title": "Award types",
            "type": "array",
            "description": "Contracts are purchase orders, delivery orders, BPA calls and definitive contracts. IDVs are new contract vehicles such as IDIQs, GSA schedules and blanket purchase agreements (their amount is often 0 until orders are placed). Grants are block, formula and project grants and cooperative agreements; they reach USAspending several weeks after signing, so use a window of 45 days or more for grants.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "grants"
              ],
              "enumTitles": [
                "Contracts",
                "IDVs (contract vehicles)",
                "Grants and cooperative agreements"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "daysBack": {
            "title": "Awarded in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only awards whose first (base) transaction is dated within this many days before the end date. Ignored when a start date is set.",
            "default": 7
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Optional fixed start date (YYYY-MM-DD), for example 2026-10-01. Earliest allowed: 2007-10-01."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Optional fixed end date (YYYY-MM-DD). Leave empty for today."
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards worth at least this many US dollars. 0 or empty means no minimum."
          },
          "maxAwardAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards worth at most this many US dollars. 0 or empty means no maximum."
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Only awards whose NAICS industry code starts with any of these, for example 54 (professional services), 5415 (computer systems design) or 236220. Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "Product or service codes (PSC)",
            "type": "array",
            "description": "Only awards whose PSC starts with any of these, for example D (IT services), R425 or 7030. Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "US states",
            "type": "array",
            "description": "Two-letter state codes, for example VA, TX, CA. Matched against the recipient's address or the place of performance (see the next field).",
            "items": {
              "type": "string"
            }
          },
          "locationField": {
            "title": "Match states against",
            "enum": [
              "recipient",
              "placeOfPerformance"
            ],
            "type": "string",
            "description": "Use the winning company's address or where the work is done.",
            "default": "recipient"
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Department or sub agency names exactly as USAspending writes them, for example 'Department of Veterans Affairs', 'General Services Administration', 'Department of the Navy'.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Awards matching any of these words or phrases in the description, recipient, codes and other text fields. For example 'cybersecurity', 'software', 'roofing'.",
            "items": {
              "type": "string"
            }
          },
          "recipientNames": {
            "title": "Recipient name or UEI",
            "type": "array",
            "description": "Only awards to companies whose name, UEI or DUNS matches any of these, for example 'Booz Allen' or a 12-character UEI. Useful to watch competitors or accounts.",
            "items": {
              "type": "string"
            }
          },
          "businessesOnly": {
            "title": "Businesses only",
            "type": "boolean",
            "description": "Leave out universities, nonprofits and government bodies; keep only recipients USAspending classifies as businesses.",
            "default": false
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "amount",
              "newest"
            ],
            "type": "string",
            "description": "Largest awards first, or most recently awarded first. Matters when Max records cuts the list.",
            "default": "amount"
          },
          "onlyNew": {
            "title": "Only awards not seen in previous runs",
            "type": "boolean",
            "description": "Remember which awards were already returned for these filters and only return awards that are new since then. The first run returns everything that matches. Ideal for scheduled daily runs. The date window, order and Max records are not part of the memory, so a rolling window keeps the same history.",
            "default": false
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 0,
            "maximum": 150000,
            "type": "integer",
            "description": "Stop after this many award records in total, across all award types (contracts first, then IDVs, then grants). 0 means no limit (up to 50,000 per award type). You pay per record returned.",
            "default": 1000
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-zA-Z0-9-]{1,63}$",
            "type": "string",
            "description": "Only used when 'Only awards not seen in previous runs' is on. Name of the key-value store in your account that keeps the ids of awards already returned. Each different set of filters gets its own record inside it. Change it only to keep separate histories. If a run reports that it cannot open the store, enter a different name here.",
            "default": "agents001-us-federal-contract-awards-state"
          },
          "requestDelaySecs": {
            "title": "Delay between requests",
            "minimum": 0.2,
            "maximum": 10,
            "type": "number",
            "description": "Minimum seconds between requests to the USAspending API. Keep this polite.",
            "default": 0.5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}