{
  "openapi": "3.0.1",
  "info": {
    "title": "US Federal Contract and Grant Awards: Search and Alerts",
    "description": "Search US federal contract and grant awards on USAspending.gov by keyword, ALN, NAICS, PSC, agency, state, date and amount, or get only new awards since your last run. Recipient name and UEI, amount, dates, agency, place of performance, link. Individuals are left out. $0.002 per award.",
    "version": "0.4",
    "x-build-id": "0TdO4znaTJnYfzHtd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagleaner~federal-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagleaner-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/datagleaner~federal-awards/runs": {
      "post": {
        "operationId": "runs-sync-datagleaner-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/datagleaner~federal-awards/run-sync": {
      "post": {
        "operationId": "run-sync-datagleaner-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to find in award descriptions and titles, e.g. `SBIR`, `cybersecurity`, `broadband`. Each keyword needs 3 or more characters. Awards matching any keyword are returned.",
            "items": {
              "type": "string"
            }
          },
          "kinds": {
            "title": "Award kinds",
            "type": "array",
            "description": "Which families to search: contracts, grants (project, formula, cooperative agreements), direct payments, other assistance. Leave empty for contracts and grants (or only grants when you give an ALN number, only contracts when you give a NAICS or PSC code).",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "grants",
                "directPayments",
                "other"
              ]
            }
          },
          "alnNumbers": {
            "title": "ALN / CFDA numbers",
            "type": "array",
            "description": "Assistance Listing Numbers (formerly CFDA) such as `93.226` or `10.001`. Applies to grants, direct payments and other assistance, not contracts.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "NAICS industry codes of contracts, e.g. `541715`, `541512`. Contracts only.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product and Service Codes of contracts, e.g. `R425`, `D302`. Contracts only.",
            "items": {
              "type": "string"
            }
          },
          "agency": {
            "title": "Awarding agency",
            "type": "string",
            "description": "Top-level agency name as USAspending spells it, e.g. `Department of Defense`, `National Aeronautics and Space Administration`, `Department of Health and Human Services`."
          },
          "recipientStates": {
            "title": "Recipient states",
            "type": "array",
            "description": "Two-letter US state codes where the recipient is located, e.g. `VA`, `CA`.",
            "items": {
              "type": "string"
            }
          },
          "placeStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter US state codes where the work is done.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "From date",
            "type": "string",
            "description": "`YYYY-MM-DD`. Default: the last 365 days (90 days for the example run). Earliest supported date is 2007-10-01."
          },
          "endDate": {
            "title": "To date",
            "type": "string",
            "description": "`YYYY-MM-DD`. Default: today."
          },
          "newAwardsOnly": {
            "title": "Only awards first signed in the date range",
            "type": "boolean",
            "description": "On: only awards whose first obligation falls in the date range (new awards). Off: every award that was active in the range, including older multi-year awards.",
            "default": true
          },
          "minAmount": {
            "title": "Minimum amount (USD)",
            "type": "number",
            "description": "Only awards of at least this many dollars."
          },
          "maxAmount": {
            "title": "Maximum amount (USD)",
            "type": "number",
            "description": "Only awards of at most this many dollars."
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "newest",
              "largest"
            ],
            "type": "string",
            "description": "Result order.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Max awards",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many billed awards.",
            "default": 100
          },
          "watchMode": {
            "title": "Watch mode (new awards since last run)",
            "type": "boolean",
            "description": "Return only awards not delivered by your previous run in the named store below. The first run reports the last 30 days (see watch lookback) as new. Schedule it daily or weekly.",
            "default": false
          },
          "watchLookbackDays": {
            "title": "Watch lookback on first run (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How far back the first watch run looks.",
            "default": 30
          },
          "storeName": {
            "title": "Watch store name",
            "type": "string",
            "description": "Name of the key-value store that keeps the last-seen state. Use a different name for each watched search.",
            "default": "awards-watch"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}