{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Tenders — Find a Tender + Contracts Finder OCDS",
    "description": "UK public tenders from the official Find a Tender + Contracts Finder OCDS APIs (no HTML scraping, no API key). Filter by keywords, buyer, CPV, dates. One Markdown tender card + JSON per notice. 256 MB. Failed rows free. No email/phone harvesting.",
    "version": "0.1",
    "x-build-id": "V2e4xepehO8llVN1c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ingenious_quip_bxq~uk-tenders-ocds-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ingenious_quip_bxq-uk-tenders-ocds-markdown",
        "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/ingenious_quip_bxq~uk-tenders-ocds-markdown/runs": {
      "post": {
        "operationId": "runs-sync-ingenious_quip_bxq-uk-tenders-ocds-markdown",
        "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/ingenious_quip_bxq~uk-tenders-ocds-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-ingenious_quip_bxq-uk-tenders-ocds-markdown",
        "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": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Optional. All words must appear (case-insensitive) in title, description, buyer or CPV text. Use \"quotes\" for a phrase. The official OCDS APIs have no keyword search, so this filter runs on each page of notices in the date window."
          },
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Optional. A notice matches if ANY of these keywords appears. Combined with `query` as AND.",
            "items": {
              "type": "string"
            }
          },
          "buyerName": {
            "title": "Buyer name contains",
            "type": "string",
            "description": "Optional. Case-insensitive substring of the buyer / contracting authority name, e.g. \"NHS\" or \"County Council\"."
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Optional. CPV prefixes. Trailing zeros widen the match: 72000000 matches all IT services (72…), 48000000 software packages, 45233251 one exact code.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "enum": [
              "both",
              "find_a_tender",
              "contracts_finder"
            ],
            "type": "string",
            "description": "Which official service(s) to search.",
            "default": "both"
          },
          "stages": {
            "title": "Stages",
            "type": "array",
            "description": "OCDS stages to request: planning (pipeline / prior info), tender (open opportunities), award (contract awards). Empty = all stages.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award"
              ],
              "enumTitles": [
                "Planning / pipeline",
                "Tender (opportunities)",
                "Award"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "dateFrom": {
            "title": "Published / updated from",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2})?)?$|^\\d+\\s*(day|days|d)$",
            "type": "string",
            "description": "Optional. YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS. Default = dateTo (or now) minus `daysBack`. Contracts Finder filters on publishedFrom; Find a Tender on updatedFrom."
          },
          "dateTo": {
            "title": "Published / updated to",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2})?)?$",
            "type": "string",
            "description": "Optional. YYYY-MM-DD (end of day) or YYYY-MM-DDTHH:MM:SS. Default = now."
          },
          "daysBack": {
            "title": "Days back (when dateFrom is empty)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Look-back window in days when dateFrom is not set.",
            "default": 7
          },
          "openOnly": {
            "title": "Only notices with a future deadline",
            "type": "boolean",
            "description": "Keep only notices whose tender deadline is still in the future.",
            "default": false
          },
          "minValue": {
            "title": "Minimum value",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Keep only notices with an estimated/awarded value at or above this amount (notice currency, usually GBP). Notices without a value are dropped when set."
          },
          "noticeIds": {
            "title": "Notice IDs / OCIDs / URLs (direct fetch)",
            "type": "array",
            "description": "Optional. Fetch specific notices: Find a Tender notice IDs (093588-2026), FTS OCIDs (ocds-h6vhtk-06dab4), Contracts Finder notice GUIDs, or official notice / OCDS API URLs (find-tender.service.gov.uk/Notice/…, contractsfinder.service.gov.uk/Notice/…). URLs are converted to API calls; HTML pages are never fetched. When set, search is skipped unless 'Also run search' is on.",
            "items": {
              "type": "string"
            }
          },
          "releaseUrls": {
            "title": "OCDS release URLs (alias)",
            "type": "array",
            "description": "Optional alias of noticeIds for OCDS API URLs (…/api/1.0/ocdsReleasePackages/…, …/Published/Notice/releases/<guid>.json, …/Published/OCDS/Release/<id>).",
            "items": {
              "type": "string"
            }
          },
          "searchAlsoWithIds": {
            "title": "Also run search when IDs are given",
            "type": "boolean",
            "description": "By default a direct-fetch list skips the search. Turn on to do both.",
            "default": false
          },
          "maxNotices": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum notice cards to output (and charge) per run, across all sources. Newest first.",
            "default": 50
          },
          "maxPagesPerSource": {
            "title": "Max pages per source",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many API pages (up to 100 releases each) to scan per source while looking for matches. Raise for narrow filters over wide windows.",
            "default": 10
          },
          "latestPerOcid": {
            "title": "Latest release per procurement (OCID)",
            "type": "boolean",
            "description": "Keep only the newest release per OCID (drops older updates of the same procurement in the window).",
            "default": true
          },
          "descriptionMaxChars": {
            "title": "Description excerpt length",
            "minimum": 100,
            "maximum": 5000,
            "type": "integer",
            "description": "Max characters of the notice description kept in the card / dataset.",
            "default": 800
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Parallel API requests (sources / direct IDs). Kept low to respect the official services' rate limits.",
            "default": 2
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries on 429 / Contracts Finder 403 rate-limit pages / 5xx / timeouts, with backoff (Retry-After honoured).",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (s)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Per request. Contracts Finder stage-filtered searches can take 10–20 s.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}