{
  "openapi": "3.0.1",
  "info": {
    "title": "US Federal Contract Awards: Winners & Amounts (USAspending)",
    "description": "Who won US federal contracts and for how much, from the official USAspending.gov API. Filter by keyword, NAICS, PSC, agency, winner, state, dates and amount. Competition and number of offers included. Optional SAM.gov notices with your own key.",
    "version": "0.1",
    "x-build-id": "zGoZsTCEi7he331dh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dottti~us-federal-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dottti-us-federal-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/dottti~us-federal-awards/runs": {
      "post": {
        "operationId": "runs-sync-dottti-us-federal-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/dottti~us-federal-awards/run-sync": {
      "post": {
        "operationId": "run-sync-dottti-us-federal-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": {
          "mode": {
            "title": "Data source",
            "enum": [
              "awards",
              "opportunities"
            ],
            "type": "string",
            "description": "awards: federal awards from USAspending.gov (who won, for how much). No key needed. opportunities: contract notices from SAM.gov (solicitations, award notices). Needs your own free SAM.gov API key below.",
            "default": "awards"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to search for. USAspending.gov matches them against the award description, recipient and other text fields (at least 3 characters each; an award matches if any keyword matches). In SAM.gov mode they are matched against the notice title. Leave empty for every award the other filters allow.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes, 2 to 6 digits. A short code matches every code under it, for example 5415 matches 541511 and 541512. Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (product or service)",
            "type": "array",
            "description": "Product and Service Codes, for example D (all IT services), DA01 or R425. Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Agency names or abbreviations, for example DOD, Department of Veterans Affairs, NASA, or a sub-agency such as Department of the Army. A part of a name matches every agency containing it; the log shows which agencies were used.",
            "items": {
              "type": "string"
            }
          },
          "agencyType": {
            "title": "Agency role",
            "enum": [
              "awarding",
              "funding"
            ],
            "type": "string",
            "description": "awarding: the agency that signed the award (usual). funding: the agency that pays for it.",
            "default": "awarding"
          },
          "recipients": {
            "title": "Recipient (winner) name or UEI",
            "type": "array",
            "description": "Company names or 12-character UEIs, for example a competitor. Matches part of the name.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter US state codes where the work is done, for example VA, MD, DC.",
            "items": {
              "type": "string"
            }
          },
          "awardTypes": {
            "title": "Award types",
            "type": "array",
            "description": "Contracts are the default. IDVs are umbrella vehicles (GWACs, BPAs, IDIQs) that orders are placed under. Grants, loans, direct payments and other assistance are also available. Each type is searched in turn.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "grants",
                "direct_payments",
                "loans",
                "other"
              ],
              "enumTitles": [
                "Contracts (definitive contracts, purchase orders, delivery and task orders)",
                "IDVs (IDIQs, GWACs, BPAs, FSS)",
                "Grants",
                "Direct payments",
                "Loans",
                "Other financial assistance"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Start of the date range, YYYY-MM-DD. Leave empty for 90 days ago (30 days ago in SAM.gov mode). USAspending.gov searches start at 2007-10-01."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "End of the date range, YYYY-MM-DD. Leave empty for today."
          },
          "dateType": {
            "title": "Date range applies to",
            "enum": [
              "signed",
              "activity",
              "modified"
            ],
            "type": "string",
            "description": "signed: awards first signed in the range (new awards). activity: awards with any action in the range, including modifications and new obligations on older awards. modified: awards whose record was last changed in the range.",
            "default": "signed"
          },
          "minAmount": {
            "title": "Minimum amount ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with at least this amount obligated, in US dollars."
          },
          "maxAmount": {
            "title": "Maximum amount ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with at most this amount obligated, in US dollars."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "amount",
              "newest",
              "recentlyModified"
            ],
            "type": "string",
            "description": "amount: largest awards first. newest: most recently signed first (reads at most 10,000 awards per award type; narrow the dates for more). recentlyModified: most recently updated records first.",
            "default": "amount"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many awards (or SAM.gov notices). This also caps the cost of a run.",
            "default": 50
          },
          "includeDetails": {
            "title": "Include competition details",
            "type": "boolean",
            "description": "Adds total value (base and all options), competition (full and open, sole source, set-aside), number of offers received, pricing type, parent contract and recipient business categories. Takes one extra request per award. Turn off for faster, larger pulls of search fields only.",
            "default": true
          },
          "detailConcurrency": {
            "title": "Parallel detail lookups",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many award detail requests run at once (1 to 8). The default is polite to USAspending.gov.",
            "default": 4
          },
          "samApiKey": {
            "title": "SAM.gov API key (opportunities mode only)",
            "type": "string",
            "description": "Your own free public API key from sam.gov (sign in, Account Details, API key). Only used in SAM.gov mode, sent only to api.sam.gov, never written to the dataset or log. Keys without a SAM.gov role have a small daily request limit; each request returns up to 1,000 notices."
          },
          "samNoticeTypes": {
            "title": "SAM.gov notice types",
            "type": "array",
            "description": "SAM.gov mode only. Award Notice is the default. One request is made per type.",
            "items": {
              "type": "string",
              "enum": [
                "a",
                "o",
                "k",
                "p",
                "r",
                "s",
                "u",
                "i",
                "g"
              ],
              "enumTitles": [
                "Award Notice",
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Justification (J&A)",
                "Intent to Bundle Requirements (DoD-Funded)",
                "Sale of Surplus Property"
              ]
            },
            "default": [
              "a"
            ]
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}