# Maps Chain Location Consistency Audit (`practical_ai_lab_jp/pal-maps-chain-location-consistency`) Actor

Detect inconsistent address, hours and contact fields across store-location data. For Multi-location retail operations and listing QA teams. Check the live Pricing tab and input limits.

- **URL**: https://apify.com/practical_ai_lab_jp/pal-maps-chain-location-consistency.md
- **Developed by:** [Practical AI Lab](https://apify.com/practical_ai_lab_jp) (community)
- **Categories:** Lead generation, SEO tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 location auditeds

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/running/actors-in-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

## Maps Chain Location Consistency Audit

Audit the multi-location listing data you already have. Give the Actor a list of location records (for example an export from your own listing management, a spreadsheet converted to JSON, or an existing Apify dataset) and it reports where names, addresses, phone numbers, websites and opening hours disagree across the chain, and which records look like duplicates.

**This Actor does not scrape Google Maps or any other website.** It makes no requests to listing sites, uses no proxies and needs no third-party API. It only analyses the records you provide.

### Who it is for

- Agencies and in-house teams that manage listings for brands with several to a few thousand locations.
- Anyone preparing a clean-up list before updating listings by hand or through an official listing tool.

### What it checks

| Area | Issue codes |
| --- | --- |
| Name | `NAME_MISSING`, `NAME_DIFFERS_FROM_BRAND`, `NAME_FORMAT_VARIANT` |
| Address | `ADDRESS_MISSING`, `ADDRESS_SUFFIX_STYLE_INCONSISTENT`, `ADDRESS_CASE_INCONSISTENT`, `ADDRESS_NO_POSTAL_CODE` |
| Phone | `PHONE_MISSING`, `PHONE_FORMAT_INCONSISTENT` |
| Website | `WEBSITE_MISSING`, `WEBSITE_INVALID`, `WEBSITE_DOMAIN_MISMATCH`, `WEBSITE_INSECURE_SCHEME`, `WEBSITE_TRACKING_PARAMETERS`, `WEBSITE_LANDING_PAGE_INCONSISTENT` |
| Hours | `HOURS_MISSING`, `HOURS_UNPARSEABLE`, `HOURS_INCOMPLETE_WEEK`, `HOURS_TIME_FORMAT_INCONSISTENT`, `HOURS_DIFFER_FROM_CHAIN_PATTERN` |
| Duplicates | `POSSIBLE_DUPLICATE_LOCATION` (with the related record index and the signals that matched) |
| Info | `COORDINATES_MISSING`, `LISTING_MARKED_PERMANENTLY_CLOSED`, `LISTING_MARKED_TEMPORARILY_CLOSED`, `RECORD_UNUSABLE` |

Severities are `high`, `medium`, `low` and `info`. Each audited record gets a `consistencyScore` (100 minus 10 per high, 5 per medium and 2 per low issue, never below 0).

#### How "consistent" is decided

Most checks compare a record with the **most common value in your data set** (for example the most common website domain or hours format). A reference is only used when at least 3 records have a value and one value holds a strict majority. Otherwise that check is skipped and the run summary says so. You can also set a reference brand name yourself.

#### How duplicates are found

Two records are flagged when they share a place ID, or have the same normalized address and a similar name, or the same phone and the same address, or are within the chosen distance with a similar name or the same phone. A phone number shared by many different addresses (a central call-center number) is not treated as a duplicate signal on its own. Candidate pairs are found with indexes and a coordinate grid, so large inputs do not require comparing every pair.

### Input

Copy the prefilled example in the Console, or use this shape:

```json
{
  "locations": [
    {
      "title": "Harbor Bean Coffee - Central Station",
      "address": "120 Market Street, Springfield, IL 62701",
      "phone": "(217) 555-0101",
      "website": "https://www.harborbean.example/",
      "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
      "location": { "lat": 39.8001, "lng": -89.6435 }
    },
    {
      "title": "HARBOR BEAN COFFEE",
      "address": "120 Market St, Springfield, IL 62701",
      "phone": "(217) 555-0101",
      "website": "https://harborbean.example/"
    }
  ],
  "brandName": "Harbor Bean Coffee",
  "duplicateDistanceMeters": 50,
  "nameSimilarityPercent": 85,
  "hoursPatternSeverity": "info"
}
```

| Field | Description |
| --- | --- |
| `locations` | Array of location objects. Recognised keys: `title`/`name`, `address` (or `street`, `city`, `state`, `postalCode`), `phone`, `website`, `openingHours`/`hours`, `placeId`/`id`, `location.lat`/`location.lng` (or `latitude`/`longitude`), `permanentlyClosed`, `temporarilyClosed`. |
| `sourceDatasetId` | Optional ID or name of an existing Apify dataset in your account. Used only when `locations` is empty. |
| `brandName` | Optional reference name. Branch suffixes such as " - Downtown", "(Airport)" or "#12" are ignored when comparing names. |
| `maxLocations` | Default 2000, maximum 10000. |
| `duplicateDistanceMeters` | Default 50. |
| `nameSimilarityPercent` | Default 85. |
| `hoursPatternSeverity` | `off`, `info` (default), `low` or `medium`. Locations can legitimately have different hours, so the default does not reduce the score. |

Hours can be a string (`"Mon-Fri: 9 AM - 5 PM; Sat: closed"`), an array of strings, an array of `{ "day", "hours" }` objects, or an object keyed by day name.

### Output

- **Dataset**: one item per input record with `index`, `status`, the key fields, `consistencyScore`, `issueCount`, `highestSeverity`, `duplicateGroupId` and an `issues` array. Each issue has `code`, `severity`, `field`, `message` and, where useful, `observed`, `expected`, `relatedIndexes` and `signals`.
- **Key-value store, record `SUMMARY`**: totals, issue counts per code, duplicate groups, the reference values that were derived from your data, and a list of caveats for this specific run.

Records with neither a name nor an address get status `skipped` and are not billed.

### Pricing event

The code emits one pay-per-event event, `location-audited`, once per audited record. It is submitted only after all results have been stored, and never when the input is invalid or the run fails before results are written. No price is configured in this repository; the payable plan must be set up separately in the Apify Console. If a maximum charge limit is set on the run, the Actor audits only as many records as that limit allows and reports it in `SUMMARY`.

### Limitations and sample-size caveats

- Results are heuristics over the data you supply. They are not checked against live listings, and the Actor cannot tell you which value is the correct one, only which values disagree.
- With fewer than 10 records, majority-based references are unreliable. With fewer than 3 records most chain-relative checks are skipped. If the majority value is itself wrong, the correct records are the ones flagged.
- Legitimate variation (sub-brands, shop-in-shop names, regional domains, seasonal or local hours) will be reported as an inconsistency. Review before changing anything.
- Address checks are text-based. The street-type style check looks at common English words (Street/St, Avenue/Ave, Road/Rd and similar); the postal-code check recognises common US, Japanese, Canadian and UK shapes and can miss other formats or mistake a five-digit street number for a postal code. There is no geocoding or address validation.
- Hours parsing handles common English notations (12-hour and 24-hour, day ranges, split shifts, "closed", "24 hours"). Other languages and layouts are reported as `HOURS_UNPARSEABLE`.
- Duplicate detection can flag two real shops that share a building or a very close address, and can miss duplicates with different names, addresses and coordinates. Coordinates close to the 180th meridian are not wrapped.
- Input is limited to 10000 records per run; records beyond `maxLocations` are ignored and the summary says so.
- No evidence is offered here about paid demand or accuracy on real-world data sets; validate on a sample of your own records first.

### Privacy

Only the records you provide are processed. The Actor does not collect personal data, does not send data to third parties and does not contact any listing site. Do not include personal contact details in the input.

# Actor input Schema

## `locations` (type: `array`):

Array of location objects. Recognised fields: title/name, address (or street, city, state, postalCode), phone, website, openingHours/hours, placeId, location.lat/location.lng (or latitude/longitude), permanentlyClosed, temporarilyClosed.

## `sourceDatasetId` (type: `string`):

ID or name of an existing Apify dataset in your account that holds location records. Used only when 'Location records' is empty.

## `brandName` (type: `string`):

Canonical brand name to compare listing names against. If empty, the most common name among your records is used (needs at least 3 records and a clear majority).

## `maxLocations` (type: `integer`):

Upper bound on records read from the input. Also caps cost and memory.

## `duplicateDistanceMeters` (type: `integer`):

Two records closer than this with a similar name or the same phone are flagged as possible duplicates.

## `nameSimilarityPercent` (type: `integer`):

Name cores at or above this similarity count as 'similar' for duplicate detection and are reported as medium (not high) severity name differences.

## `hoursPatternSeverity` (type: `string`):

Locations can legitimately have different hours. Choose how strongly a deviation from the most common weekly pattern is reported.

## Actor input object example

```json
{
  "locations": [
    {
      "title": "Harbor Bean Coffee - Central Station",
      "address": "120 Market Street, Springfield, IL 62701",
      "phone": "(217) 555-0101",
      "website": "https://www.harborbean.example/",
      "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
      "location": {
        "lat": 39.8001,
        "lng": -89.6435
      }
    },
    {
      "title": "Harbor Bean Coffee - Riverside",
      "address": "48 River Rd, Springfield, IL 62702",
      "phone": "217-555-0102",
      "website": "https://harborbean.example/locations/riverside",
      "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
      "location": {
        "lat": 39.825,
        "lng": -89.62
      }
    },
    {
      "title": "Harbour Bean Cafe",
      "address": "300 Oak Avenue, Springfield, IL 62703",
      "phone": "(217) 555-0103",
      "website": "http://harborbean.example?utm_source=listing",
      "openingHours": "Mon-Fri: 07:00-19:00; Sat-Sun: 08:00-17:00",
      "location": {
        "lat": 39.77,
        "lng": -89.66
      }
    },
    {
      "title": "HARBOR BEAN COFFEE",
      "address": "120 Market St, Springfield, IL 62701",
      "phone": "(217) 555-0101",
      "website": "https://harborbean.example/",
      "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
      "location": {
        "lat": 39.80012,
        "lng": -89.64352
      }
    },
    {
      "title": "Harbor Bean Coffee - Lakeside",
      "address": "9 Lake Drive, Springfield, IL",
      "phone": "217.555.0104",
      "website": "https://harborbean-shop.example/lakeside"
    },
    {
      "title": "Harbor Bean Coffee - Airport",
      "address": "1 Terminal Road, Springfield, IL 62707",
      "phone": "(217) 555-0105",
      "website": "https://harborbean.example/locations/airport",
      "openingHours": "Mon-Fri: 5 AM - 9 PM; Sat-Sun: 6 AM - 9 PM",
      "location": {
        "lat": 39.844,
        "lng": -89.677
      }
    }
  ],
  "maxLocations": 2000,
  "duplicateDistanceMeters": 50,
  "nameSimilarityPercent": 85,
  "hoursPatternSeverity": "info"
}
```

# Actor output Schema

## `results` (type: `string`):

Download rows from the latest run in JSON/CSV.

# 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 = {
    "locations": [
        {
            "title": "Harbor Bean Coffee - Central Station",
            "address": "120 Market Street, Springfield, IL 62701",
            "phone": "(217) 555-0101",
            "website": "https://www.harborbean.example/",
            "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
            "location": {
                "lat": 39.8001,
                "lng": -89.6435
            }
        },
        {
            "title": "Harbor Bean Coffee - Riverside",
            "address": "48 River Rd, Springfield, IL 62702",
            "phone": "217-555-0102",
            "website": "https://harborbean.example/locations/riverside",
            "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
            "location": {
                "lat": 39.825,
                "lng": -89.62
            }
        },
        {
            "title": "Harbour Bean Cafe",
            "address": "300 Oak Avenue, Springfield, IL 62703",
            "phone": "(217) 555-0103",
            "website": "http://harborbean.example?utm_source=listing",
            "openingHours": "Mon-Fri: 07:00-19:00; Sat-Sun: 08:00-17:00",
            "location": {
                "lat": 39.77,
                "lng": -89.66
            }
        },
        {
            "title": "HARBOR BEAN COFFEE",
            "address": "120 Market St, Springfield, IL 62701",
            "phone": "(217) 555-0101",
            "website": "https://harborbean.example/",
            "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
            "location": {
                "lat": 39.80012,
                "lng": -89.64352
            }
        },
        {
            "title": "Harbor Bean Coffee - Lakeside",
            "address": "9 Lake Drive, Springfield, IL",
            "phone": "217.555.0104",
            "website": "https://harborbean-shop.example/lakeside"
        },
        {
            "title": "Harbor Bean Coffee - Airport",
            "address": "1 Terminal Road, Springfield, IL 62707",
            "phone": "(217) 555-0105",
            "website": "https://harborbean.example/locations/airport",
            "openingHours": "Mon-Fri: 5 AM - 9 PM; Sat-Sun: 6 AM - 9 PM",
            "location": {
                "lat": 39.844,
                "lng": -89.677
            }
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("practical_ai_lab_jp/pal-maps-chain-location-consistency").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 = { "locations": [
        {
            "title": "Harbor Bean Coffee - Central Station",
            "address": "120 Market Street, Springfield, IL 62701",
            "phone": "(217) 555-0101",
            "website": "https://www.harborbean.example/",
            "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
            "location": {
                "lat": 39.8001,
                "lng": -89.6435,
            },
        },
        {
            "title": "Harbor Bean Coffee - Riverside",
            "address": "48 River Rd, Springfield, IL 62702",
            "phone": "217-555-0102",
            "website": "https://harborbean.example/locations/riverside",
            "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
            "location": {
                "lat": 39.825,
                "lng": -89.62,
            },
        },
        {
            "title": "Harbour Bean Cafe",
            "address": "300 Oak Avenue, Springfield, IL 62703",
            "phone": "(217) 555-0103",
            "website": "http://harborbean.example?utm_source=listing",
            "openingHours": "Mon-Fri: 07:00-19:00; Sat-Sun: 08:00-17:00",
            "location": {
                "lat": 39.77,
                "lng": -89.66,
            },
        },
        {
            "title": "HARBOR BEAN COFFEE",
            "address": "120 Market St, Springfield, IL 62701",
            "phone": "(217) 555-0101",
            "website": "https://harborbean.example/",
            "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
            "location": {
                "lat": 39.80012,
                "lng": -89.64352,
            },
        },
        {
            "title": "Harbor Bean Coffee - Lakeside",
            "address": "9 Lake Drive, Springfield, IL",
            "phone": "217.555.0104",
            "website": "https://harborbean-shop.example/lakeside",
        },
        {
            "title": "Harbor Bean Coffee - Airport",
            "address": "1 Terminal Road, Springfield, IL 62707",
            "phone": "(217) 555-0105",
            "website": "https://harborbean.example/locations/airport",
            "openingHours": "Mon-Fri: 5 AM - 9 PM; Sat-Sun: 6 AM - 9 PM",
            "location": {
                "lat": 39.844,
                "lng": -89.677,
            },
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("practical_ai_lab_jp/pal-maps-chain-location-consistency").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 '{
  "locations": [
    {
      "title": "Harbor Bean Coffee - Central Station",
      "address": "120 Market Street, Springfield, IL 62701",
      "phone": "(217) 555-0101",
      "website": "https://www.harborbean.example/",
      "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
      "location": {
        "lat": 39.8001,
        "lng": -89.6435
      }
    },
    {
      "title": "Harbor Bean Coffee - Riverside",
      "address": "48 River Rd, Springfield, IL 62702",
      "phone": "217-555-0102",
      "website": "https://harborbean.example/locations/riverside",
      "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
      "location": {
        "lat": 39.825,
        "lng": -89.62
      }
    },
    {
      "title": "Harbour Bean Cafe",
      "address": "300 Oak Avenue, Springfield, IL 62703",
      "phone": "(217) 555-0103",
      "website": "http://harborbean.example?utm_source=listing",
      "openingHours": "Mon-Fri: 07:00-19:00; Sat-Sun: 08:00-17:00",
      "location": {
        "lat": 39.77,
        "lng": -89.66
      }
    },
    {
      "title": "HARBOR BEAN COFFEE",
      "address": "120 Market St, Springfield, IL 62701",
      "phone": "(217) 555-0101",
      "website": "https://harborbean.example/",
      "openingHours": "Mon-Fri: 7 AM - 7 PM; Sat-Sun: 8 AM - 5 PM",
      "location": {
        "lat": 39.80012,
        "lng": -89.64352
      }
    },
    {
      "title": "Harbor Bean Coffee - Lakeside",
      "address": "9 Lake Drive, Springfield, IL",
      "phone": "217.555.0104",
      "website": "https://harborbean-shop.example/lakeside"
    },
    {
      "title": "Harbor Bean Coffee - Airport",
      "address": "1 Terminal Road, Springfield, IL 62707",
      "phone": "(217) 555-0105",
      "website": "https://harborbean.example/locations/airport",
      "openingHours": "Mon-Fri: 5 AM - 9 PM; Sat-Sun: 6 AM - 9 PM",
      "location": {
        "lat": 39.844,
        "lng": -89.677
      }
    }
  ]
}' |
apify call practical_ai_lab_jp/pal-maps-chain-location-consistency --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,practical_ai_lab_jp/pal-maps-chain-location-consistency"
        }
    }
}
```

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/CnqgbHTggreLs4vWf/builds/VwThE54daWktCLNrt/openapi.json
