{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Awards Scraper",
    "description": "An pulls structured U.S. federal spending records (contracts, grants, loans, and IDVs) from the USAspending API, filtering by agency, date range, recipient, location, or industry codes. It returns paginated award records with financial details and links to each award page.",
    "version": "0.0",
    "x-build-id": "IPkPFzEM5FwUEocfI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moving_beacon-owner1~usaspending-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moving_beacon-owner1-usaspending-awards-scraper",
        "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/moving_beacon-owner1~usaspending-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-moving_beacon-owner1-usaspending-awards-scraper",
        "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/moving_beacon-owner1~usaspending-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-moving_beacon-owner1-usaspending-awards-scraper",
        "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": {
          "awardCategory": {
            "title": "Award category",
            "enum": [
              "contracts",
              "assistance",
              "idvs"
            ],
            "type": "string",
            "description": "Which family of awards to search. Sets the default award_type_codes (override below if needed).",
            "default": "contracts"
          },
          "awardTypeCodes": {
            "title": "Award type codes (override)",
            "type": "array",
            "description": "Explicit USAspending award_type_codes. Leave empty to use the category default. E.g. [\"A\",\"B\"] for definitive/purchase-order contracts.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Time period start (YYYY-MM-DD)",
            "type": "string",
            "description": "Start of the action-date window (required by the API). Default = start of FY2025.",
            "default": "2024-10-01"
          },
          "endDate": {
            "title": "Time period end (YYYY-MM-DD)",
            "type": "string",
            "description": "End of the action-date window. Default = end of FY2025.",
            "default": "2025-09-30"
          },
          "awardingAgency": {
            "title": "Awarding agency (toptier name)",
            "type": "string",
            "description": "Exact toptier agency name. E.g. \"Department of Defense\", \"Department of Homeland Security\"."
          },
          "recipientSearchText": {
            "title": "Recipient contains",
            "type": "string",
            "description": "Recipient name search. E.g. \"Lockheed\"."
          },
          "keywords": {
            "title": "Keyword",
            "type": "string",
            "description": "Full-text keyword filter across award fields."
          },
          "placeOfPerformanceState": {
            "title": "Place of performance state",
            "type": "string",
            "description": "2-letter state code for place of performance. E.g. \"VA\"."
          },
          "naicsCode": {
            "title": "NAICS code",
            "type": "string",
            "description": "Industry code (contracts only). E.g. \"541512\"."
          },
          "pscCode": {
            "title": "Product/Service code (PSC)",
            "type": "string",
            "description": "PSC code (contracts only). E.g. \"D302\"."
          },
          "fields": {
            "title": "Columns to return (override)",
            "type": "array",
            "description": "USAspending field names to request. Leave empty for a sensible default set. Invalid names cause an API error.",
            "items": {
              "type": "string"
            }
          },
          "maxRecords": {
            "title": "Max records",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many awards (paginated 100 per request)."
          },
          "impersonate": {
            "title": "Browser fingerprint (curl_cffi)",
            "enum": [
              "chrome",
              "chrome124",
              "chrome131",
              "safari17_0",
              "edge101"
            ],
            "type": "string",
            "description": "TLS/JA3 fingerprint to impersonate. The API is open, so this is for consistency.",
            "default": "chrome"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "USAspending is a public .gov API; a proxy is optional, useful for large/scheduled runs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}