# Business Location Page Inventory (`junipr/business-location-page-inventory`) Actor

Inventory business location pages across a site and normalize address, phone, hours, services, geo signals, links, and location-page health in one dataset

- **URL**: https://apify.com/junipr/business-location-page-inventory.md
- **Developed by:** [junipr](https://apify.com/junipr) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.50 / 1,000 location page scanneds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Business Location Page Inventory

Inventory location pages across a multi-location site and normalize public address, phone, hours, services, coordinates, duplicate NAP groups, and page health.

### What you get

- Discover location pages from start URLs, sitemaps, and internal links.
- Normalize LocalBusiness, Organization, Place, or Store JSON-LD alongside visible page evidence.
- Compare discovered records with an expected location list and emit explicit missing-location rows.
- Detect duplicate NAP groups and optionally retain one normalized record per group.
- Export migration-ready CSV, issue JSON, evidence, and run metadata.

### Input

```json
{
  "startUrls": [
    "https://example.com/locations"
  ],
  "sitemapUrls": [
    "https://example.com/sitemap.xml"
  ],
  "allowedDomains": [
    "example.com"
  ],
  "maxPages": 10,
  "maxDepth": 1,
  "maxLocations": 10,
  "locationUrlPatterns": [
    "/locations/",
    "/stores/"
  ],
  "expectedLocations": [
    "Austin",
    "Dallas"
  ],
  "extractHours": true,
  "extractServices": true,
  "dedupeByNap": true,
  "includeGeoCoordinates": true,
  "includeEvidence": true,
  "includeRawSnapshots": false,
  "requestDelayMs": 250,
  "timeoutMs": 15000,
  "userAgentMode": "standard",
  "maxChargeUsd": 15,
  "includeReport": true
}
```

Use `htmlInputs` when you already have source HTML or need deterministic recurring analysis. URL runs accept normal public HTTP(S) pages. Private-network and unsupported URL targets are rejected.

### Dataset output

Each dataset item is a complete, schema-defined record. Fields that are not present in the source remain `null` rather than being guessed.

```json
{
  "sourceUrl": "https://example.com/locations/austin",
  "recordType": "business_location",
  "issueCode": "business_location_page_inventory_location_record",
  "locationName": "Example Plumbing — Austin",
  "streetAddress": "100 Main St",
  "addressLocality": "Austin",
  "addressRegion": "TX",
  "postalCode": "78701",
  "phone": "+1-512-555-0100",
  "hoursRaw": "Mo-Fr 08:00-18:00",
  "servicesListed": [
    "Emergency Plumbing"
  ],
  "duplicateNapGroup": null,
  "locationPageHealthScore": 100
}
```

### Reports

A successful run can write:

- `business-location-page-inventory-summary-report.md`
- `business-location-page-inventory-records.csv`
- `business-location-page-inventory-issues.json`
- `business-location-page-inventory-evidence-samples.json`
- `business-location-page-inventory-run-metadata.json`

Reports include row counts, issue severities, evidence references, recommendations, and the input fields consumed by the run.

### Pricing and cost controls

This actor uses pay-per-event pricing with Apify platform usage pass-through off:

- actor-start — $0.01000 per run
- location-page-scanned — $0.00650 per page
- location-record-extracted — $0.00295 per record
- location-issue-emitted — $0.00295 per issue
- audit-report-generated — $0.08000 per report

The default `maxChargeUsd` is $15. The runtime checks the local budget and the Apify charge result before every paid dataset item. If either limit is reached, it stops before emitting unpaid output and writes billing diagnostics to key-value storage.

### Safe crawling behavior

- Public HTTP(S) sources only.
- Private-network, localhost, and unsupported protocol targets are rejected.
- `allowedDomains`, `maxPages`, actor-specific caps, `maxDepth`, `timeoutMs`, and `requestDelayMs` bound discovery.
- Supplied HTML is processed without an external request.
- Protected or authenticated sources are outside the supported public-data scope.

### Limitations

- Coordinates are emitted only when present in structured source evidence.
- Duplicate NAP detection normalizes visible text but cannot determine legal branch identity.
- Missing expected locations reflect the names supplied in the run input.

### Common use cases

- Prepare a normalized location inventory before migration.
- Find duplicate NAP pages across franchise sites.
- Compare discovered pages with an expected branch list.

# Actor input Schema

## `startUrls` (type: `array`):

Public site roots or known location pages.

## `sitemapUrls` (type: `array`):

Optional public XML sitemaps used to discover location pages.

## `htmlInputs` (type: `array`):

Optional source-backed location page snapshots.

## `allowedDomains` (type: `array`):

Optional domain allowlist for discovery.

## `maxPages` (type: `integer`):

Maximum pages fetched or analyzed.

## `maxDepth` (type: `integer`):

Internal-link discovery depth from each start URL.

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

Maximum normalized location records retained.

## `includeEvidence` (type: `boolean`):

Include visible source excerpts in output rows.

## `includeRawSnapshots` (type: `boolean`):

Reserve raw snapshots in run artifacts when enabled.

## `requestDelayMs` (type: `integer`):

Delay between public HTTP requests in milliseconds.

## `timeoutMs` (type: `integer`):

Per-request timeout in milliseconds.

## `userAgentMode` (type: `string`):

Normal HTTP user-agent profile.

## `locationUrlPatterns` (type: `array`):

Path fragments used to prioritize likely location pages.

## `expectedLocations` (type: `array`):

Optional branch or city names used to report inventory gaps.

## `extractHours` (type: `boolean`):

Normalize visible or structured opening hours.

## `extractServices` (type: `boolean`):

Normalize visible or structured service names.

## `dedupeByNap` (type: `boolean`):

Retain one record per duplicate business-name, address, and phone group.

## `includeGeoCoordinates` (type: `boolean`):

Include coordinates only when present in structured page evidence.

## `maxChargeUsd` (type: `number`):

Maximum estimated PPE spend before a graceful stop.

## `includeReport` (type: `boolean`):

Write inventory and evidence reports to key-value storage.

## Actor input object example

```json
{
  "startUrls": [
    "https://example.com/"
  ],
  "sitemapUrls": [],
  "htmlInputs": [],
  "allowedDomains": [],
  "maxPages": 1,
  "maxDepth": 1,
  "maxLocations": 10,
  "includeEvidence": true,
  "includeRawSnapshots": false,
  "requestDelayMs": 250,
  "timeoutMs": 15000,
  "userAgentMode": "standard",
  "locationUrlPatterns": [
    "/locations/",
    "/stores/",
    "/branches/"
  ],
  "expectedLocations": [],
  "extractHours": true,
  "extractServices": true,
  "dedupeByNap": true,
  "includeGeoCoordinates": true,
  "maxChargeUsd": 15,
  "includeReport": true
}
```

# Actor output Schema

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

No description

## `report` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("junipr/business-location-page-inventory").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("junipr/business-location-page-inventory").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 '{}' |
apify call junipr/business-location-page-inventory --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,junipr/business-location-page-inventory"
        }
    }
}

```

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/YmDjN79dETrmrdpaP/builds/xrowdTFsuZUcNfgOt/openapi.json
