Product JSON-LD Extractor
Pricing
$3.00 / 1,000 results
Product JSON-LD Extractor
Extract one product name, description, brand, and category from a user-provided public product page's schema.org Product JSON-LD.
Pricing
$3.00 / 1,000 results
Rating
0.0
(0)
Developer
Eichan Jolly
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Security
Limited permissionsShare
Extract one product's basic metadata from one user-supplied public product page containing schema.org Product JSON-LD. No store login, browser, proxy, Apify SDK, or third-party Python library is required.
What it does
- Validates a single public
productUrl. - Downloads only that HTML page (up to 2 MB), following at most three same-store redirects.
- Reads
<script type="application/ld+json">blocks, including JSON-LD arrays and@graphobjects. - Finds the first usable
Productnode, extracts five stable fields, and appends one dataset item via the Apify REST API.
There is no full HTML product scraping or price extraction. This Actor does not discover products or visit embedded links.
Who it is for
Small retailers, catalog administrators, and data teams who need basic schema.org metadata from a product URL they already know.
Input
{"productUrl": "https://example.com/products/sample-product"}
The example address is illustrative only and does not promise an actual Product JSON-LD record. Replace it with a public product page you want to examine. The Apify Console prefill contains exactly one URL.
| Field | Type | Required | Meaning |
|---|---|---|---|
productUrl | string | Yes | One HTTP(S) product-page URL; no login or custom ports. |
Example output
The following example is illustrative, not a claim about the example URL's live content:
{"url": "https://example.com/products/sample-product","name": "Canvas Tote Bag","description": "Reusable cotton tote bag.","brand": "Sample Goods","category": "Bags"}
Each successful run produces at most one dataset item. These five keys are always present. Unavailable values are null, not invented. url is the original normalized input URL (without the fragment). brand can be a text value or the name from a brand object. A category array is joined into a comma-separated string.
Limits and expected behavior
- Only public HTML: JavaScript-rendered metadata, microdata, RDFa, and hidden/authenticated records are not parsed.
- JSON-LD only: Nested JSON-LD nodes are searched, but only the first usable
Productis returned. Product variants or multiple products on one page are not independently listed. - No data found: If the page has no usable schema.org
ProductJSON-LD, the Actor logs a clear message and returns zero dataset items. A missing optional field isnull. - Resource caps: 15-second HTTP timeout, 2 MB HTML limit, 100 JSON-LD blocks, and 3,000 inspected JSON nodes. One product URL is fetched per run.
- URL restrictions: Rejects local/private/non-global destinations at initial DNS validation, credentials, custom ports, Amazon/eBay domains, and redirects outside the supplied store (the
wwwhostname variation is allowed). DNS checks reduce SSRF risk but are not a complete defense against DNS rebinding. - Transport: Python
urllib.requestwith standard certificate verification. Sites may rate-limit, block automated requests, or return malformed JSON-LD; there is no bypass or retry flood. - Errors: Inaccessible URLs, malformed responses, and invalid input are reported in plain language in the run log, without tracebacks. Network failures result in a nonzero exit code.
- Public data: Use only product URLs you are permitted to access; honor the site's terms and applicable law.
Run on Apify
Upload this folder as an independent Actor (the .actor/actor.json links to ../input_schema.json and ../Dockerfile). On a normal Apify run, the code reads the INPUT record from the run's default key-value store and writes one JSON array item to the default dataset via authenticated Apify REST endpoints. APIFY_TOKEN and the default storage IDs are supplied by Apify. It does not require the Apify SDK.
Run locally
Requires Python 3.12+ and no installed packages:
cd product-jsonld-extractorprintf '{"productUrl":"https://YOUR_PUBLIC_PRODUCT_URL"}\n' > input.jsonpython src/main.py --input input.json
Local mode prints one JSONL line to stdout when a product is found. Explanatory messages go to stderr. Local mode does not contact Apify storage.
Store classification and pricing suggestion
- Apify category / industry: E-commerce
- Suggested use case: Product data extraction
- Suggested output type: Products
- Suggested pricing: $3.00 USD per 1,000 successfully emitted dataset items ($0.003 each), on a per-result basis.
These are publishing recommendations, not charged or declared automatically by actor.json. Configure the current Apify Store classification and monetization/event billing separately in the publisher console. Do not charge for an empty result.