# Citation Directory Listing Extractor (`junipr/citation-directory-listing-extractor`) Actor

Extract publicly visible business citation/listing information from directory URLs and normalize NAP, categories, website links, hours, and...

- **URL**: https://apify.com/junipr/citation-directory-listing-extractor.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 directory 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

## Citation Directory Listing Extractor

Extract publicly visible citation and directory listing fields, compare them with expected business hints, and produce a normalized cleanup inventory.

### What you get

- Fetch only supplied public directory URLs; arbitrary directory crawling is disabled.
- Extract business name, address, phone, website, categories, hours, and claim or verification wording.
- Read common LocalBusiness, Organization, Place, and Store JSON-LD when available.
- Compare public fields with supplied name, phone, and category hints and flag exact mismatch dimensions.
- Deduplicate URL variants by normalized business name, phone, and address.

### Input

```json
{
  "startUrls": [
    "https://example.com/directory/example-plumbing"
  ],
  "directoryUrls": [],
  "allowedDomains": [
    "example.com"
  ],
  "maxPages": 5,
  "maxDepth": 0,
  "maxDirectoryUrls": 5,
  "businessNameHints": [
    "Example Plumbing"
  ],
  "phoneHints": [
    "+1-512-555-0100"
  ],
  "categoryHints": [
    "Plumber"
  ],
  "extractClaimSignals": true,
  "dedupeListings": true,
  "includeEvidence": true,
  "includeRawSnapshots": false,
  "requestDelayMs": 250,
  "timeoutMs": 15000,
  "userAgentMode": "standard",
  "maxChargeUsd": 10,
  "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/directory/example-plumbing",
  "recordType": "citation_listing",
  "issueCode": "citation_directory_listing_extractor_record_extracted",
  "directoryDomain": "example.com",
  "businessName": "Example Plumbing",
  "address": "100 Main St, Austin, TX 78701",
  "phone": "+1-512-555-0100",
  "websiteUrl": "https://example-plumbing.example/",
  "categories": [
    "Plumber"
  ],
  "hoursFound": true,
  "claimedSignal": true,
  "listingCompletenessScore": 100,
  "napMatchStatus": "matched"
}
```

### Reports

A successful run can write:

- `citation-directory-listing-extractor-summary-report.md`
- `citation-directory-listing-extractor-records.csv`
- `citation-directory-listing-extractor-issues.json`
- `citation-directory-listing-extractor-evidence-samples.json`
- `citation-directory-listing-extractor-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
- directory-page-scanned — $0.00650 per page
- citation-record-extracted — $0.00295 per record
- citation-finding-emitted — $0.00295 per finding
- audit-report-generated — $0.08000 per report

The default `maxChargeUsd` is $10. 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

- Only fields visible in public HTML or structured data are returned.
- The actor does not sign in, claim listings, or query private profiles.
- Claim state is returned only when explicit public wording is present.

### Common use cases

- Build a citation cleanup inventory.
- Compare NAP fields across supplied directories.
- Find publicly visible unclaimed or incomplete listings.

# Actor input Schema

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

Public directory or citation listing pages.

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

Optional public sitemap URLs for user-selected directory sites.

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

Optional source-backed directory listing snapshots.

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

Optional domain allowlist for supplied URLs.

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

Maximum pages fetched or analyzed.

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

Reserved discovery depth; supplied URL mode does not crawl arbitrary directory links.

## `maxDirectoryUrls` (type: `integer`):

Maximum supplied directory pages fetched.

## `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.

## `directoryUrls` (type: `array`):

Additional public listing URLs merged with startUrls.

## `businessNameHints` (type: `array`):

Expected public business names for consistency comparison.

## `phoneHints` (type: `array`):

Expected public phone numbers for NAP comparison.

## `categoryHints` (type: `array`):

Expected public listing categories.

## `extractClaimSignals` (type: `boolean`):

Extract visible claimed, verified, or unclaimed wording.

## `dedupeListings` (type: `boolean`):

Remove duplicate normalized records from the result set.

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

Maximum estimated PPE spend before a graceful stop.

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

Write citation cleanup and evidence reports to key-value storage.

## Actor input object example

```json
{
  "startUrls": [
    "https://example.com/"
  ],
  "sitemapUrls": [],
  "htmlInputs": [],
  "allowedDomains": [],
  "maxPages": 1,
  "maxDepth": 0,
  "maxDirectoryUrls": 10,
  "includeEvidence": true,
  "includeRawSnapshots": false,
  "requestDelayMs": 250,
  "timeoutMs": 15000,
  "userAgentMode": "standard",
  "directoryUrls": [],
  "businessNameHints": [],
  "phoneHints": [],
  "categoryHints": [],
  "extractClaimSignals": true,
  "dedupeListings": true,
  "maxChargeUsd": 10,
  "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/citation-directory-listing-extractor").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/citation-directory-listing-extractor").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/citation-directory-listing-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,junipr/citation-directory-listing-extractor"
        }
    }
}

```

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/ivvCyebeR9ypCpIXi/builds/GqKAmdsho4E7z0AvX/openapi.json
