{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities API — Federal RFPs & Bids",
    "description": "Export SAM.gov RFPs, solicitations, sources sought and award notices to JSON/CSV. No API key needed: official public daily extract (up to ~1 day old), or live API with your own free key. Filter NAICS, set-aside, type, state, date. $2 per 1,000 results.",
    "version": "1.5",
    "x-build-id": "NHlDqrVmIX99rv9lC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/samgov-tools~samgov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-samgov-tools-samgov-opportunities",
        "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/samgov-tools~samgov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-samgov-tools-samgov-opportunities",
        "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/samgov-tools~samgov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-samgov-tools-samgov-opportunities",
        "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": {
          "source": {
            "title": "Data source",
            "enum": [
              "auto",
              "bulk",
              "api"
            ],
            "type": "string",
            "description": "Choose the data source using the string auto, bulk or api. Default: auto uses the live API when samApiKey is supplied, otherwise the public daily extract (up to about one day old). Use bulk to force the no-key extract or api to require live data and your own key. Example: \"bulk\".",
            "default": "auto"
          },
          "samApiKey": {
            "title": "SAM.gov public API key",
            "type": "string",
            "description": "Your own SAM.gov public API key as a string; omitted by default, so no key is needed for the daily extract. Use for live API data; source api requires it, while auto selects the API when it is present. Generate it in SAM.gov Account Details (https://sam.gov/workspace/profile/account-details). It is secret input, never logged or stored in dataset items; no shared key is provided. Example placeholder: \"YOUR_OWN_PUBLIC_API_KEY\"."
          },
          "keywords": {
            "title": "Title keywords",
            "type": "string",
            "description": "Filter opportunity titles with a space-separated string, not full notice text. Default: omitted, with no title filter. Use to find a topic; API mode sends the official title parameter, while the daily extract requires every word in the title, case-insensitively. Example: \"renovation\"."
          },
          "naics": {
            "title": "NAICS code",
            "pattern": "^[0-9]{2,6}$",
            "type": "string",
            "description": "Filter by a NAICS code supplied as a string of 2–6 digits. Default: omitted, with no NAICS filter. Use to target an industry; the API receives ncode, and the daily extract uses a prefix match (236 matches 236220). Example: \"236220\"."
          },
          "setAside": {
            "title": "Set-aside",
            "enum": [
              "SBA",
              "SBP",
              "8A",
              "8AN",
              "HZC",
              "HZS",
              "SDVOSBC",
              "SDVOSBS",
              "WOSB",
              "WOSBSS",
              "EDWOSB",
              "EDWOSBSS",
              "LAS",
              "IEE",
              "ISBEE",
              "BICiv",
              "VSA",
              "VSS"
            ],
            "type": "string",
            "description": "Filter by an official typeOfSetAside code string from the enum. Default: omitted, including all set-asides. Use to target a procurement eligibility category, such as total small business set-asides. Example: \"SBA\"."
          },
          "noticeType": {
            "title": "Notice type",
            "enum": [
              "u",
              "p",
              "a",
              "r",
              "s",
              "o",
              "g",
              "k",
              "i"
            ],
            "type": "string",
            "description": "Filter by an official ptype code string from the enum: u, p, a, r, s, o, g, k or i. Default: omitted, including all notice types. Use to target a procurement stage, such as solicitations (o) or sources sought (r). Example: \"o\"."
          },
          "state": {
            "title": "Place-of-performance state",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Filter place of performance by a two-letter US state code string; lowercase is normalized to uppercase. Default: omitted, with no state filter. Use for work in a particular state; API mode sends state and the daily extract matches PopState. Example: \"VA\"."
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Filter active status with a boolean. Default: true. The daily extract keeps only rows marked Yes; API mode excludes records whose active value is the string No (case-insensitive), but retains false or missing values. Use false to disable this filter; the daily extract still covers active notices only. Example: false.",
            "default": true
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Inclusive start of the posting-date range as a string in MM/dd/yyyy or YYYY-MM-DD format. Default: 29 days before postedTo, or 29 days before today UTC when both dates are omitted. Use to bound the search start; the ordered range must be at most one calendar year. Example: \"10/16/2026\"."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Inclusive end of the posting-date range as a string in MM/dd/yyyy or YYYY-MM-DD format. Default: today UTC, including when only postedFrom is supplied. Use to bound the search end; the ordered range must be at most one calendar year. Example: \"11/14/2026\"."
          },
          "maxItems": {
            "title": "Maximum opportunities",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit the opportunities stored and charged for in this run with an integer from 1 to 10000. Default: 10. Use a small value for previews or raise it for larger exports; the run stops and aborts an open extract download when the limit is reached. Example: 25.",
            "default": 10
          },
          "pageSize": {
            "title": "API page size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Set the official API request page size with an integer from 1 to 1000. Default: 100. Use to tune API pagination when using your own key; ignored in daily-extract mode. This does not replace the maxItems output limit. Example: 100.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}