{
  "openapi": "3.0.1",
  "info": {
    "title": "US Federal Contracts & Grants API: SAM.gov, Grants.gov, Awards",
    "description": "Search US federal contract opportunities (SAM.gov), grants (Grants.gov) and past awards (USAspending) by keyword, NAICS, agency, state and set-aside. No API key. Schedule it for daily alerts.",
    "version": "0.1",
    "x-build-id": "rx1PBsRgVp5XBSAu4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codepulsehq~us-federal-opportunities-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codepulsehq-us-federal-opportunities-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/codepulsehq~us-federal-opportunities-api/runs": {
      "post": {
        "operationId": "runs-sync-codepulsehq-us-federal-opportunities-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/codepulsehq~us-federal-opportunities-api/run-sync": {
      "post": {
        "operationId": "run-sync-codepulsehq-us-federal-opportunities-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": {
          "sources": {
            "title": "Where to look",
            "type": "array",
            "description": "Contract opportunities come from SAM.gov, grants from Grants.gov and past awards from USAspending. Pick one or several.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "grants",
                "awards"
              ],
              "enumTitles": [
                "Contract opportunities (SAM.gov)",
                "Grant opportunities (Grants.gov)",
                "Past awards: who won (USAspending)"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Find opportunities mentioning any of these words or phrases, such as cybersecurity or cloud migration. Titles that match are listed first. Leave empty to see everything that matches your other filters.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Leave out keywords",
            "type": "array",
            "description": "Skip opportunities that mention any of these words.",
            "items": {
              "type": "string"
            }
          },
          "naics": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes. A short code matches everything under it, for example 5415 for computer systems design and related services.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Part of an agency name, such as defense, veterans, homeland security or navy. For awards use the full department name, for example Department of Defense.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance (states, contracts only)",
            "type": "array",
            "description": "Two-letter state codes such as TX or VA.",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-asides (contracts only)",
            "type": "array",
            "description": "Codes such as SBA (small business), 8A, HZC (HUBZone), SDVOSBC (service-disabled veteran-owned) or WOSB (woman-owned).",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types (contracts only)",
            "type": "array",
            "description": "For example Solicitation, Combined Synopsis, Presolicitation, Sources Sought or Special Notice.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted in the last (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only opportunities posted in this many days. Use 1 on a daily schedule to get new ones only. Default 30."
          },
          "closingWithinDays": {
            "title": "Closing within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only contract opportunities whose response deadline is within this many days."
          },
          "onlyOpen": {
            "title": "Only open opportunities",
            "type": "boolean",
            "description": "Hide opportunities whose deadline has passed and closed grants.",
            "default": true
          },
          "minAmount": {
            "title": "Minimum amount (USD)",
            "type": "integer",
            "description": "For grants: smallest award ceiling. For awards: smallest award value."
          },
          "awardedWithinDays": {
            "title": "Awarded in the last (days, awards only)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How far back to look for awards. Default 365."
          },
          "maxResults": {
            "title": "Maximum results per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stops a broad search from running up a big bill. Default 100.",
            "default": 100
          },
          "includeDescription": {
            "title": "Full descriptions",
            "type": "boolean",
            "description": "Return the whole description instead of the first 600 characters.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}