{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Scraper — Federal Contract & Grant Awards",
    "description": "US federal contract and grant awards from USAspending.gov: agency, recipient organisation, amount, dates, NAICS/PSC or assistance listing, place of performance. Filter by keyword, agency, amount, state; flag awards new since your last run. Official API, no login.",
    "version": "0.1",
    "x-build-id": "KjSpqsa7QDh3bXCd7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/northbell~usaspending-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-northbell-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/northbell~usaspending-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-northbell-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/northbell~usaspending-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-northbell-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": {
          "awardType": {
            "title": "Award type",
            "enum": [
              "contracts",
              "idvs",
              "grants",
              "direct-payments",
              "loans",
              "other-assistance"
            ],
            "type": "string",
            "description": "One kind per run, because the source reports different fields for each. Contracts and IDVs have NAICS and PSC codes; grants, direct payments, loans and other assistance have an Assistance Listing number (the old CFDA number).",
            "default": "contracts"
          },
          "keywords": {
            "title": "Keywords (optional)",
            "type": "array",
            "description": "Words or phrases to match against the award (its description and other text fields). One per line; an award that matches any line is returned. A line with several words is searched as a phrase, e.g. \"cloud computing\". Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies (optional)",
            "type": "array",
            "description": "Top-level federal agencies that made the award, one per line: the official name or the abbreviation, e.g. \"Department of Defense\" or \"DOD\", \"NASA\", \"HHS\". An unknown name stops the run before anything is charged. Leave empty for all agencies.",
            "items": {
              "type": "string"
            }
          },
          "subAgencies": {
            "title": "Awarding sub-agencies (optional)",
            "type": "array",
            "description": "Sub-agencies or offices that made the award, one per line, spelled exactly as in the results (awardingSubAgency), e.g. \"Defense Information Systems Agency\". Combined with the agencies above with OR. Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "awardedWithinDays": {
            "title": "Awarded within (days)",
            "minimum": 1,
            "maximum": 7300,
            "type": "integer",
            "description": "Only awards in the last N days, counted by the date basis below. Ignored when you set a start date. Defense (DOD) contract data is published with a delay of about 90 days, so use a longer period for DOD.",
            "default": 30
          },
          "startDate": {
            "title": "Start date (optional)",
            "type": "string",
            "description": "First day to include, as YYYY-MM-DD, e.g. 2026-09-01. Replaces \"Awarded within (days)\". The source cannot search before 2007-10-01."
          },
          "endDate": {
            "title": "End date (optional)",
            "type": "string",
            "description": "Last day to include, as YYYY-MM-DD. Leave empty for today."
          },
          "dateBasis": {
            "title": "What the dates refer to",
            "enum": [
              "new-awards",
              "latest-action",
              "last-modified"
            ],
            "type": "string",
            "description": "\"New awards\" gives awards that began in the period. \"Latest action\" also returns older awards that were modified in it, so the same award can come back with a larger amount.",
            "default": "new-awards"
          },
          "minAmount": {
            "title": "Minimum amount (USD, optional)",
            "minimum": 0,
            "type": "number",
            "description": "Only awards with a total obligation (for loans: face value) of at least this many US dollars."
          },
          "maxAmount": {
            "title": "Maximum amount (USD, optional)",
            "minimum": 0,
            "type": "number",
            "description": "Only awards with a total obligation (for loans: face value) of at most this many US dollars."
          },
          "states": {
            "title": "Place of performance states (optional)",
            "type": "array",
            "description": "Only awards whose work is done in these states, as two-letter codes, one per line: VA, CA, TX, PR, DC … Leave empty for everywhere.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (optional, contracts and IDVs)",
            "type": "array",
            "description": "Only contracts in these industries, 2 to 6 digits, one per line, e.g. 5415 for computer systems design. A shorter code covers its whole branch. Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (optional, contracts and IDVs)",
            "type": "array",
            "description": "Only contracts with these Product and Service Codes, 1 to 4 characters, one per line, e.g. D3 for IT and telecom services or D302. A shorter code covers its whole branch. Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "assistanceListings": {
            "title": "Assistance Listing numbers (optional, grants and loans)",
            "type": "array",
            "description": "Only awards under these federal programs, one per line, in the form 10.331 (the old CFDA numbers). Grants, direct payments, loans and other assistance only.",
            "items": {
              "type": "string"
            }
          },
          "recipients": {
            "title": "Recipient name or UEI (optional)",
            "type": "array",
            "description": "Words from the recipient organisation's name, or its UEI number, one per line. An award matching any line is returned. Awards to individuals never show a name, so they cannot be found this way.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "newest",
              "largest"
            ],
            "type": "string",
            "description": "Which awards you get when more match than \"Maximum awards\". Newest first is what you want for a daily feed.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Maximum awards",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many awards to return. You pay per award returned. With \"Only new\" the Actor reads past the awards you have already seen until it has found this many new ones. Narrow the search with the filters above rather than raising this.",
            "default": 100
          },
          "output": {
            "title": "What to return",
            "enum": [
              "all",
              "new"
            ],
            "type": "string",
            "description": "With \"Only new\", awards you already got in an earlier run of the same search are skipped and not charged. The first run returns everything, because there is nothing to compare with yet.",
            "default": "all"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}