{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Awards API — Federal Contract Awards & Grants",
    "description": "Export federal contract awards, IDVs and grants from USAspending.gov to JSON/CSV — no API key or account. Filter by keyword, NAICS, awarding agency, recipient, place-of-performance state and date range. $1 per 1,000 awards, platform usage included.",
    "version": "1.4",
    "x-build-id": "QLZDgB2lhVPSRXfGM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/samgov-tools~usaspending-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-samgov-tools-usaspending-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/samgov-tools~usaspending-awards/runs": {
      "post": {
        "operationId": "runs-sync-samgov-tools-usaspending-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/samgov-tools~usaspending-awards/run-sync": {
      "post": {
        "operationId": "run-sync-samgov-tools-usaspending-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": {
          "keywords": {
            "title": "Award search keywords",
            "type": "string",
            "description": "Filter awards by search text; use a string with commas between multiple keywords. Default: omitted, no keyword filter. Use to target a product or service. Example: \"software,cloud\"."
          },
          "naics": {
            "title": "NAICS industry codes",
            "type": "string",
            "description": "Filter by industry using a string of comma-separated NAICS prefixes, each 2–6 digits. Default: omitted, no NAICS filter. Use for industry-specific searches. Example: \"541512,541511\"."
          },
          "agency": {
            "title": "Awarding agency name",
            "type": "string",
            "description": "Filter by the exact official awarding toptier agency name as a string. Default: omitted, all agencies. Use to research a specific federal buyer. Example: \"Department of Defense\"."
          },
          "recipientName": {
            "title": "Recipient name or identifier",
            "type": "string",
            "description": "Search recipient names and identifiers using a text string. Default: omitted, all recipients. Use to research an award recipient or incumbent. Example: \"LOCKHEED MARTIN\"."
          },
          "awardDateFrom": {
            "title": "Award activity start date",
            "type": "string",
            "description": "Set the inclusive window start as YYYY-MM-DD or MM/dd/yyyy, no earlier than 2007-10-01. Default: 29 days before awardDateTo. Use for historical searches. Matches activity unless newAwardsOnly is true. Example: \"2026-01-01\"."
          },
          "awardDateTo": {
            "title": "Award activity end date",
            "type": "string",
            "description": "Set the inclusive window end as YYYY-MM-DD or MM/dd/yyyy, on or after awardDateFrom. Default: today UTC. Use to bound a historical search. Matches activity unless newAwardsOnly is true. Example: \"2026-01-31\"."
          },
          "newAwardsOnly": {
            "title": "Only newly started awards",
            "type": "boolean",
            "description": "Set a JSON boolean to restrict the date window to award base/start dates using the API new_awards_only date_type. Default: false, which matches award activity and can include older awards with later actions. Use true for new-win lists. Example: true.",
            "default": false
          },
          "state": {
            "title": "Place of performance state",
            "type": "string",
            "description": "Filter place of performance using a two-letter US state, territory, or military code; lowercase is accepted. Default: omitted, no location filter. Use to target where work takes place. Example: \"VA\"."
          },
          "awardType": {
            "title": "Award category",
            "enum": [
              "contracts",
              "idvs",
              "grants"
            ],
            "type": "string",
            "description": "Choose one string: contracts, idvs (indefinite delivery vehicles), or grants. Default: \"contracts\". Use to switch the award category; grants omit contract-only NAICS/PSC output values. Example: \"grants\".",
            "default": "contracts"
          },
          "maxItems": {
            "title": "Maximum awards to return",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit the number of awards stored using a JSON integer from 1 to 10000. Default: 10. Use a smaller value for previews or a larger value for exports; charge limits may stop earlier. Example: 25.",
            "default": 10
          },
          "pageSize": {
            "title": "API results per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Set the USAspending API page size using a JSON integer from 1 to 100. Default: 100. Use a smaller value when smaller API batches are useful; maxItems still caps stored awards. Example: 50.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}