{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov API: Contract Opportunities, Exclusions & Awards",
    "description": "SAM.gov and USAspending data as clean rows: open federal contract opportunities by NAICS, set-aside and deadline, registered entities by UEI or CAGE with expiry, exclusions and debarments, and contract awards. No SAM.gov rate limit, no scraping. Free preview with no key.",
    "version": "1.0",
    "x-build-id": "ELD5eg5ZNGhSAzGeW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pp-api~samgov-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pp-api-samgov-api",
        "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/pp-api~samgov-api/runs": {
      "post": {
        "operationId": "runs-sync-pp-api-samgov-api",
        "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/pp-api~samgov-api/run-sync": {
      "post": {
        "operationId": "run-sync-pp-api-samgov-api",
        "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": {
          "apiKey": {
            "title": "API key (optional)",
            "type": "string",
            "description": "Your samgovapi.io key. Free plan with 10,000 credits a month, no card: https://samgovapi.io/sign-up. Leave empty for a free preview of up to 5 real rows."
          },
          "dataset": {
            "title": "What to fetch",
            "enum": [
              "opportunities",
              "entities",
              "exclusions",
              "awards"
            ],
            "type": "string",
            "description": "Contract opportunities are SAM.gov notices you can bid on. Entities are SAM.gov registrations with UEI, CAGE, NAICS and expiry. Exclusions are debarred, suspended and restricted parties. Awards are federal contract awards from USAspending.",
            "default": "opportunities"
          },
          "keyword": {
            "title": "Keyword or name",
            "type": "string",
            "description": "Opportunities: words in the title or the solicitation number. Entities: legal or DBA name, UEI or CAGE. Exclusions: name contains. Awards: recipient name contains."
          },
          "naics": {
            "title": "NAICS code",
            "type": "string",
            "description": "Opportunities and awards: NAICS code or prefix, for example 5415. Entities: 6-digit NAICS code the entity lists."
          },
          "psc": {
            "title": "PSC code",
            "type": "string",
            "description": "Product and service code, for example D399 or R425."
          },
          "setAside": {
            "title": "Set-aside",
            "type": "string",
            "description": "Opportunities: set-aside code such as SBA, 8A, WOSB, EDWOSB, SDVOSBC or HZC. Entities: business type or SBA program code such as 8A or A2."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter state: place of performance for opportunities, physical address for entities."
          },
          "agency": {
            "title": "Agency",
            "type": "string",
            "description": "Opportunities and awards: department, sub-tier or awarding agency name, for example Veterans Affairs."
          },
          "agencyCode": {
            "title": "Agency code",
            "type": "string",
            "description": "Opportunities and awards: agency code such as 097 (Defense) or 047 (GSA)."
          },
          "noticeType": {
            "title": "Notice type",
            "enum": [
              "all",
              "Solicitation",
              "Combined Synopsis/Solicitation",
              "Presolicitation",
              "Sources Sought",
              "Special Notice",
              "Award Notice",
              "Justification",
              "Sale of Surplus Property",
              "Intent to Bundle Requirements (DoD-Funded)"
            ],
            "type": "string",
            "description": "Opportunities: the SAM.gov notice type.",
            "default": "all"
          },
          "openOnly": {
            "title": "Open bids only",
            "type": "boolean",
            "description": "Opportunities: only active notices that are not award notices and whose response deadline has not passed.",
            "default": true
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Opportunities: posted on or after this date, YYYY-MM-DD."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Opportunities: posted on or before this date, YYYY-MM-DD."
          },
          "deadlineFrom": {
            "title": "Deadline from",
            "type": "string",
            "description": "Opportunities: response deadline on or after this date, YYYY-MM-DD."
          },
          "deadlineTo": {
            "title": "Deadline to",
            "type": "string",
            "description": "Opportunities: response deadline on or before this date, YYYY-MM-DD. Use it for bids closing this week."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "posted",
              "deadline"
            ],
            "type": "string",
            "description": "Opportunities: order of the results.",
            "default": "posted"
          },
          "entityStatus": {
            "title": "Registration status",
            "enum": [
              "any",
              "active",
              "expired"
            ],
            "type": "string",
            "description": "Entities: SAM.gov registration status.",
            "default": "any"
          },
          "expiringWithinDays": {
            "title": "Expiring within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Entities: registrations that expire within this many days. Awards: contracts whose potential end date falls within this many days (likely recompetes)."
          },
          "uei": {
            "title": "UEI",
            "type": "string",
            "description": "Exclusions: exact UEI. Awards: recipient UEI."
          },
          "cage": {
            "title": "CAGE code",
            "type": "string",
            "description": "Exclusions: exact CAGE code."
          },
          "classification": {
            "title": "Exclusion classification",
            "enum": [
              "any",
              "Firm",
              "Individual",
              "Vessel",
              "Special Entity Designation"
            ],
            "type": "string",
            "description": "Exclusions: kind of excluded party.",
            "default": "any"
          },
          "activeOnly": {
            "title": "Active exclusions only",
            "type": "boolean",
            "description": "Exclusions: leave out terminated exclusions.",
            "default": true
          },
          "fiscalYear": {
            "title": "Fiscal year",
            "minimum": 2000,
            "maximum": 2100,
            "type": "integer",
            "description": "Awards: federal fiscal year of the award action."
          },
          "minAmount": {
            "title": "Minimum obligated ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Awards: obligated at least this many dollars."
          },
          "actionFrom": {
            "title": "Action date from",
            "type": "string",
            "description": "Awards: action date on or after, YYYY-MM-DD."
          },
          "actionTo": {
            "title": "Action date to",
            "type": "string",
            "description": "Awards: action date on or before, YYYY-MM-DD."
          },
          "vehicle": {
            "title": "Contract vehicle",
            "type": "string",
            "description": "Awards: contract vehicle name, for example OASIS or SEWP."
          },
          "maxRequests": {
            "title": "Max API requests",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many requests on your samgovapi.io plan. Each page of up to 100 rows is one request.",
            "default": 100
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}