{
  "openapi": "3.0.1",
  "info": {
    "title": "Public Tenders Scraper",
    "description": "Search public procurement notices from EU TED and UK Contracts Finder / Find a Tender. Use for bid monitoring and govcon BD. Not SAM.gov (use sam-gov-scraper). One row per notice: title, buyer, CPV, deadline, value, URL. $0.005/notice + $0.00005 start.",
    "version": "0.1",
    "x-build-id": "N1ZS2h6cr4t6W8jeP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~scrape-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-scrape-public-tenders",
        "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/khadinakbar~scrape-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-scrape-public-tenders",
        "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/khadinakbar~scrape-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-scrape-public-tenders",
        "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": {
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Free-text query matched against notice titles and descriptions, for example 'software' or 'school catering'. TED uses expert FT~ search; UK Contracts Finder uses its keyword index. Leave empty to browse the date window only. This is not a CPV code — put codes in cpvCodes."
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which official registers to query. ted is EU Tenders Electronic Daily. uk-contracts-finder is below-threshold UK notices. uk-find-a-tender is above-threshold UK notices. Default all three. This is not SAM.gov — use sam-gov-scraper for US federal RFPs.",
            "items": {
              "type": "string",
              "enum": [
                "ted",
                "uk-contracts-finder",
                "uk-find-a-tender"
              ],
              "enumTitles": [
                "EU TED",
                "UK Contracts Finder",
                "UK Find a Tender"
              ]
            },
            "default": [
              "ted",
              "uk-contracts-finder",
              "uk-find-a-tender"
            ]
          },
          "countries": {
            "title": "Buyer countries (TED)",
            "type": "array",
            "description": "ISO 3166-1 alpha-3 buyer countries for TED only, for example DEU or FRA. Leave empty for all TED countries. UK sources always stay GBR. Do not pass two-letter codes such as DE.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes, 2-8 digits, for example 72000000 for IT services. TED prefix-matches so 72 also covers 72000000 children. Leave empty for every sector. This is not a keyword.",
            "items": {
              "type": "string"
            }
          },
          "statusFilter": {
            "title": "Notice status",
            "enum": [
              "open",
              "awarded",
              "all"
            ],
            "type": "string",
            "description": "Which procurement stage to keep. open (default) is active TED notices and Open UK Contracts Finder tenders. awarded is TED contract-award notices and Awarded UK rows. all includes planning. This is not a bid-win probability.",
            "default": "open"
          },
          "datePreset": {
            "title": "Date range",
            "enum": [
              "last_24_hours",
              "last_7_days",
              "last_30_days",
              "custom"
            ],
            "type": "string",
            "description": "Publication-date window applied to TED, Contracts Finder, and Find a Tender. last_7_days is the default quality sample. Choose custom only when publishedFrom is set. This is publication date, not bid deadline.",
            "default": "last_7_days"
          },
          "publishedFrom": {
            "title": "Custom from date",
            "type": "string",
            "description": "Inclusive publication start date as YYYY-MM-DD, for example 2026-09-01. Used only when datePreset is custom. Ignored for last_7_days and other presets."
          },
          "publishedTo": {
            "title": "Custom to date",
            "type": "string",
            "description": "Inclusive publication end date as YYYY-MM-DD, for example 2026-09-17. Used only when datePreset is custom. Defaults to today when omitted."
          },
          "expertQuery": {
            "title": "TED expert query (override)",
            "type": "string",
            "description": "Native TED expert-search expression, for example buyer-country=DEU AND classification-cpv=72000000*. When set, it replaces the TED keyword/country/CPV/date query. Leave empty for normal use. UK sources ignore this field."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Hard cap on billed dataset rows for the whole run. Default 25. Prefill 5 keeps the quality sample cheap: each saved notice is one $0.005 tender-found event. This is not a page number.",
            "default": 25
          },
          "language": {
            "title": "TED language",
            "type": "string",
            "description": "TED language code for localized title and buyer fields, default ENG. Falls back to English then the first available translation. UK notices stay English. This is not a country filter.",
            "default": "ENG"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}