{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Contract Market Map — Who Wins, HHI & Agency Mix",
    "description": "Map any US federal contracting market from official USAspending data: vendors ranked by obligated dollars, market concentration (HHI), top-5 and top-10 share, agency mix, outlay ratio, median contract length and contracts expiring within a year. Server-side aggregation, no API key.",
    "version": "0.1",
    "x-build-id": "aUzFNfkEDHjAJKNvr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yzy001~usaspending-market-map/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yzy001-usaspending-market-map",
        "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/yzy001~usaspending-market-map/runs": {
      "post": {
        "operationId": "runs-sync-yzy001-usaspending-market-map",
        "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/yzy001~usaspending-market-map/run-sync": {
      "post": {
        "operationId": "run-sync-yzy001-usaspending-market-map",
        "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": {
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes defining the market, e.g. 541511 for custom computer programming. Combine with the other filters as needed; at least one filter is required.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text terms matched against award descriptions, e.g. cybersecurity.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier agency names exactly as USAspending writes them, e.g. Department of Defense.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "recipients": {
            "title": "Vendors",
            "type": "array",
            "description": "Vendor name search, e.g. Lockheed Martin. Use this to map one company's federal book of business.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "ISO date, e.g. 2024-10-01. US federal fiscal years start on 1 October.",
            "default": "2024-10-01"
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "ISO date, e.g. 2026-09-30.",
            "default": "2026-09-30"
          },
          "dateType": {
            "title": "What the dates mean",
            "enum": [
              "action_date",
              "new_awards_only",
              "date_signed",
              "last_modified_date"
            ],
            "type": "string",
            "description": "By default the period matches transaction dates, so a contract that ended in 2017 still appears if it was modified inside your window. Choose 'New awards only' for contracts actually awarded in the period.",
            "default": "action_date"
          },
          "spendingLevel": {
            "title": "Measure awards or transactions",
            "enum": [
              "awards",
              "transactions"
            ],
            "type": "string",
            "description": "This changes every figure, including who leads the market. Measured on NAICS 541511 for fiscal 2025-26: at transaction level the top two are GDIT at 1.37bn and Palantir at 1.23bn; at award level they are GDIT at 3.51bn and Lockheed Martin at 2.79bn. Transactions is money moved in the period; awards is the total value of awards touched in the period. Award level also carries the outlay figures, which transaction level leaves empty.",
            "default": "awards"
          },
          "topRecipients": {
            "title": "Vendors to return",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many vendors to rank. Concentration figures cover only the vendors returned, so a larger number gives a tighter upper bound on HHI.",
            "default": 100
          },
          "rollUpByName": {
            "title": "Merge vendors with the same name",
            "type": "boolean",
            "description": "The same company can appear several times under different UEIs, one per registered division. Lockheed Martin Corporation shows up twice in NAICS 541511 at 2.79bn and 0.87bn, which understates its real share and the market's concentration. Off by default to stay faithful to the source; the summary always reports how many name groups have more than one entity.",
            "default": false
          },
          "includeAwards": {
            "title": "Also sample individual contracts",
            "type": "boolean",
            "description": "Fetch individual awards to derive contract length, agency mix and contracts expiring within a year. These fields are based on the sampled pages, not every contract the vendor holds.",
            "default": true
          },
          "maxAwardPages": {
            "title": "Contract sample pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Pages of 100 awards to sample, sorted by amount descending.",
            "default": 3
          },
          "delaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Pause between requests. USAspending has no tight anonymous rate limit, so this only needs to be polite.",
            "default": 0.4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}