{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Scraper: New Federal Contract Awards Feed",
    "description": "New U.S. federal contract, IDV and grant awards from the official USAspending.gov API: winner, UEI, amount, agency, NAICS, PSC, set-aside, place of performance. Daily feed with dedupe and filters. Not affiliated with USAspending.gov.",
    "version": "0.1",
    "x-build-id": "VuOlW4FJeyR1AChFW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fecklesspleb~usaspending-new-awards-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fecklesspleb-usaspending-new-awards-feed",
        "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/fecklesspleb~usaspending-new-awards-feed/runs": {
      "post": {
        "operationId": "runs-sync-fecklesspleb-usaspending-new-awards-feed",
        "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/fecklesspleb~usaspending-new-awards-feed/run-sync": {
      "post": {
        "operationId": "run-sync-fecklesspleb-usaspending-new-awards-feed",
        "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": "Mode",
            "enum": [
              "daily_feed",
              "date_range"
            ],
            "type": "string",
            "description": "Daily feed is built for a daily schedule and skips awards already delivered. Date range is for backfills.",
            "default": "daily_feed"
          },
          "lookbackDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Daily feed: include awards signed in the last N days. 7 is recommended because agencies report awards days late (DoD up to 90 days); dedupe means you pay for each award once.",
            "default": 7
          },
          "startDate": {
            "title": "Signed from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Date range mode: first signing date (YYYY-MM-DD, 2007-10-01 or later)."
          },
          "endDate": {
            "title": "Signed to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Date range mode: last signing date (YYYY-MM-DD). Defaults to today."
          },
          "awardTypes": {
            "title": "Award types",
            "type": "array",
            "description": "Loans, direct payments and insurance are not offered because many go to private individuals.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "grants"
              ],
              "enumTitles": [
                "Contracts (definitive contracts, purchase and delivery orders, BPA calls)",
                "IDVs (GWACs, IDIQs, BPAs, FSS)",
                "Grants and cooperative agreements"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter state codes, e.g. FL, TX, DC. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "recipientStates": {
            "title": "Recipient (winner) states",
            "type": "array",
            "description": "Two-letter state codes of the winner's address. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2-6 digit NAICS codes; prefixes match (5415 matches 541511, 541512 ...). Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product and Service Codes or prefixes, e.g. D302, R4, 65. Contracts and IDVs only.",
            "items": {
              "type": "string"
            }
          },
          "assistanceListings": {
            "title": "Assistance Listings (CFDA)",
            "type": "array",
            "description": "Grant program numbers such as 93.866 or 20.205. Grants only.",
            "items": {
              "type": "string"
            }
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier agency names, abbreviations or codes, e.g. Department of Defense, DHS, 036. Unknown names stop the run with a list of valid ones.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words searched in award descriptions and recipient names (3+ characters each). Any keyword matches.",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards at or above this obligated amount."
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards at or below this obligated amount."
          },
          "includeDetail": {
            "title": "Include award detail",
            "type": "boolean",
            "description": "Adds the winner's address and business categories, set-aside, competition, offers received, pricing type, solicitation ID, parent recipient and period of performance (one extra API call per award, billed as 'award'). Off = summary fields only (billed as 'award-basic').",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "enum": [
              "auto",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Skip awards this Actor already delivered (remembered in a named key-value store).",
            "default": "auto"
          },
          "stateKey": {
            "title": "Dedupe memory name",
            "type": "string",
            "description": "Use different names to keep separate 'already delivered' memories for different schedules.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max awards",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after saving this many awards (default 3, at most $0.009). Raise it for a full daily feed.",
            "default": 3
          },
          "maxPages": {
            "title": "Max search pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap on 100-result search pages per award type.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}