{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders - Find a Tender and Contracts Finder",
    "description": "UK public tender and contract-award scraper from Find a Tender and Contracts Finder. Export matching OCDS releases as JSON with available buyer, date, value, CPV and award fields.",
    "version": "1.0",
    "x-build-id": "AJzE2pRwcvJxFXmmC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/grit-77~uk-find-a-tender/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-grit-77-uk-find-a-tender",
        "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/grit-77~uk-find-a-tender/runs": {
      "post": {
        "operationId": "runs-sync-grit-77-uk-find-a-tender",
        "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/grit-77~uk-find-a-tender/run-sync": {
      "post": {
        "operationId": "run-sync-grit-77-uk-find-a-tender",
        "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": "Official sources",
            "type": "array",
            "description": "Select one or both public OCDS APIs. Releases are kept separate by source.",
            "items": {
              "type": "string",
              "enum": [
                "find-a-tender",
                "contracts-finder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "find-a-tender",
              "contracts-finder"
            ]
          },
          "keyword": {
            "title": "Keyword or phrase",
            "type": "string",
            "description": "Case-insensitive literal substring in title, description or buyer name; an empty value matches all notices.",
            "default": ""
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "Match any CPV prefix, e.g. 72 for IT or 72000000. Full codes with a check digit are accepted. Leave empty for all sectors.",
            "items": {
              "type": "string"
            }
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Inclusive UTC date (YYYY-MM-DD), or timezone-aware ISO timestamp. Defaults to seven days before today. Filters release.date, which may be an amendment date."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Inclusive UTC date or timezone-aware ISO timestamp. Date-only input includes the whole day. Defaults to today."
          },
          "minValue": {
            "title": "Minimum value",
            "minimum": 0,
            "type": "number",
            "description": "Minimum amount in the chosen currency. Value intervals match when they overlap. Missing values are excluded."
          },
          "maxValue": {
            "title": "Maximum value",
            "minimum": 0,
            "type": "number",
            "description": "Maximum amount in the chosen currency; leave unset for no upper bound."
          },
          "currency": {
            "title": "Value filter currency",
            "type": "string",
            "description": "Three-letter currency code used when a value bound is set. No currency conversion is performed.",
            "default": "GBP"
          },
          "statuses": {
            "title": "OCDS tender statuses",
            "type": "array",
            "description": "Exact tender.status values. Active is the source status at publication, not a guarantee the deadline is still open. Missing statuses do not match.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "planned",
                "active",
                "cancelled",
                "unsuccessful",
                "complete",
                "withdrawn"
              ]
            }
          },
          "stages": {
            "title": "Procurement stages",
            "type": "array",
            "description": "Filter release stage. Leave empty to include all. Status and stage are separate filters.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "implementation"
              ]
            }
          },
          "maxItems": {
            "title": "Maximum dataset rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Shared cap across both sources including uncharged error rows.",
            "default": 100
          },
          "maxPagesPerSource": {
            "title": "Maximum pages per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Bounds scanning even when filters find no matches. A limit is reported in RUN_SUMMARY; increase it for wider coverage.",
            "default": 20
          },
          "pageSize": {
            "title": "Releases per source page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Official API page size, from 1 to 100.",
            "default": 100
          },
          "concurrency": {
            "title": "Maximum simultaneous requests",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "One or two concurrent requests. Pages within each source are sequential and paced at least one second apart.",
            "default": 2
          },
          "includeRaw": {
            "title": "Include original OCDS release",
            "type": "boolean",
            "description": "Adds rawOcds for auditing. Larger output, same notice event price.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}