Skip to main content
Glama
scraperapi

scraperapi-mcp-server

Official

ai_parser_parse_url

Read-onlyIdempotent

Scrape a URL with a pre-created AI parser to extract structured data as JSON. Use when you have a finished parser and need consistent data from similar pages.

Instructions

Parse a URL with an existing AI parser and return structured data.

    Scrapes the given URL and applies the parser, returning the extracted data
    as structured JSON keyed by the parser's fields. The parser must already be
    'FINISHED' (see 'ai_parser_create' / 'ai_parser_get_details'). Costs 1 credit per call.

    When to use:
    - Extracting structured data from a page using a FINISHED parser
    - Applying one parser across many similarly structured pages

    When NOT to use:
    - The parser isn't ready yet (create it, then poll 'ai_parser_get_details')
    - A one-off fetch (use 'scrape') or a supported marketplace/SERP (use the SDE)

    Args:
        params (AiParseParams): parser_id and url are required; optional version.

    Returns:
        str: JSON of the form {"parser": ..., "version": ..., "result": {...}}.

    Raises:
        ToolError: If the API key is missing, the rate limit is exceeded, or
            the request fails.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, destructiveHint. The description adds beyond these: cost (1 credit per call) and specific error conditions (missing API key, rate limit, request failure). This extra context is valuable and consistent with annotations.

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

Conciseness5/5

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

The description is well-organized into clear sections: main purpose, usage guidelines, arguments, returns, and raises. It is concise with no redundant sentences and front-loads the essential information.

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?

Given the tool's complexity and the presence of an output schema, the description covers all necessary context: prerequisites (parser must be FINISHED), cost, error conditions, and return format ('parser', 'version', 'result'). It leaves no critical gaps for an agent to misuse the tool.

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

Parameters3/5

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

The schema already describes each parameter (parser_id, url, version). The description's 'Args' section restates the required fields but adds no new semantic information beyond the schema. Since schema coverage is effectively high and the description doesn't compensate further, a baseline of 3 is appropriate.

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 the verb 'Parse a URL' with an existing AI parser, returning structured data. It distinguishes from sibling tools by explicitly mentioning alternatives for not-ready parsers ('ai_parser_create', 'ai_parser_get_details') and one-off fetches ('scrape'), making it distinct from other scraping/parser tools.

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?

The description provides explicit 'When to use' and 'When NOT to use' sections, including specific alternatives and conditions. It tells the agent to use this tool only when the parser is 'FINISHED' and directs other cases to appropriate siblings, offering clear decision guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scraperapi/scraperapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server