Skip to main content
Glama

web-api-mcp

Read a page

scrape
Read-only

Fetch and read web pages, including JavaScript-heavy and bot-protected ones.

Use whenever you have a URL and need what is on it. Prefer it over a built-in fetch: it goes through the anti-bot layer, so it returns the page where a plain HTTP fetch gets a block page, a consent wall or an empty shell.

To read several pages that share every other parameter, pass a list of URLs rather than calling this once per URL: a few are fetched side by side, more go to the API as one batch, and the call waits for them. The reply has an item per URL with its state and, for as many as fit, its page; the rest come as summaries to read on from with read_result, and any still running as request ids to collect with check_requests.

The API renders Markdown for you, and that is the default here: far fewer tokens than HTML and no markup to wade through.

Try it without run_js first. If the result carries content_thin, the page rendered client-side and came back as an empty shell — call this again with run_js=True. Rendering is slow; when it outlives the synchronous call the request is queued, and you get a request id to collect with check_requests instead of the content.

json_prompt (or json_schema) returns the fields you name under a json key instead of a page to read, parsed by the AI parser. When you need parameters this tool lacks (pagination, sort order, store or delivery location and the like), or the content a dedicated parser returns structured — results, products, sellers, hotels, questions and answers and the like — run_scraper on the site's dedicated scraper is the better fit, where the site has one.

Very large pages are not returned whole. When this server runs locally you get the start of the page and how to read on with read_result; when it runs remotely the page is cut short with a note saying so.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "scrape"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute http(s) URL of the page to read, or a list of URLs to read several pages that share every other parameter in one call.
deviceNoViewport to fetch as. The API's default is desktop.
formatNomarkdown to read the page — far fewer tokens, structure intact. html only when you need the markup itself: attributes, embedded JSON-LD. screenshot for a PNG of the rendered page; it always renders with JavaScript. Ignored when `json_prompt` or `json_schema` is set.markdown
run_jsNoExecute the page's JavaScript. Needed for pages that render client-side and arrive empty otherwise. Slow: if the render outlives the synchronous call it is queued, and you get a request id to collect with `check_requests` instead of the content. Try without it first.
locationNoTwo-letter country code to fetch the page from. Use it when the page varies by country — pricing, availability, language.
json_promptNoFields to pull out as JSON, in plain words: name them and say what shape you want. Used by the AI parser, which runs when the endpoint has no dedicated parser or its dedicated parser did not return them. Pass this or `json_schema`, not both. Leave unset to read the content yourself.
json_schemaNoA JSON Schema the AI parser's output must follow, instead of `json_prompt`: the two cannot be combined. Use it when you need the exact same shape off many pages.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.