Skip to main content
Glama

extract

Read-only

Extract structured data from a webpage via Zenrows.

Returns JSON fields (products, articles, listings) in "data" rather than a full page body. Set include_html to also get the page HTML. Modes:

  • auto (default): extract=auto, site-tailored Extract (currently free, billing may apply later). Works on any prepared domain, with any API key. Error REQS007 says why in "reason":

    • domain_not_prepared: call prepare_domain with the domain and 1 to 5 example URLs (one works; we recommend 3 or more of the same page type; a few minutes, no credits), poll prepared_domain_status about every 30 seconds until it says ready, then call extract again.

    • page_not_recognised: the domain is prepared, but this page is not one Extract extracts (a page with nothing to extract, such as a home page). Try a product, article or listing page instead; if this page should work, retry it once in a few minutes; otherwise use mode=css. Do not prepare the domain again.

    • domain_not_enabled: preparing does not help; use mode=css.

  • autoparse: deprecated general-purpose structured JSON on any domain; use only when asked for

  • css: css_extractor with an explicit selector map

Requests use automatic mode (mode=auto) by default: Zenrows enables JS rendering and premium proxies only when the site needs them, and charges only for the configuration that succeeds. Pass just the URL. Set js_render or premium_proxy only to force a fixed configuration; that turns automatic mode off and bills every request at that configuration's cost.

Check "empty" in the result: true means no field came back with a value. "noDataExtracted": true means Extract processed the page and found nothing to extract (not charged); retrying the same request returns the same answer. Full-page markdown, HTML and screenshots come from scrape.

Input Schema

NameRequiredDescriptionDefault
urlYesThe webpage URL to extract from
modeNoExtraction mode: auto (extract=auto, default), css (requires css_extractor), or the deprecated autoparseauto
waitNoMilliseconds to wait after load. Requires js_render=true; without it, including in automatic mode, it may be ignored.
wait_forNoCSS selector to wait for before extracting. Requires js_render=true; without it, including in automatic mode, it may be ignored.
js_renderNoForce JS rendering on every request. Overrides automatic mode (mode=auto), which already renders when needed.
mode_autoNoAutomatic mode (mode=auto) is on by default; leave unset. False sends a plain request without it.
include_htmlNomode=auto only: also return the full page HTML. Default false; the HTML is most of the response size.
css_extractorNoRequired when mode=css. JSON map of field→selector, e.g. '{"title":"h1","price":".price"}'
premium_proxyNoForce premium residential proxies on every request (10x cost). Overrides automatic mode (mode=auto), which already uses premium proxies when a page needs them.
proxy_countryNoISO 3166-1 alpha-2 country code. Works in automatic mode (mode=auto); with js_render or mode_auto=false it requires premium_proxy.
fallback_autoparseNoDeprecated, has no effect: Extract no longer falls back to autoparse. Prepare the domain with prepare_domain instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / fallback_autoparse / default
      Removed value: -true
    • changedInput schema / properties / fallback_autoparse / description
      Previous value: -"When mode=auto and the domain isn't prepared for Extract yet (REQS007, or the legacy AUTH010), retry once with autoparse (default true)"New value: +"Deprecated, has no effect: Extract no longer falls back to autoparse. Prepare the domain with prepare_domain instead."
    • addedInput schema / properties / include_html
      Added value: +{
      +  "default": false,
      +  "description": "mode=auto only: also return the full page HTML. Default false; the HTML is most of the response size.",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / mode / description
      Previous value: -"Extraction mode: auto (extract=auto, default), autoparse, or css (requires css_extractor)"New value: +"Extraction mode: auto (extract=auto, default), css (requires css_extractor), or the deprecated autoparse"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Although annotations already declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false, the description adds substantial behavioral context: automatic mode billing behavior, cost implications of js_render and premium_proxy, the meaning of "empty" and "noDataExtracted", no-charge behavior for noDataExtracted, and deterministic retry behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is well structured and front-loads the core purpose, return shape, and modes before error handling and billing details. It is somewhat long and repeats automatic-mode behavior in multiple places, but nearly all content is relevant for an 11-parameter tool with billing and error-mode complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description still explains the return shape, the include_html behavior, the "empty" and "noDataExtracted" signals, and the key error cases. Given the tool's complexity and the presence of annotations covering safety, it provides enough context for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema description coverage is 100%, the description adds meaningful semantics beyond the schema: it clarifies that wait and wait_for require js_render, that premium_proxy forces 10x-cost residential proxies, that proxy_country has mode-dependent requirements, and that fallback_autoparse is deprecated and has no effect.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that this tool extracts structured data from a webpage via Zenrows, specifying that it returns JSON fields such as products, articles, and listings in "data" rather than a full page body. It also explicitly distinguishes itself from the sibling scrape tool by noting that full-page markdown, HTML, and screenshots come from scrape.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit mode selection guidance: auto is default, autoparse is deprecated and only used when asked for, and css requires an explicit selector map. It also explains remediation paths for specific errors, including calling prepare_domain, polling prepared_domain_status, retrying, or switching to mode=css.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.