{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards & Recipient Monitor",
    "description": "Track awarded US federal contracts, grants, loans and IDVs from USAspending.gov by recipient, UEI, agency, NAICS or PSC. Obligations and outlays kept separate, award links, and new/updated alerts between runs.",
    "version": "0.1",
    "x-build-id": "5vlPcZrbv75lRT5LU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~usaspending-federal-awards-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-usaspending-federal-awards-monitor",
        "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/cliqtomedia~usaspending-federal-awards-monitor/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-usaspending-federal-awards-monitor",
        "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/cliqtomedia~usaspending-federal-awards-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-usaspending-federal-awards-monitor",
        "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 awards to search. Each type is searched separately and maxResults applies per type. Contracts = definitive contracts, purchase and delivery orders; IDVs = indefinite delivery vehicles (GWACs, BPAs, IDIQs); grants = block, formula, project and cooperative agreements; loans = direct and guaranteed loans; direct payments and other assistance = remaining financial assistance. Default: contracts.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "grants",
                "loans",
                "direct_payments",
                "other"
              ],
              "enumTitles": [
                "Contracts",
                "IDVs (indefinite delivery vehicles)",
                "Grants",
                "Loans",
                "Direct payments",
                "Other financial assistance"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "maxItems": 10,
            "type": "array",
            "description": "Up to 10 awarding agencies: official name or abbreviation of a department (e.g. Department of Veterans Affairs, VA, DOD) or of a sub-agency (e.g. National Institutes of Health, NIH). Unknown names stop the run with suggestions instead of silently returning nothing. Default: all agencies.",
            "items": {
              "type": "string"
            }
          },
          "recipients": {
            "title": "Recipients (name or UEI)",
            "maxItems": 20,
            "type": "array",
            "description": "Up to 20 recipient names or 12-character UEIs, e.g. LOCKHEED MARTIN or DT2KS3HH5FP5. Names are matched by USAspending's recipient text search, so check recipientName and recipientUei in the results. Default: all recipients.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "maxItems": 50,
            "type": "array",
            "description": "Up to 50 NAICS industry codes, 2 to 6 digits, e.g. 541512 or 5415. Only contracts and IDVs carry NAICS: other award types are skipped with a warning. Default: all.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "maxItems": 50,
            "type": "array",
            "description": "Up to 50 Product and Service Codes, 1 to 4 letters/digits, e.g. DA01, R4 or 7030. Contracts and IDVs only. Default: all.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 10,
            "type": "array",
            "description": "Up to 10 keywords searched in award descriptions and other text fields, e.g. cybersecurity. 3–100 characters each. Default: none.",
            "items": {
              "type": "string"
            }
          },
          "dateFilter": {
            "title": "Date filter",
            "enum": [
              "activity",
              "new_awards",
              "last_modified"
            ],
            "type": "string",
            "description": "What the date range applies to. Activity (default): awards with any transaction (new award, modification, de-obligation) in the range. New awards only: awards whose first action falls in the range. Last modified: awards whose record changed in the range.",
            "default": "activity"
          },
          "lookbackDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Date range ending today (or dateTo), 1–3650 days. Ignored when dateFrom is set. Default 30.",
            "default": 30
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional start date YYYY-MM-DD. USAspending search starts at 2007-10-01; earlier dates are moved to that day."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional end date YYYY-MM-DD. Default: today (UTC)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "amount",
              "last_modified"
            ],
            "type": "string",
            "description": "Which awards come first when there are more than maxResults: largest amount (loans: face value) or most recently modified.",
            "default": "amount"
          },
          "maxResults": {
            "title": "Max awards per award type",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum awards returned for each selected award type, 1–500. Default 100. Each award row written to the dataset is charged; unchanged awards hidden by onlyChanges are not.",
            "default": 100
          },
          "monitorKey": {
            "title": "Monitor key (for scheduled runs)",
            "maxLength": 40,
            "type": "string",
            "description": "Optional name, 1–40 letters, digits or dashes, e.g. va-it-contracts. The Actor stores the awards it saw under this key in your account and the next run with the same key marks each award new, updated or unchanged. The first run marks rows initial. Use one key per saved search."
          },
          "previousDatasetId": {
            "title": "Compare with previous dataset",
            "type": "string",
            "description": "Optional ID of a dataset from an earlier run of this Actor. Awards are marked new, updated or unchanged against it. Use either this or monitorKey."
          },
          "onlyChanges": {
            "title": "Only output new and updated awards",
            "type": "boolean",
            "description": "When comparing (monitorKey or previousDatasetId), skip unchanged awards so you only see and pay for changes. Default true. Has no effect without a comparison.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}