{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov & Grants.gov Scraper: Government Contracts & Grants",
    "description": "SAM.gov contract opportunities and Grants.gov federal grants in one feed, no API key needed. Contract filters (keyword, NAICS, agency, set-aside, notice type, due date) are applied to every row. Daily alerts and next-day amendment alerts.",
    "version": "0.1",
    "x-build-id": "5TZuslUabdLz6je26"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yourevenings~us-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yourevenings-us-gov-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/yourevenings~us-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-yourevenings-us-gov-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/yourevenings~us-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-yourevenings-us-gov-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": {
          "opportunityType": {
            "title": "Opportunity type",
            "enum": [
              "both",
              "contracts",
              "grants"
            ],
            "type": "string",
            "description": "Which sources to search: federal contract opportunities from SAM.gov, grant opportunities from Grants.gov, or both.",
            "default": "both"
          },
          "keywords": {
            "title": "Keywords (any of)",
            "type": "array",
            "description": "Return opportunities that match any of these words or phrases. For contracts they are matched (whole words, case-insensitive) against the title, solicitation number and description. For grants, each keyword is sent to the Grants.gov search. Leave empty for all opportunities.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (contracts only)",
            "type": "array",
            "description": "Contract notices whose NAICS code starts with any of these, for example <code>541511</code> or <code>5415</code> for all computer systems design services. Setting this skips Grants.gov, which has no NAICS codes.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Keep opportunities whose department, sub-agency, office or agency code contains any of these (case-insensitive), for example <code>VETERANS AFFAIRS</code>, <code>DEPT OF THE NAVY</code>, <code>National Institutes of Health</code> or <code>HHS-NIH11</code>.",
            "items": {
              "type": "string"
            }
          },
          "setAsideTypes": {
            "title": "Set-aside types (contracts only)",
            "type": "array",
            "description": "SAM.gov set-aside codes, for example <code>SBA</code> (total small business), <code>SBP</code>, <code>8A</code>, <code>8AN</code>, <code>HZC</code> (HUBZone), <code>SDVOSBC</code>, <code>WOSB</code>, <code>EDWOSB</code>, <code>ISBEE</code>, or <code>ANY</code> for any set-aside. Setting this skips Grants.gov.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (contracts)",
            "type": "array",
            "description": "Contract notices whose product/service code (PSC, SAM.gov's <code>ClassificationCode</code>) starts with any of these, for example <code>R4</code> (professional support services), <code>D</code> (IT and telecom services, such as <code>DA01</code>) or <code>J059</code>. Applied before you're charged. Setting this skips Grants.gov, which has no PSC codes.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place-of-performance states (contracts)",
            "type": "array",
            "description": "Contract notices whose place of performance is in one of these US states, DC or territories: 2-letter codes (<code>VA</code>) or names (<code>Virginia</code>). Applied before you're charged. Many notices list no place-of-performance state (about 3 in 4 in the extract on 22 Oct 2026); they never match this filter, and the run summary says how many were excluded for that reason. Setting this skips Grants.gov.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Only opportunities posted in the last N days (0 = today only). Ignored when 'Posted since' is set.",
            "default": 7
          },
          "postedSince": {
            "title": "Posted since (date)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional exact start date, YYYY-MM-DD. Overrides 'Posted within the last N days'."
          },
          "dueAfter": {
            "title": "Due after (date)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional, YYYY-MM-DD. Keep only opportunities whose response deadline or close date is on or after this date. Opportunities without a deadline are excluded when this is set."
          },
          "maxResults": {
            "title": "Max results per source",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many opportunities from each source, newest first. 0 means all matches in the date window. The small default keeps test runs quick and cheap.",
            "default": 10
          },
          "monitorMode": {
            "title": "Monitor mode (only new since last run)",
            "type": "boolean",
            "description": "When on, only opportunities that weren't returned in an earlier monitor run are returned (<code>changeType: \"new\"</code>). Schedule the Actor daily with the same input to get a new-matches feed. Seen opportunity IDs are kept in the named key-value store below for 400 days.",
            "default": false
          },
          "emitBaselineOnFirstRun": {
            "title": "Return all matches on the first monitor run",
            "type": "boolean",
            "description": "In monitor mode, the first run has nothing to compare with. When on, it returns all current matches (charged as usual). When off, it only remembers them and returns nothing.",
            "default": true
          },
          "trackSolicitationNumbers": {
            "title": "Track solicitation numbers (change alerts)",
            "type": "array",
            "description": "SAM.gov solicitation numbers to watch, e.g. <code>W912DY26R0001</code>. When set, the run reads SAM.gov's whole public daily extract and returns a row for each change since the last run: a new notice or amendment under the number (with response deadline, notice type, set-aside and other fields before and after), an edit to a known notice, or a notice leaving the active extract. Search filters are not used in these runs. Changes show up the day after SAM.gov publishes them, because the extract is refreshed about once a day. Attachments are not in the extract, so attachment-only changes are not seen. Each change row is charged as one opportunity, plus the alert event once on runs with changes; status rows (first run, no change, not found) are free. State is kept in the key-value store named below. Up to 500 numbers.",
            "items": {
              "type": "string"
            }
          },
          "stateStoreName": {
            "title": "State key-value store name",
            "type": "string",
            "description": "Named key-value store in your account that remembers which opportunities were already returned (monitor mode) and the last known state of tracked solicitation numbers. Use a different name for each separate saved search or watch list.",
            "default": "us-gov-opportunities-state"
          },
          "includeDescription": {
            "title": "Include description snippet",
            "type": "boolean",
            "description": "Add a short plain-text <code>descriptionSnippet</code> (up to about 300 characters). The full notice is at <code>url</code>.",
            "default": true
          },
          "includeContacts": {
            "title": "Include published notice contacts",
            "type": "boolean",
            "description": "Add the point-of-contact fields exactly as published on each notice (name, title, email, phone). Off by default. They are passed through per notice, never compiled into a separate people list.",
            "default": false
          },
          "includeAwardNotices": {
            "title": "Include contract award notices",
            "type": "boolean",
            "description": "SAM.gov also publishes award notices (contracts already awarded). Off by default, because they aren't open opportunities.",
            "default": false
          },
          "samNoticeTypes": {
            "title": "SAM.gov notice types",
            "type": "array",
            "description": "Optional. Keep only these SAM.gov notice types, for example <code>Solicitation</code>, <code>Combined Synopsis/Solicitation</code>, <code>Presolicitation</code>, <code>Sources Sought</code>, <code>Special Notice</code>.",
            "items": {
              "type": "string"
            }
          },
          "grantStatuses": {
            "title": "Grants.gov statuses",
            "type": "array",
            "description": "Grants.gov opportunity statuses to include: <code>posted</code> and/or <code>forecasted</code>. Default: both.",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active contract notices only",
            "type": "boolean",
            "description": "Skip SAM.gov notices that are marked inactive.",
            "default": true
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout for each Grants.gov request. Failed requests are retried up to 3 times with backoff.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}