{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Contracts Finder Scraper: Tenders & Awards",
    "description": "Scrape UK Contracts Finder, no login: live tenders, early engagement, future opportunities and contract awards from the official API. Get buyer contacts, CPV codes, values, deadlines, winning suppliers with Companies House numbers and documents. Monitor new or changed notices, pay per notice.",
    "version": "0.1",
    "x-build-id": "9OQJX00Q9bpaKucae"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~uk-contracts-finder-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-uk-contracts-finder-scraper",
        "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/automation_craft~uk-contracts-finder-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-uk-contracts-finder-scraper",
        "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/automation_craft~uk-contracts-finder-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-uk-contracts-finder-scraper",
        "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": {
          "publishedWithinDays": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 3660,
            "type": "integer",
            "description": "Rolling window of notices published or updated in the last N days. Ignored when Published from is set. With a monitoring memory, later runs start where the previous run ended instead. Example: 7.",
            "default": 7
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Start of the window, as YYYY-MM-DD or an ISO date and time (UK dates, BST aware). Leave empty to use Published in the last N days. An impossible date stops the run with a warning and no charge."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "End of the window, as YYYY-MM-DD or an ISO date and time. Leave empty for now."
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Contracts Finder's four notice types. Leave empty for all of them. API values: early_engagement, future_opportunity, opportunity, award.",
            "items": {
              "type": "string",
              "enum": [
                "opportunity",
                "award",
                "early_engagement",
                "future_opportunity"
              ],
              "enumTitles": [
                "Opportunity (live tender)",
                "Awarded contract",
                "Early engagement",
                "Future opportunity"
              ]
            }
          },
          "openOnly": {
            "title": "Open notices only",
            "type": "boolean",
            "description": "Only opportunities and engagement notices whose deadline has not passed. Awards are never open, so combine this with the opportunity type.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many notice rows (new, changed and, with Also return unchanged known notices, the free unchanged ones together). Status and summary rows do not count and are free.",
            "default": 100
          },
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "A notice matches when its title or description contains any of these words or phrases as whole words, case insensitive. Example: cleaning, facilities management. Use CPV codes to search by category.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices whose title or description contains any of these words or phrases.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes. A padded code like 72000000 or a prefix like 722 matches that whole branch. Example: 72000000 for IT services, 45 for construction work.",
            "items": {
              "type": "string"
            }
          },
          "excludeCpvCodes": {
            "title": "Exclude CPV codes or prefixes",
            "type": "array",
            "description": "Drop notices classified under any of these CPV codes or prefixes.",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Delivery regions",
            "type": "array",
            "description": "Keep notices delivered in any of these regions. Notices open to all of the UK are kept too unless you untick Include nationwide notices.",
            "items": {
              "type": "string",
              "enum": [
                "North East",
                "North West",
                "Yorkshire and the Humber",
                "East Midlands",
                "West Midlands",
                "East of England",
                "London",
                "South East",
                "South West",
                "Scotland",
                "Wales",
                "Northern Ireland"
              ]
            }
          },
          "includeNationwide": {
            "title": "Include nationwide notices",
            "type": "boolean",
            "description": "With a region filter, also keep notices that are open to every region or name no location.",
            "default": true
          },
          "postcodes": {
            "title": "Postcodes or postcode areas",
            "type": "array",
            "description": "Match the delivery or buyer postcode. LS matches the whole Leeds area, LS1 one district, a full postcode one address.",
            "items": {
              "type": "string"
            }
          },
          "nearPostcode": {
            "title": "Within a radius of postcode",
            "type": "string",
            "description": "Keep notices within Radius miles of this postcode, using Contracts Finder's own search. Example: LS1 4AP."
          },
          "radiusMiles": {
            "title": "Radius (miles)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Radius for Within a radius of postcode, 1 to 100 miles.",
            "default": 10
          },
          "minValue": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose value range reaches at least this amount. Awards are judged by the awarded value. Notices with no value are dropped unless Include notices with no value is ticked."
          },
          "maxValue": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose value range starts at or below this amount."
          },
          "includeUnknownValue": {
            "title": "Include notices with no value",
            "type": "boolean",
            "description": "With a value filter, also keep notices that publish no value or a placeholder of 0 or 1 pound.",
            "default": false
          },
          "buyerNames": {
            "title": "Buyer names",
            "type": "array",
            "description": "Keep notices whose buying organisation name contains any of these words or phrases as whole words, case insensitive. Example: NHS, Leeds City Council.",
            "items": {
              "type": "string"
            }
          },
          "excludeBuyerNames": {
            "title": "Exclude buyer names",
            "type": "array",
            "description": "Drop notices whose buyer name contains any of these words or phrases as whole words.",
            "items": {
              "type": "string"
            }
          },
          "supplierNames": {
            "title": "Winning supplier names",
            "type": "array",
            "description": "Awards only: keep notices won by a supplier whose name contains any of these words or phrases as whole words (Capita does not match Capital). Useful for competitor and incumbent tracking.",
            "items": {
              "type": "string"
            }
          },
          "supplierCompanyNumbers": {
            "title": "Winning supplier Companies House numbers",
            "type": "array",
            "description": "Awards only: keep notices won by these Companies House numbers (leading zeros optional). Example: 02203474.",
            "items": {
              "type": "string"
            }
          },
          "smeSuitableOnly": {
            "title": "Suitable for SMEs only",
            "type": "boolean",
            "description": "Keep only notices the buyer marked as suitable for small and medium enterprises.",
            "default": false
          },
          "vcseSuitableOnly": {
            "title": "Suitable for VCSEs only",
            "type": "boolean",
            "description": "Keep only notices the buyer marked as suitable for voluntary, community and social enterprises.",
            "default": false
          },
          "excludeCallOffs": {
            "title": "Exclude framework and DPS call-offs",
            "type": "boolean",
            "description": "Drop call-offs from framework agreements and dynamic purchasing systems (about 60 percent of awards), keeping competed contracts.",
            "default": false
          },
          "closingWithinDays": {
            "title": "Closing within N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep notices whose deadline is between now and N days from now. Example: 14."
          },
          "deadlineFrom": {
            "title": "Deadline from",
            "type": "string",
            "description": "Keep notices whose deadline is on or after this date (YYYY-MM-DD)."
          },
          "deadlineTo": {
            "title": "Deadline to",
            "type": "string",
            "description": "Keep notices whose deadline is on or before this date (YYYY-MM-DD)."
          },
          "awardedFrom": {
            "title": "Awarded from",
            "type": "string",
            "description": "Awards only: keep contracts awarded on or after this date (YYYY-MM-DD)."
          },
          "awardedTo": {
            "title": "Awarded to",
            "type": "string",
            "description": "Awards only: keep contracts awarded on or before this date (YYYY-MM-DD)."
          },
          "noticeIds": {
            "title": "Look up notice ids or URLs",
            "type": "array",
            "description": "Fetch these notices directly (notice GUIDs or contractsfinder.service.gov.uk/Notice/... links). When set, the window and filters are not used.",
            "items": {
              "type": "string"
            }
          },
          "includeNoticeDetails": {
            "title": "Add notice details (phone, attachments, history)",
            "type": "boolean",
            "description": "One extra call per notice for what only the notice record carries: buyer phone and website, every attachment with its file name, supplier DUNS and reference, version history and view count. Billed per notice that returned details. Contracts Finder allows about 5 calls a minute, so this is capped by Maximum notices with details.",
            "default": false
          },
          "maxDetailNotices": {
            "title": "Maximum notices with details",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit for Add notice details, because each detail call takes about 12 seconds under Contracts Finder's rate limit.",
            "default": 25
          },
          "includeOcdsRelease": {
            "title": "Include the full OCDS release",
            "type": "boolean",
            "description": "Attach the complete Open Contracting release as published (ocdsRelease) next to the flattened fields. No extra cost.",
            "default": true
          },
          "linkRelatedNotices": {
            "title": "Link opportunities and awards",
            "type": "boolean",
            "description": "Link every notice to the other notices of the same procurement (same OCDS ocid) seen in this run or remembered by the monitoring memory, so an award points to its original opportunity.",
            "default": true
          },
          "memoryName": {
            "title": "Monitoring memory name",
            "type": "string",
            "description": "Name a memory to turn the run into a monitor: each run returns only notices that are new or changed since the previous run with the same name, and unchanged ones are skipped free. Example: it-tenders-daily."
          },
          "resetMemory": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget everything stored under the memory name before this run.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Also return unchanged known notices (free)",
            "type": "boolean",
            "description": "With a memory, also return notices already delivered and unchanged, flagged changeType unchanged and never charged. They count toward Maximum notices.",
            "default": false
          },
          "searchMethod": {
            "title": "Search method",
            "enum": [
              "auto",
              "feed",
              "search"
            ],
            "type": "string",
            "description": "auto picks the path with fewer API calls. feed reads the official OCDS feed (every field, best for recent windows). search uses Contracts Finder's own search first (best for long windows and postcode radius), then fetches the full release of each hit.",
            "default": "auto"
          },
          "maxApiCalls": {
            "title": "Maximum API calls",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on calls to Contracts Finder in one run. Contracts Finder allows about 5 calls a minute, so 150 calls is about 30 minutes.",
            "default": 150
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: Contracts Finder is an open government API. By default the run uses its own IP and switches to an Apify proxy session only if the IP is rate limited by someone else."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}