Local Business Schema Extractor avatar

Local Business Schema Extractor

Pricing

$3.00 / 1,000 results

Go to Apify Store
Local Business Schema Extractor

Local Business Schema Extractor

Pricing

$3.00 / 1,000 results

Rating

0.0

(0)

Developer

Eichan Jolly

Eichan Jolly

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Categories

Features

Limited permissions

Share

Read the JSON-LD inside exactly one publicly available business website page and return business records. This small Actor does not crawl other pages.

Who it is for

Local-business analysts, sales-operations teams and company-data QA staff who want structured facts that a business has published itself, not guesses from marketing text. Use only public official business websites. No login, personal-profile harvesting or LinkedIn access.

Input

One HTTPS business page. A real, publicly accessible example page (not a placeholder) is provided as the input prefill:

{"url": "https://firstcapitol.co.uk/debt-collection-agency-london/"}

The prefill URL is a live public business-page address verified through an independent public fetch on 2026-11-01. We have not independently verified that its current HTML contains parsable JSON-LD or any particular business record. Results depend on the page's markup at run time; a valid page can yield not_found.

Output

One dataset item per recognized business declared in <script type="application/ld+json"> (with @graph, arrays, and @id references supported). Output fields are always present:

  • name: business name from JSON-LD, otherwise null
  • businessType: explicit Schema.org @type (e.g. LocalBusiness), otherwise null
  • streetAddress, city, region, postalCode, country: published PostalAddress fields, otherwise null
  • telephone: published business telephone, otherwise null
  • openingHours: only the openingHours JSON-LD property (string or array of strings); otherwise null
  • url: page URL declared for that business, otherwise null
  • sourceUrl: successfully fetched input page URL
  • status: found or not_found
  • error: null on a successful page read

Illustrative output (from the simulated test fixture, not a claim about the linked business):

{"name":"Northstar Trade Services — London","businessType":"LocalBusiness","streetAddress":"20 Sample Avenue","city":"London","region":"Greater London","postalCode":"SW1A 1AA","country":"GB","telephone":"+44 20 5555 0111","openingHours":["Mo-Fr 09:00-17:00"],"url":"https://firstcapitol.co.uk/london","sourceUrl":"https://firstcapitol.co.uk/debt-collection-agency-london/","status":"found","error":null}

When no business declaration is found, exactly one row is emitted with all business-value fields set to null, sourceUrl set, status:"not_found", and error:null.

Honest limits

  • Extracts only JSON-LD typed as Organization, LocalBusiness, or a supported subtype. Known Schema.org types are explicitly allowlisted; uncommon unlisted subtypes may be missed. Does not guess types from free text.
  • Does not parse visible marketing text, tables, Microdata, RDFa, linked JSON-LD files, JavaScript-injected markup, or structured data on other pages.
  • Does not transform openingHoursSpecification into openingHours; that field is null unless openingHours is explicitly present.
  • Missing values stay null. A recognized typed business can still be found when name is missing; name remains null. Multiple declared business entities may yield multiple rows. Identical @id values are deduplicated.
  • No claim that published address, phone or opening hours are current or true. These values are self-declared markup, not verified facts.
  • One public HTTPS hostname on port 443; checks robots.txt, refuses off-host redirects, validates resolved IP addresses, uses TLS, a 12-second connection timeout, two-page requests (robots and page), and a 2 MB HTML size ceiling. No login, proxying, or cross-domain crawling.
  • Some sites block automated requests or have no suitable markup. A blocked site yields a short readable ERROR: line (exit status 1), not a Python traceback.

Local and Apify use

Python 3.12+, standard library only, no Apify SDK, no installation packages.

$ACTOR_INPUT_JSON='{"url":"https://firstcapitol.co.uk/debt-collection-agency-london/"}' python src/main.py

Alternative local storage input: storage/key_value_stores/default/INPUT.json; results are written as storage/datasets/default/000000001.json, etc. On Apify, if APIFY_DEFAULT_KEY_VALUE_STORE_ID and APIFY_TOKEN are available, the Actor reads INPUT via GET /v2/key-value-stores/{id}/records/INPUT. If APIFY_DEFAULT_DATASET_ID is set, it publishes rows using POST /v2/datasets/{id}/items with bearer-token authorization. ACTOR_INPUT_JSON explicitly overrides platform input, useful for local tests. Platform API operations were tested only through a local HTTP mock, not a live Apify run.

Reproducible verification

python tests/run_direct_smoke.py
python -m unittest discover -s tests -v

The direct smoke invokes python src/main.py in script mode as a subprocess with a valid URL and a simulated offline HTTP response. The fixture is activated only with ACTOR_TEST_HTTP=1 and test-only PYTHONPATH; it is never loaded in production. Read tests/SMOKE_OUTPUT.txt, tests/SMOKE_DATASET.json, and tests/TEST_RUN_OUTPUT.txt. No external site or Apify account was modified.

Store metadata and suggested pricing

Category candidates: LEAD_GENERATION, DATA_EXTRACTION (maximum 2). Suggested PRICE_PER_DATASET_ITEM: $4 per 1,000 dataset items ($0.004 each). Proposal only; not configured on Apify, and not published. For customer fairness, consider whether not_found rows should count as billable results before enabling any future billing.