{
  "openapi": "3.0.1",
  "info": {
    "title": "Government Tenders API - SAM.gov, EU TED & UK Contract Alerts",
    "description": "Search and monitor government tenders, RFPs and contract opportunities from SAM.gov (US), TED (EU) and UK Find a Tender in one unified schema. Filter by keyword, CPV or NAICS code and country. Monitor mode alerts only on new tenders. Official government APIs.",
    "version": "0.1",
    "x-build-id": "vPCHCbFFNRTjwISOZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apeye~government-tenders-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apeye-government-tenders-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/apeye~government-tenders-api/runs": {
      "post": {
        "operationId": "runs-sync-apeye-government-tenders-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/apeye~government-tenders-api/run-sync": {
      "post": {
        "operationId": "run-sync-apeye-government-tenders-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": {
          "includeTed": {
            "title": "EU: TED (Tenders Electronic Daily)",
            "type": "boolean",
            "description": "Include procurement notices from the EU's official TED portal. No API key needed.",
            "default": true
          },
          "includeSam": {
            "title": "US: SAM.gov federal opportunities",
            "type": "boolean",
            "description": "Include US federal contract opportunities from SAM.gov. Needs a free API key (see the samApiKey field below).",
            "default": true
          },
          "includeUk": {
            "title": "UK: Find a Tender",
            "type": "boolean",
            "description": "Include UK public sector tenders from the official Find a Tender service. No API key needed. Keyword and CPV filters apply (CPV matched at division level).",
            "default": true
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional keywords matched against tender titles, e.g. <code>cloud</code>, <code>cybersecurity</code>, <code>consulting</code>. A tender is kept if ANY keyword matches. Leave empty for all tenders in the period.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (TED)",
            "type": "array",
            "description": "Optional EU Common Procurement Vocabulary codes, e.g. <code>72000000</code> (IT services), <code>45000000</code> (construction). Applies to TED only.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (SAM.gov)",
            "type": "array",
            "description": "Optional NAICS industry codes, e.g. <code>541511</code> (custom programming). Applies to SAM.gov only.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries (TED)",
            "type": "array",
            "description": "Optional 3-letter country codes to filter TED notices by buyer country, e.g. <code>DEU</code>, <code>FRA</code>, <code>ITA</code>, <code>ESP</code>.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How many days of publications to search.",
            "default": 7
          },
          "maxItemsPerSource": {
            "title": "Max tenders per source",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Cap on collected tenders per source.",
            "default": 200
          },
          "samApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Your free SAM.gov API key (sam.gov → sign in → Account Details → API Key). Only needed for the SAM.gov source. If the Actor is configured with a built-in key, this can stay empty."
          },
          "customTedQuery": {
            "title": "Custom TED expert query",
            "type": "string",
            "description": "Optional extra condition in TED expert-query syntax, ANDed to the generated query, e.g. <code>contract-nature IN (services)</code>."
          },
          "monitorMode": {
            "title": "Monitor mode (only new tenders)",
            "type": "boolean",
            "description": "Remember previous runs and output only tenders not seen before (rows get <code>changeType: \"new\"</code>). Ideal on a daily Schedule wired to Slack or email.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name of the saved comparison state. Use a different ID per Schedule that monitors different filters.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}