{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards Scraper",
    "description": "Extract US federal contracts, IDVs, grants and loans from USAspending.gov. Filter by agency, NAICS, PSC, state, keyword and award size.",
    "version": "0.1",
    "x-build-id": "MMZmsaim3PTMuXKRn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bercikgroup~usaspending-federal-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bercikgroup-usaspending-federal-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/bercikgroup~usaspending-federal-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bercikgroup-usaspending-federal-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/bercikgroup~usaspending-federal-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bercikgroup-usaspending-federal-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",
        "required": [
          "awardCategories"
        ],
        "properties": {
          "awardCategories": {
            "title": "Award categories",
            "type": "array",
            "description": "Which kinds of federal awards to pull. Contracts and IDVs are the standard choice for government-contracting lead generation.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "grants",
                "direct_payments",
                "loans",
                "other"
              ],
              "enumTitles": [
                "Contracts",
                "IDVs (indefinite delivery vehicles)",
                "Grants",
                "Direct payments",
                "Loans",
                "Other financial assistance"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Beginning of the award action period (YYYY-MM-DD). Defaults to 90 days ago."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "End of the award action period (YYYY-MM-DD). Defaults to today."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text search across award descriptions and recipient names, e.g. \"cybersecurity\", \"logistics support\".",
            "items": {
              "type": "string"
            }
          },
          "awardingAgency": {
            "title": "Awarding agency",
            "type": "string",
            "description": "Top-tier agency that issued the award, spelled exactly as USAspending does, e.g. \"Department of Defense\", \"Department of Veterans Affairs\"."
          },
          "fundingAgency": {
            "title": "Funding agency",
            "type": "string",
            "description": "Top-tier agency that funded the award. Often the same as the awarding agency."
          },
          "recipientSearch": {
            "title": "Recipient name contains",
            "type": "array",
            "description": "Filter to recipients whose name matches these terms, e.g. \"Booz\", \"Leidos\".",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes to include, e.g. 541512 (computer systems design), 236220 (commercial construction).",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product & Service Codes to include, e.g. R425 (engineering support), D302 (IT systems development).",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter US state codes where the work is performed, e.g. VA, TX, CA.",
            "items": {
              "type": "string"
            }
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "type": "integer",
            "description": "Skip awards below this dollar value. Useful for filtering out micro-purchases."
          },
          "maxAwardAmount": {
            "title": "Maximum award amount (USD)",
            "type": "integer",
            "description": "Skip awards above this dollar value."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "award_amount",
              "last_modified",
              "start_date"
            ],
            "type": "string",
            "description": "Which field to order results by.",
            "default": "award_amount"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Direction to apply to the sort field.",
            "default": "desc"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on how many award records to return. You are charged per record returned.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}