Skip to main content
Glama
scraperapi

scraperapi-mcp-server

Official

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
API_KEYYesYour ScraperAPI API key.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
scrapeA

Scrape a web page or image from any URL using the ScraperAPI services, bypassing anti-bot protections.

Use this tool to retrieve the content of a web page or download an image from a given URL. It handles CAPTCHAs, IP blocks, and rate limits automatically via ScraperAPI's proxy infrastructure.

When to use:
- Extracting text content from web pages (articles, product listings, search results, etc.)
- Downloading images from URLs (returns the image directly if the URL points to an image file)
- Scraping geo-restricted content by specifying a country code
- Retrieving structured data (CSV/JSON) from supported websites with autoparse enabled

When NOT to use:
- For URLs that require authentication or login (ScraperAPI cannot access authenticated sessions)
- For non-HTTP resources (e.g., FTP, local files)
- When you already have the content and don't need to fetch it again (this tool is rate-limited)

Args:
    params (Scrape): Validated input parameters containing:
        - url (AnyUrl): The full URL to scrape (e.g. 'https://example.com/page')
        - render (bool): Enable JavaScript rendering for dynamic pages (default: false)
        - country_code (Optional[str]): ISO 3166-1 alpha-2 code for geo-targeted scraping (e.g. 'us', 'gb')
        - premium (bool): Use premium proxies for difficult sites (default: false)
        - ultra_premium (bool): Use ultra-premium proxies for heavily protected sites (default: false)
        - device_type (Optional[DeviceType]): 'mobile' or 'desktop' User-Agent emulation
        - output_format (OutputFormat): Response format — 'markdown' (default), 'text', 'csv', or 'json'
        - autoparse (bool): Enable structured data extraction for supported sites (default: false)

Returns:
    For web pages: str containing the page content in the requested output_format.
        - 'markdown': Clean, readable markdown extracted from the page HTML
        - 'text': Plain text without any formatting
        - 'csv': Comma-separated values (requires autoparse=true on supported sites)
        - 'json': JSON string (requires autoparse=true on supported sites)
    For image URLs: Image object with binary image data (JPEG, PNG, GIF, WebP, BMP, TIFF, or SVG).
        Images larger than ~700KB are rejected.

Raises:
    ToolError: If the API key is not configured, rate limit is exceeded, or the scrape operation fails.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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