/zyte-web-data:scrape-analyze-pagefrom zyte-web-data
Extracts structured data fields and values from a locally saved HTML file, optionally following a JSON schema. Handles listing pages via --list-mode and merges cleaned HTML with page metadata.
Ships in zyte-web-data. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This file is 133 lines long; read all of them.
You are extracting structured data from a page. Given saved HTML, identify all available fields and extract their values.
This is the user prompt: $ARGUMENTS. You need to extract the following information from it:
product1.html. This is what you need to analyze. Don't proceed if it's not provided.product1.json. When provided, this is where you will save the structured analysis.--list-mode: when present, the page is a listing page. Extract ALL repeated item instances (e.g., every product card) as an array rather than a single-item object.Only process this one page. Do not read or compare with other pages' analysis files.
.scrape/.work/ is shared with the orchestrator and other concurrently
running agents. Never delete or "clean up" anything under it, at any point —
leave your intermediate files in place when you finish.
Clean the HTML and extract metadata, saving outputs to the work directory. Use {page_id}.{html_variant} as the filename base to avoid collisions:
uv run --python 3.14 ${CLAUDE_SKILL_DIR}/scripts/clean_html.py PAGE.html -l1 -o .scrape/.work/analysis/{page_id}.{html_variant}.cleaned.html
uv run --python 3.14 ${CLAUDE_SKILL_DIR}/scripts/extract_metadata.py PAGE.html -u PAGE_URL -o .scrape/.work/analysis/{page_id}.{html_variant}.metadata.json
Read only the cleaned HTML (never the original) and the metadata JSON. The metadata may be empty {} if the page has no structured data.
IMPORTANT: Never read the original HTML file (PAGE.html), even partially, even via tools such as Bash. Only use the cleaned HTML output from step 1 as your HTML source.
Use both the cleaned HTML and the metadata as data sources. Metadata (especially JSON-LD) often has cleaner, more complete values than what's visible in the HTML — e.g., structured price/priceCurrency vs rendered "$29.99", aggregateRating with review count, brand as a structured object. Some fields may only exist in metadata (e.g., sku, gtin, @type).
Examine both sources and extract all meaningful data fields. Meaningful means describing the page's own subject: leave out the surrounding site, such as navigation, ads, and other items listed as related, recommended, or recently viewed. For each field, determine:
Four modes depending on arguments:
examples for formatting. Also extract additional fields not in the schema — they may reveal data the user didn't know about.--list-mode): Identify the repeating container element on the page (e.g., article.product_pod, .search-result). Extract ALL item instances using schema field names. No extras — schema fields only. Produce an array.In schema mode:
string, number, integer, array, object) when the schema provides one.string, number, integer, boolean, array, or object.tool_count from an extracted tools_included list.For fields with large values (long text, HTML content, nested structures), extract the full value for the saved output and prepare a truncated version for the summary.
Truncating a value means keeping the beginning of it verbatim and stating how much was left out:
If output_path is provided, save complete extraction to output_path, otherwise skip this step.
If the user has asked for a specific format and structure, use that.
Otherwise write a JSON file with the following structure.
Standard format (detail pages, no --list-mode):
{
"fields": {
"name": {"type": "string", "value": "Widget X"},
"price": {"type": "string", "value": "$29.99"},
"description": {"type": "string", "value": "Full long description..."}
}
}
List mode format (--list-mode): an array of all extracted item instances:
{
"url": "https://...",
"values": [
{"title": "A Light in the Attic", "price": "£51.77"},
{"title": "Tipping the Velvet", "price": "£53.74"}
]
}
Summarize the file you saved with:
uv run --python 3.14 ${CLAUDE_SKILL_DIR}/scripts/summarize.py OUTPUT_PATH
It reads the saved JSON or YAML and prints every field with its name, type, and value, truncating the long ones as described in step 3. Use its output as your final message, unchanged.
Only when no output_path was provided, write that summary yourself: every extracted field with its field name, type, and value, no field omitted or renamed, and no value described instead of quoted, as in "8 offers" or "24 spec values".
Example:
These fields were discovered:
name (string): "Widget X"
price (string): "$29.99"
description (string): "Premium widget with advanced..." (2340 chars)
rating (number): 4.5
The full report is saved to $output_path
List mode: report count and a sample:
list-1 (https://...), saved to $output_path:
20 items extracted
sample: title="A Light in the Attic", price="£51.77"
Truncating long values is what keeps the summary compact enough to load into the orchestrator's main context alongside summaries from other pages.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
html-scraping, data-extraction, metadata, web-scraping, structured-data
5 skills in this plugin
/scrapeBuild a full-site or multi-page Scrapy spider to get structured data from a website, in a new project or added to an existing one. Do not use for analyzing locally saved HTML, fixing or debugging an existing spider, schema-only or existing-spec work, Scrapy Cloud operations, or advisory questions./scrape-planPlan a web scrape and author a validated extraction spec — explore a detail page, discover fields, confirm the schema, then validate it with more pages, HTML-variant comparison, extracted values, and an optional browser review, and present the plan for approval./scrapy-extraRead this BEFORE writing, modifying, debugging, or explaining any Scrapy or web-poet code — spiders, page objects, pipelines, settings, selectors — down to a one-line fix, or scaffolding/configuring a Scrapy project, scrapy-poet, scrapy-zyte-api, or browser rendering. These libraries moved on since your training cutoff; invoke this FIRST. NOT for building a scraper for a given site (scrape), a saved HTML file (scrape-analyze-page), or Scrapy Cloud deploy/jobs (zyte).npx claudepluginhub zytedata/claude-skills --plugin zyte-web-dataOther plugins' skills for the same job