# uk-hospitality-finder (`studious_refill/uk-hospitality-finder`) Actor

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.

- **URL**: https://apify.com/studious_refill/uk-hospitality-finder.md
- **Developed by:** [Mohammad Abderraziq](https://apify.com/studious_refill) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.05 / 1,000 business profiles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## UK Hospitality Historical Contacts & Profiles — V5 Bulk Export

**63,384 historical UK hospitality establishment records**, with *email, phone, website* where available. This is an **England-dominant, uneven-coverage historical corpus**, not a live scraper, current verified B2B leads service, full UK census, or guarantee of outreach consent.

### Why this version

Unlike V3, V4 retains **all 63,384 unique source record IDs**, including the 43,222 records outside the strict 20,162 high-documentation tier. It includes normalized historical email, UK E.164 telephone, and website URL fields where their source quality labels allow. Ten source-supplied website values labeled INVALID_FORMAT are excluded (other invalid emails and phones likewise excluded). No contact details are fabricated or live-verified.

Contact coverage in the shipped SQLite DB:

| Property | Records |
|---|---:|
| Records | 63,384 |
| Email (historical syntax-valid) | 41,775 |
| Phone (historical format-valid) | 39,494 |
| Website (historical URL-format-valid) | 31,127 |
| Email + phone + website | 21,987 |
| Any two fields | 8,954 |
| Any one field | 28,527 |
| None | 3,916 |
| High documentation | 20,162 |
| Source potential-personal-contact flag | 40,874 |

### Sorting and filters

Default inputs include all 63,384 records, with contact completeness first. Records are sorted by:

1. Number of available channels (3 → 2 → 1 → 0)
2. For a tie, email presence, then telephone presence, then website presence
3. Historical operating status, then source privacy-review flag, then heuristic documentation score
4. Stable record ID (deterministic pagination)

Set `minimumContactFields=3` to require all three. Alternatively enable `requireEmail`, `requirePhone` and/or `requireWebsite`. These are **presence checks**, not live verification. Other filters include exact historical city/locality label, UK postcode area(s), normalized category, historical status, business-name keyword, documentation tier and geographic evidence. `privacyReview=exclude_flagged` excludes rows with source privacy-review flags; it does **not** guarantee privacy compliance.

`sortBy` can also be `documentation_first` or `name`.

#### Input examples

**Best contact-complete London cafés**:

```json
{"mode":"profiles_and_insights","city":"London","categories":["cafe"],"minimumContactFields":3,"sortBy":"contacts_first","geographicEvidence":"all","maxResults":100,"offset":0}
```

**All records, contacts first — page 1**:

```json
{"mode":"profiles","sortBy":"contacts_first","geographicEvidence":"all","maxResults":2500,"offset":0}
```

**Bulk export (all matching records in one run):**

```json
{"mode":"profiles","sortBy":"contacts_first","minimumContactFields":1,"maxResults":63384,"offset":0}
```

At least one contact channel is required in this example; it returns at most 59,468 historical profiles. To include all 63,384 records, set `minimumContactFields=0`. Bulk mode uploads in 200-item batches and charges per successfully exported profile when pay-per-event is configured. Use Apify Run options to set a maximum cost and sufficient run timeout. A limited budget may produce a partial dataset, indicated by `RUN_SUMMARY.partialDueToBudget=true`. Tests on Apify Cloud remain necessary to determine full-run duration. The current QA example input still exports one record.

**Page 2**: For smaller exports, keep all filters and ordering unchanged and set `offset=2500` (then 5000, 7500, etc.).

#### Output

Each row includes `businessName`, `email`, `phone`, `website`, address, city, postcode, category, historical status, contact coverage, source flags, documentation score, and explicit disclaimers. Empty contact values are `null` in Apify dataset JSON. Phone numbers are normalized to `+44` international format where a historically valid value was supplied. The standalone CSV prepends an Excel-safe quote to the phone field; the Actor JSON doesn't.

`INSIGHTS` summarizes counts *only in the filtered source corpus*, with subgroup suppression below 10 records. `RUN_SUMMARY` gives match count, written rows, page offset, dataset mode and budget-limited partial-output status.

#### Provenance, quality & privacy limitations

- Owner has stated that they own and can redistribute the supplied data; this is an **owner self-attestation**, not independent rights verification.
- **All observation dates are unknown**; website availability, email deliverability, phone reachability, business operation and contact permissions are **not independently verified**.
- The source's **40,874 potential-personal-contact flags** are retained per row. Some emails may name an individual; some phone numbers may be mobiles. Verify a lawful basis, UK GDPR/privacy requirements, PECR/direct marketing obligations, and any upstream licence conditions before commercial use, especially for individual/sole-trader contacts.
- Contact evidence and `evidenceScore` are heuristic completeness indicators, not a customer contactability score. No source IDs or private source snapshots are included.
- **63,384 unique records** do not guarantee that every record represents a distinct operating establishment; business duplicates can exist despite unique source IDs.
- ZIP/SQLite is sensitive: inspect and protect the bundled contact data appropriately.

### Rebuild and test

From the project root:

```
python3 scripts/verify_owned_release.py
python3 -m unittest discover -s tests -v
```

To reproduce from your own original CSV (this will not overwrite existing output files):

```
python3 scripts/build_owned_contacts.py --input-csv /secure/hospitality.csv --output-db /secure/owned.sqlite --manifest /secure/owner_attestation.json --report /secure/quality_report.json
```

The shipped `data/owned.sqlite` contains the real owner-supplied 63,384-record database; no master source snapshots are packaged. Build scripts are supplied for reproducibility. `.actorignore` excludes CSVs from the Apify source push.

### Deploy to existing Actor

```
python3 scripts/verify_owned_release.py
python3 -m unittest discover -s tests -v
apify login
apify push studious_refill/uk-hospitality-finder --version 0.0
```

Review your Actor's live `.actor/input_schema.json`, dataset display, and PPE event pricing in Console after build. Live event names are case-sensitive: `Business-profile` and `Insights-report` (as returned by the run API). The file `.actor/pay_per_event.json` is only a local pricing reference; it does not automatically modify the live Console monetization. The suggested `Business-profile` price is $0.00005 per profile ($0.05 per 1,000), based on the current Store display; confirm the actual configured price before sales.

**Verification:** Local SQLite, query and mocked Apify charge tests passed. An actual Apify Cloud build/run and live real-world contact verification have NOT been performed here.

# Actor input Schema

## `mode` (type: `string`):

Export matching historical profiles, summary statistics, or both.

## `city` (type: `string`):

Optional exact historical locality name (leave blank for all UK). Source labels may be missing or uneven.

## `postcodeAreas` (type: `array`):

Optional UK postcode prefixes, such as SE, SW, EX. Separate filter intersects with city and category.

## `categories` (type: `array`):

Filter normalized historical business type.

## `keyword` (type: `string`):

Case-insensitive literal text search in a historical business name.

## `historicalStatus` (type: `string`):

An old operational label does not mean a business is currently open.

## `geographicEvidence` (type: `string`):

All records recommended; high_only excludes historical records missing complete geographic evidence.

## `maxResults` (type: `integer`):

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.

## `evidenceTier` (type: `string`):

Documentary source completeness, NOT business or contact validity.

## `sortBy` (type: `string`):

Contacts first prioritizes businesses with email, phone and website together, followed by two, one and zero channels. Not a deliverability score.

## `minimumContactFields` (type: `integer`):

0 keeps ALL records, including those without a contact. 3 requires email + phone + website.

## `requireEmail` (type: `boolean`):

Checks historical normalized field presence, not current reachability.

## `requirePhone` (type: `boolean`):

Checks historical normalized field presence, not current reachability.

## `requireWebsite` (type: `boolean`):

Checks historical normalized field presence, not current reachability.

## `privacyReview` (type: `string`):

A privacy flag indicates possible personally identifying contact information; absence of flag is not legal clearance.

## `offset` (type: `integer`):

Zero-based offset into the matching, consistently sorted dataset. Leave 0 for one-run exports; for pagination, keep all filters and sorting unchanged.

## Actor input object example

```json
{
  "mode": "profiles",
  "city": "London",
  "historicalStatus": "ANY",
  "geographicEvidence": "all",
  "maxResults": 1,
  "evidenceTier": "all",
  "sortBy": "contacts_first",
  "minimumContactFields": 3,
  "requireEmail": false,
  "requirePhone": false,
  "requireWebsite": false,
  "privacyReview": "all",
  "offset": 0
}
```

# Actor output Schema

## `profiles` (type: `string`):

Profiles, if export mode was selected.

## `insights` (type: `string`):

Source-corpus distribution with low-count suppression.

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "profiles",
    "city": "London",
    "maxResults": 1,
    "sortBy": "contacts_first",
    "minimumContactFields": 3,
    "offset": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("studious_refill/uk-hospitality-finder").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "profiles",
    "city": "London",
    "maxResults": 1,
    "sortBy": "contacts_first",
    "minimumContactFields": 3,
    "offset": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("studious_refill/uk-hospitality-finder").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "profiles",
  "city": "London",
  "maxResults": 1,
  "sortBy": "contacts_first",
  "minimumContactFields": 3,
  "offset": 0
}' |
apify call studious_refill/uk-hospitality-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studious_refill/uk-hospitality-finder"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/LkmfZGxKmksCJRO1N/builds/jziIqTwydPQs7LrAV/openapi.json
