{
  "openapi": "3.0.1",
  "info": {
    "title": "uk-hospitality-finder",
    "description": "Explore 63,384 historical UK hospitality business profiles with available emails, phones, websites and addresses. Filter restaurants, cafés, pubs and takeaways by city, postcode and category. Prioritize records with more contact details and export CSV/JSON. Contacts are not live-verified.",
    "version": "0.0",
    "x-build-id": "jziIqTwydPQs7LrAV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/studious_refill~uk-hospitality-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-studious_refill-uk-hospitality-finder",
        "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/studious_refill~uk-hospitality-finder/runs": {
      "post": {
        "operationId": "runs-sync-studious_refill-uk-hospitality-finder",
        "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/studious_refill~uk-hospitality-finder/run-sync": {
      "post": {
        "operationId": "run-sync-studious_refill-uk-hospitality-finder",
        "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": {
          "mode": {
            "title": "Output",
            "enum": [
              "profiles_and_insights",
              "profiles",
              "insights"
            ],
            "type": "string",
            "description": "Export matching historical profiles, summary statistics, or both.",
            "default": "profiles_and_insights"
          },
          "city": {
            "title": "City/locality label",
            "maxLength": 100,
            "type": "string",
            "description": "Optional exact historical locality name (leave blank for all UK). Source labels may be missing or uneven."
          },
          "postcodeAreas": {
            "title": "Postcode areas",
            "maxItems": 20,
            "type": "array",
            "description": "Optional UK postcode prefixes, such as SE, SW, EX. Separate filter intersects with city and category.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Business categories",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter normalized historical business type.",
            "items": {
              "type": "string",
              "enum": [
                "restaurant",
                "cafe",
                "takeaway",
                "bar",
                "hotel",
                "bakery",
                "catering",
                "other_hospitality",
                "unknown"
              ],
              "enumTitles": [
                "Restaurant",
                "Café / Coffee shop",
                "Takeaway",
                "Pub / Bar",
                "Hotel",
                "Bakery",
                "Catering",
                "Other hospitality",
                "Unknown"
              ]
            }
          },
          "keyword": {
            "title": "Business name contains",
            "maxLength": 80,
            "type": "string",
            "description": "Case-insensitive literal text search in a historical business name."
          },
          "historicalStatus": {
            "title": "Historical status",
            "enum": [
              "ANY",
              "OPERATIONAL_HISTORICAL",
              "PERMANENTLY_CLOSED_HISTORICAL",
              "TEMPORARILY_CLOSED_HISTORICAL",
              "CONFLICTING_HISTORICAL_STATUS",
              "UNKNOWN"
            ],
            "type": "string",
            "description": "An old operational label does not mean a business is currently open.",
            "default": "ANY"
          },
          "geographicEvidence": {
            "title": "Geographic evidence",
            "enum": [
              "high_only",
              "all"
            ],
            "type": "string",
            "description": "All records recommended; high_only excludes historical records missing complete geographic evidence.",
            "default": "all"
          },
          "maxResults": {
            "title": "Maximum profiles to export",
            "minimum": 1,
            "maximum": 63384,
            "type": "integer",
            "description": "Maximum business profiles returned in a single run (up to 63,384). High-volume runs may incur significant charges and require extra time; use max total cost in Run options.",
            "default": 100
          },
          "evidenceTier": {
            "title": "Documentary evidence tier",
            "enum": [
              "all",
              "MODERATE_OR_HIGH",
              "HIGH_DOCUMENTATION"
            ],
            "type": "string",
            "description": "Documentary source completeness, NOT business or contact validity.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "contacts_first",
              "documentation_first",
              "name"
            ],
            "type": "string",
            "description": "Contacts first prioritizes businesses with email, phone and website together, followed by two, one and zero channels. Not a deliverability score.",
            "default": "contacts_first"
          },
          "minimumContactFields": {
            "title": "Minimum available contact fields",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "0 keeps ALL records, including those without a contact. 3 requires email + phone + website.",
            "default": 0
          },
          "requireEmail": {
            "title": "Must have business email",
            "type": "boolean",
            "description": "Checks historical normalized field presence, not current reachability.",
            "default": false
          },
          "requirePhone": {
            "title": "Must have telephone",
            "type": "boolean",
            "description": "Checks historical normalized field presence, not current reachability.",
            "default": false
          },
          "requireWebsite": {
            "title": "Must have website",
            "type": "boolean",
            "description": "Checks historical normalized field presence, not current reachability.",
            "default": false
          },
          "privacyReview": {
            "title": "Privacy review flag filter",
            "enum": [
              "all",
              "exclude_flagged"
            ],
            "type": "string",
            "description": "A privacy flag indicates possible personally identifying contact information; absence of flag is not legal clearance.",
            "default": "all"
          },
          "offset": {
            "title": "Pagination offset",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Zero-based offset into the matching, consistently sorted dataset. Leave 0 for one-run exports; for pagination, keep all filters and sorting unchanged.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}