{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Scraper: Federal Contract & Grant Award Alerts",
    "description": "Follow the federal money: new and changed contracts, grants, loans and IDVs from the official USAspending.gov API, filtered by keyword, agency, recipient, NAICS, state or amount. Change alerts + recipient parent-company add-on.",
    "version": "0.2",
    "x-build-id": "YQJjYZnxuTn1xBoXa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clearfeedlabs~money-trail-federal-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clearfeedlabs-money-trail-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/clearfeedlabs~money-trail-federal-awards/runs": {
      "post": {
        "operationId": "runs-sync-clearfeedlabs-money-trail-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/clearfeedlabs~money-trail-federal-awards/run-sync": {
      "post": {
        "operationId": "run-sync-clearfeedlabs-money-trail-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": {
          "awardTypes": {
            "title": "Award types",
            "type": "array",
            "description": "Which kinds of federal awards to include.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "grants",
                "loans",
                "directPayments",
                "other"
              ],
              "enumTitles": [
                "Contracts",
                "Contract vehicles (IDVs)",
                "Grants",
                "Loans",
                "Direct payments",
                "Other assistance"
              ]
            },
            "default": [
              "contracts",
              "grants"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words in the award description, recipient or program (3+ letters each).",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier agency names exactly as on USAspending, e.g. \"Department of Defense\", \"Department of Energy\", \"National Science Foundation\".",
            "items": {
              "type": "string"
            }
          },
          "recipients": {
            "title": "Recipient names / UEIs",
            "type": "array",
            "description": "Track specific companies or organizations (name text or UEI).",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (contracts)",
            "type": "array",
            "description": "2-6 digit NAICS prefixes, e.g. 5415 (computer services). Applies to contracts and IDVs.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance (states)",
            "type": "array",
            "description": "2-letter state codes.",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip smaller awards."
          },
          "lookbackDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Awards with activity in the last N days.",
            "default": 30
          },
          "dateBasis": {
            "title": "Date basis",
            "enum": [
              "last_modified_date",
              "action_date"
            ],
            "type": "string",
            "description": "Which date the look-back window applies to.",
            "default": "last_modified_date"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Largest awards first. Each row is charged.",
            "default": 100
          },
          "addCompetitionDetails": {
            "title": "Competition & recompete details (free)",
            "type": "boolean",
            "description": "For contract rows: offers received, extent competed, set-aside, solicitation procedure, pricing type, current/potential end date, days to potential end and a recompete window. One extra USAspending call per contract (up to 200); no extra charge.",
            "default": true
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "changesSinceLastRun"
            ],
            "type": "string",
            "description": "Change mode remembers what it has seen per watchlist name and alerts on new awards, amount changes and modifications.",
            "default": "all"
          },
          "stateKey": {
            "title": "Watchlist name (change mode)",
            "type": "string",
            "description": "Separate histories for different watches.",
            "default": "default"
          },
          "addRecipientProfile": {
            "title": "Add-on: recipient profile (+$0.002/row)",
            "type": "boolean",
            "description": "Parent company, UEI, business types (e.g. small business), HQ city/state and last-12-month federal totals.",
            "default": false
          },
          "addCampaignMoney": {
            "title": "Add-on: campaign money from FEC (+$0.002/row)",
            "type": "boolean",
            "description": "For each award recipient, finds PACs whose name matches the recipient in official FEC records and adds their latest-cycle receipts, disbursements and contributions to federal candidates. Charged only when at least one committee is found.",
            "default": false
          },
          "fecApiKey": {
            "title": "Your api.data.gov key for FEC (optional, recommended)",
            "type": "string",
            "description": "Free at https://api.data.gov/signup/. Stored encrypted by Apify and never logged. Without it the shared DEMO_KEY is used, which allows only a few lookups per hour."
          },
          "maxCampaignLookups": {
            "title": "Max FEC recipient lookups",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Caps FEC calls per run. Default 10 with DEMO_KEY, 200 with your own key."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}