{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Contracts & Grants Scraper",
    "description": "Find who wins federal contracts, grants and loans: recipient company, UEI, address, award amount, agency, dates, NAICS/PSC codes and place of performance from the official USAspending.gov API. No key or proxy. $1.50 per 1,000 awards.",
    "version": "0.2",
    "x-build-id": "Aa0mhpVeDy82ZbhRq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyharvest~usaspending-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyharvest-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/tidyharvest~usaspending-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidyharvest-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/tidyharvest~usaspending-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidyharvest-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": {
          "keywords": {
            "title": "Keywords (match any)",
            "type": "array",
            "description": "Search award descriptions, recipients and codes for any of these words (e.g. `cybersecurity`, `drone`, `janitorial`). At least 3 characters each. Empty = all awards matching the other filters.",
            "items": {
              "type": "string"
            }
          },
          "awardIds": {
            "title": "Award IDs (lookup)",
            "type": "array",
            "description": "Look up specific awards by PIID, FAIN or URI (e.g. `N0002417C2100`), at any date unless you set 'From date'. Combine with other filters or use alone.",
            "items": {
              "type": "string"
            }
          },
          "awardTypes": {
            "title": "Award types",
            "type": "array",
            "description": "Which kinds of federal awards to return. Each type is searched separately and Max awards is shared evenly between them.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "grants",
                "loans",
                "directPayments",
                "other"
              ],
              "enumTitles": [
                "Contracts (definitive, purchase & delivery orders)",
                "IDVs (GWACs, IDIQs, BPAs, schedules)",
                "Grants & cooperative agreements",
                "Loans",
                "Direct payments",
                "Other financial assistance"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Awards with activity on or after this date (YYYY-MM-DD). Empty = 365 days ago. Earliest supported: 2007-10-01."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Awards with activity up to this date (YYYY-MM-DD). Empty = today."
          },
          "newAwardsOnly": {
            "title": "New awards only",
            "type": "boolean",
            "description": "Only awards first made inside the date range (skip older awards that were just modified). Best for finding who won recently.",
            "default": false
          },
          "agency": {
            "title": "Awarding agency",
            "type": "string",
            "description": "Department name or abbreviation (`Department of Defense`, `DOD`, `NASA`, `HHS`) or a sub-agency as USAspending names it (`Department of the Navy`, `National Institutes of Health`). Several: separate with commas (`NASA, DOE`)."
          },
          "fundingAgencies": {
            "title": "Funding agencies",
            "type": "array",
            "description": "Agencies paying for the award, when it differs from the one awarding it (e.g. a GSA contract funded by `Department of Veterans Affairs`). Same names as above.",
            "items": {
              "type": "string"
            }
          },
          "recipients": {
            "title": "Recipients (companies) or UEIs",
            "type": "array",
            "description": "Only awards to recipients whose name or UEI contains any of these (e.g. `Booz Allen`, `Palantir`, a 12-character UEI). Track several competitors or prospects in one run.",
            "items": {
              "type": "string"
            }
          },
          "recipient": {
            "title": "Recipient (single, optional)",
            "type": "string",
            "description": "One recipient name or UEI; kept for older inputs. Use 'Recipients' above for several."
          },
          "naics": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes, 2 to 6 digits (e.g. `541512` computer systems design, `5415` for the whole group). Mostly applies to contracts.",
            "items": {
              "type": "string"
            }
          },
          "psc": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product and Service Codes (e.g. `D399`, `R425`). Contracts only.",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "title": "Place of performance (US states)",
            "type": "array",
            "description": "Two-letter state codes where the work is done (e.g. `CA`, `TX`, `DC`).",
            "items": {
              "type": "string"
            }
          },
          "recipientTypes": {
            "title": "Recipient business types",
            "type": "array",
            "description": "Only awards to recipients of these types (as the recipient registered them). Several = any of them.",
            "items": {
              "type": "string",
              "enum": [
                "small_business",
                "other_than_small_business",
                "woman_owned_business",
                "women_owned_small_business",
                "minority_owned_business",
                "small_disadvantaged_business",
                "8a_program_participant",
                "historically_underutilized_business_firm",
                "veteran_owned_business",
                "service_disabled_veteran_owned_business",
                "nonprofit",
                "higher_education",
                "government"
              ],
              "enumTitles": [
                "Small business",
                "Other than small business",
                "Woman-owned business",
                "Women-owned small business (WOSB)",
                "Minority-owned business",
                "Small disadvantaged business",
                "8(a) program participant",
                "HUBZone firm",
                "Veteran-owned business",
                "Service-disabled veteran-owned (SDVOSB)",
                "Nonprofit",
                "Higher education",
                "Government"
              ]
            }
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards worth at least this much. Empty = no minimum."
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards worth at most this much. Empty = no maximum."
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop awards whose description or recipient name contains any of these. Applied before billing.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "amount",
              "date"
            ],
            "type": "string",
            "description": "Largest awards first, or most recent award date first.",
            "default": "amount"
          },
          "includeDetails": {
            "title": "Include award details",
            "type": "boolean",
            "description": "Adds parent company, business categories (small business, woman-owned...), potential total value, set-aside, competition and number of offers, solicitation id and top officers. One extra request per award, so slower.",
            "default": false
          },
          "maxItems": {
            "title": "Max awards",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum awards for the whole run (also caps your cost). Up to 5,000.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}