scraperapi/scraperapi-mcp

πŸ”Ž Search & Data Extraction
0 Views
0 Installs

🐍 ☁️ - MCP server for ScraperAPI web scraping with JavaScript rendering, geotargeting, premium proxies, and auto-parsing support.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "scraperapi-scraperapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "scraperapi-scraperapi-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

ScraperAPI MCP server

The ScraperAPI MCP server enables LLM clients to retrieve and process web scraping requests using the ScraperAPI services.

This is the self-hosted (local) server. A hosted (remote) version is also available.

pypi package License


scraperapi-mcp-server MCP server

Table of Contents

Features

  • Full implementation of the Model Context Protocol specification
  • Seamless integration with ScraperAPI for web scraping
  • Simple setup with Python or Docker

Architecture

          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚  LLM Client   │────▢│  Scraper MCP Server   │────▢│    AI Model   β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                            β”‚
                                            β–Ό
                                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                  β”‚  ScraperAPI API  β”‚
                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Installation

The ScraperAPI MCP Server is designed to run as a local server on your machine, your LLM client will launch it automatically when configured.

Prerequisites

  • Python 3.11+
  • Docker (optional)

Using Python

Install the package:

pip install scraperapi-mcp-server

Add this to your client configuration file:

{
  "mcpServers": {
    "ScraperAPI": {
      "command": "python",
      "args": ["-m", "scraperapi_mcp_server"],
      "env": {
        "API_KEY": "<YOUR_SCRAPERAPI_API_KEY>"
      }
    }
  }
}

Using Docker

Add this to your client configuration file:

{
  "mcpServers": {
    "ScraperAPI": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "API_KEY=${API_KEY}",
        "--rm",
        "scraperapi-mcp-server"]
    }
  }
}

[!TIP]

If your command is not working (for example, you see a package not found error when trying to start the server), double-check the path you are using. To find the correct path, activate your virtual environment first, then run:

which <YOUR_COMMAND>

Available tools

API

scrape β€” Scrape any web page or image, bypassing anti-bot protection

Retrieve the content of a web page, or download an image, from a URL.

ParameterTypeDescriptionRequired
urlstringTarget URL to scrapeYes
renderbooleanEnable JavaScript rendering for dynamic pages (default: false)No
country_codestringISO 2-letter country code for geo-targetingNo
premiumbooleanUse premium residential/mobile proxies (default: false)No
ultra_premiumbooleanAdvanced anti-bot bypass; incompatible with premium (default: false)No
device_typestringmobile or desktop user agentNo
output_formatstringmarkdown (default), text, csv, or jsonNo
autoparsebooleanAuto-parse supported sites into structured data (default: false)No

Returns: the scraped content as a string, or image data for image URLs.

SDEs

Structured Data Endpoints (SDEs) return pre-parsed JSON (or CSV) instead of raw HTML. Every SDE tool also accepts output_format (json by default, or csv), tld, and country_code, shown in each tool's table.

Google

google_search β€” Parsed Google Search (SERP) results
ParameterTypeDescriptionRequired
querystringSearch query, as typed into GoogleYes
numintegerNumber of results to return on the pageNo
startintegerZero-based result offset for paginationNo
hlstringInterface/host language code (e.g. en, es)No
glstringCountry edition to search (2-letter code)No
uulestringGoogle uule geolocation string (advanced)No
date_range_startstringStart of a custom date range, MM/DD/YYYYNo
date_range_endstringEnd of a custom date range, MM/DD/YYYYNo
time_periodstringRecent window: 1H, 1D, 1W, 1M, or 1YNo
include_htmlbooleanInclude raw HTML alongside parsed data (default: false)No
tbsstringRaw Google tbs filter parameter (advanced)No
output_formatstringjson (default) or csvNo
tldstringTop-level domain (e.g. com, co.uk)No
country_codestringISO 2-letter country code for geo-targetingNo
google_news β€” Parsed Google News results
ParameterTypeDescriptionRequired
querystringSearch queryYes
numintegerNumber of results to return on the pageNo
startintegerZero-based result offset for paginationNo
hlstringInterface/host language codeNo
glstringCountry edition to search (2-letter code)No
uulestringGoogle uule geolocation string (advanced)No
date_range_startstringStart of a custom date range, MM/DD/YYYYNo
date_range_endstringEnd of a custom date range, MM/DD/YYYYNo
time_periodstringRecent window: 1H, 1D, 1W, 1M, or 1YNo
output_formatstringjson (default) or csvNo
tldstringTop-level domain (e.g. com, co.uk)No
country_codestringISO 2-letter country code for geo-targetingNo
google_jobs β€” Parsed Google Jobs listings
ParameterTypeDescriptionRequired
querystringSearch queryYes
numintegerNumber of results to return on the pageNo
startintegerZero-based result offset for paginationNo
hlstringInterface/host language codeNo
glstringCountry edition to search (2-letter code)No
uulestringGoogle uule geolocation string (advanced)No
output_formatstringjson (default) or csvNo
tldstringTop-level domain (e.g. com, co.uk)No
country_codestringISO 2-letter country code for geo-targetingNo
google_shopping β€” Parsed Google Shopping product results
ParameterTypeDescriptionRequired
querystringSearch queryYes
numintegerNumber of results to return on the pageNo
startintegerZero-based result offset for paginationNo
hlstringInterface/host language codeNo
glstringCountry edition to search (2-letter code)No
uulestringGoogle uule geolocation string (advanced)No
include_htmlbooleanInclude raw HTML alongside parsed data (default: false)No
output_formatstringjson (default) or csvNo
tldstringTop-level domain (e.g. com, co.uk)No
country_codestringISO 2-letter country code for geo-targetingNo
google_maps_search β€” Parsed Google Maps place/business results
ParameterTypeDescriptionRequired
querystringSearch query (e.g. coffee shops in Austin)Yes
latitudenumberLatitude of the map center, in decimal degreesYes
longitudenumberLongitude of the map center, in decimal degreesYes
zoomintegerMap zoom level (roughly 3=country, 10=city, 15=street)No
include_htmlbooleanInclude raw HTML alongside parsed data (default: false)No
output_formatstringjson (default) or csvNo
tldstringTop-level domain (e.g. com, co.uk)No
country_codestringISO 2-letter country code for geo-targetingNo

Amazon

amazon_product β€” Parsed Amazon product details by ASIN
ParameterTypeDescriptionRequired
asinstring10-character Amazon product identifier (e.g. B08N5WRWNW)Yes
languagestringLanguage code for localized content (e.g. en_US)No
include_htmlbooleanInclude raw HTML alongside parsed data (default: false)No
output_formatstringjson (default) or csvNo
tldstringAmazon TLD (e.g. com, co.uk, de)No
country_codestringISO 2-letter country code for geo-targetingNo
amazon_search β€” Parsed Amazon product search results
ParameterTypeDescriptionRequired
querystringSearch query, as typed into AmazonYes
pageinteger1-based results page numberNo
sort_bystringSort order (e.g. price-asc-rank, review-rank)No
departmentstringRestrict search to a department/category (e.g. electronics)No
refstringAmazon ref referral/context token (advanced)No
languagestringLanguage code for localized contentNo
output_formatstringjson (default) or csvNo
tldstringAmazon TLD (e.g. com, co.uk, de)No
country_codestringISO 2-letter country code for geo-targetingNo
amazon_offers β€” Parsed seller offers for an Amazon product
ParameterTypeDescriptionRequired
asinstring10-character Amazon product identifierYes
conditionstringComma-separated condition filters (e.g. f_new,f_usedlikenew,f_usedverygood,f_usedgood,f_usedacceptable)No
f_newbooleanInclude only New-condition offersNo
f_used_like_newbooleanInclude Used - Like New offersNo
f_used_very_goodbooleanInclude Used - Very Good offersNo
f_used_goodbooleanInclude Used - Good offersNo
f_used_acceptablebooleanInclude Used - Acceptable offersNo
languagestringLanguage code for localized contentNo
output_formatstringjson (default) or csvNo
tldstringAmazon TLD (e.g. com, co.uk, de)No
country_codestringISO 2-letter country code for geo-targetingNo

Walmart

walmart_search β€” Parsed Walmart product search results
ParameterTypeDescriptionRequired
querystringProduct search query, as typed into WalmartYes
pageinteger1-based results page numberNo
output_formatstringjson (default) or csvNo
tldstringWalmart TLD (e.g. com, ca, com.mx)No
country_codestringISO 2-letter country code for geo-targetingNo
walmart_product β€” Parsed Walmart product details by product ID
ParameterTypeDescriptionRequired
product_idstringWalmart product IDYes
output_formatstringjson (default) or csvNo
tldstringWalmart TLD (e.g. com, ca, com.mx)No
country_codestringISO 2-letter country code for geo-targetingNo
walmart_category β€” Parsed products within a Walmart category
ParameterTypeDescriptionRequired
categorystringWalmart category IDYes
pageinteger1-based results page numberNo
output_formatstringjson (default) or csvNo
tldstringWalmart TLD (e.g. com, ca, com.mx)No
country_codestringISO 2-letter country code for geo-targetingNo
walmart_review β€” Parsed customer reviews for a Walmart product
ParameterTypeDescriptionRequired
product_idstringWalmart product IDYes
pageinteger1-based results page numberNo
sortstringSort order (e.g. helpful, recent)No
ratingsstringComma-separated star ratings to filter by (e.g. 4,5)No
verified_purchasebooleanInclude only reviews with a "Verified Purchase" badge (default: false)No
output_formatstringjson (default) or csvNo
tldstringWalmart TLD (e.g. com, ca, com.mx)No
country_codestringISO 2-letter country code for geo-targetingNo

eBay

ebay_search β€” Parsed eBay product search results
ParameterTypeDescriptionRequired
querystringSearch keywordsYes
pageinteger1-based results page numberNo
items_per_pageintegerNumber of items per pageNo
seller_idstringRestrict results to a specific sellerNo
conditionstringComma-separated: new, used, open_box, refurbished, for_parts, not_workingNo
buying_formatstringbuy_it_now, auction, or accepts_offersNo
show_onlystringComma-separated: returns_accepted, authorized_seller, completed_items, sold_items, sale_items, listed_as_lots, search_in_description, benefits_charity, authenticity_guaranteeNo
sort_bystringbest_match, ending_soonest, newly_listed, price_lowest, price_highest, or distance_nearestNo
output_formatstringjson (default) or csvNo
tldstringeBay TLD (e.g. com, co.uk, de)No
country_codestringISO 2-letter country code for geo-targetingNo
ebay_product β€” Parsed eBay listing details by item ID
ParameterTypeDescriptionRequired
product_idstringeBay item IDYes
output_formatstringjson (default) or csvNo
tldstringeBay TLD (e.g. com, co.uk, de)No
country_codestringISO 2-letter country code for geo-targetingNo

Redfin

Every Redfin tool takes a full Redfin URL matching the tool (property, search, or agent page).

redfin_for_sale β€” Parsed Redfin listing data for a home for sale
ParameterTypeDescriptionRequired
urlstringFull Redfin for-sale property URLYes
rawbooleanReturn raw extracted JSON instead of parsed data (default: false)No
output_formatstringjson (default) or csvNo
tldstringRedfin TLD (com, ca)No
country_codestringISO 2-letter country code for geo-targetingNo
redfin_for_rent β€” Parsed Redfin listing data for a rental property
ParameterTypeDescriptionRequired
urlstringFull Redfin rental property URLYes
rawbooleanReturn raw extracted JSON instead of parsed data (default: false)No
output_formatstringjson (default) or csvNo
tldstringRedfin TLD (com, ca)No
country_codestringISO 2-letter country code for geo-targetingNo
redfin_search β€” Parsed Redfin search results
ParameterTypeDescriptionRequired
urlstringFull Redfin search-results URL (with filters)Yes
output_formatstringjson (default) or csvNo
tldstringRedfin TLD (com, ca)No
country_codestringISO 2-letter country code for geo-targetingNo
redfin_agent β€” Parsed Redfin real-estate agent profile data
ParameterTypeDescriptionRequired
urlstringFull Redfin agent profile URLYes
output_formatstringjson (default) or csvNo
tldstringRedfin TLD (com, ca)No
country_codestringISO 2-letter country code for geo-targetingNo

Crawler

The crawler is asynchronous: crawler_job_start returns a job id immediately, then you poll crawler_job_status until the crawl finishes. Per-page results can also be pushed to a callback_url webhook.

crawler_job_start β€” Start an async crawl job from a starting URL
ParameterTypeDescriptionRequired
start_urlstringThe URL where crawling begins (depth 0)Yes
url_regexp_includestringRegex selecting which links to follow. Use .* to crawl all links. Advanced: named groups (?<full_url>...) / (?<relative_url>...) target absolute vs relative URLsYes
max_depthintegerMaximum crawl depth (start URL is depth 0). Provide max_depth or crawl_budgetNo*
crawl_budgetintegerMaximum ScraperAPI credits the crawl may consume. Provide max_depth or crawl_budgetNo*
url_regexp_excludestringRegex for URLs to exclude from crawlingNo
api_paramsobjectPer-scrape controls applied to each page (e.g. render, country_code, premium, device_type, output_format)No
callback_urlstringWebhook URL to receive per-page results and the final summaryNo
additional_dataobjectArbitrary metadata to attach to the jobNo
scheduleobjectRecurring schedule: { name, interval (once/hourly/daily/weekly/monthly), cron }No
enabledbooleanFor scheduled projects, whether the schedule is enabled (default: true)No

* Provide either max_depth or crawl_budget.

Returns: JSON with the job id and initial status (e.g. {"status": "initiated", "jobId": "..."}).

crawler_job_status β€” Get the status of a crawl job
ParameterTypeDescriptionRequired
job_idstringThe job id returned by crawler_job_startYes

Returns: JSON with the job's page counts (done/failed/active).

crawler_job_delete β€” Cancel and delete a crawl job
ParameterTypeDescriptionRequired
job_idstringThe job id returned by crawler_job_startYes

AI Parser

Build a reusable parser from a few example URLs, then apply it to any similar page for structured extraction. Two-phase: ai_parser_create returns a parser id immediately and generation runs in the background β€” poll ai_parser_get_details until its status is FINISHED, then call ai_parser_parse_url.

ai_parser_create β€” Create a reusable AI parser from example URLs
ParameterTypeDescriptionRequired
namestringA name for the parserYes
urlsarray<string>1–3 example URLs of the same page type (same structure)Yes
scraper_paramsobjectScraperAPI fetch options for the example pages: render, country_code, premium, session_number, keep_headers, device_type, ultra_premium, follow_redirect, retry_404No
fieldsarrayPre-declared fields to extract: [{ name, description, type?, selector? }] (type is string/number/array). If omitted, fields are inferredNo

Returns: JSON with the new parser's id and version. Generation is asynchronous β€” poll ai_parser_get_details until status is FINISHED.

ai_parser_get_details β€” Get a parser's details and generation status
ParameterTypeDescriptionRequired
parser_idstringThe parser id returned by ai_parser_createYes
versionintegerSpecific parser version (default: latest)No

Returns: JSON with the parser's status (GENERATING/FINISHED/FAILED), fields, and example results.

ai_parser_parse_url β€” Parse a URL with an existing parser
ParameterTypeDescriptionRequired
parser_idstringThe parser id to runYes
urlstringThe URL to scrape and parseYes
versionintegerSpecific parser version (default: latest)No

Returns: JSON {"parser": ..., "version": ..., "result": {...}}. Costs 1 credit per call.

ai_parser_list β€” List the parsers on your account

No parameters. Returns a JSON array of parser summaries (id, name, status, version, generation time).

ai_parser_delete β€” Delete a parser
ParameterTypeDescriptionRequired
parser_idstringThe parser id to deleteYes
ai_parser_update β€” Edit a parser's fields (creates a new version)
ParameterTypeDescriptionRequired
parser_idstringThe parser id to updateYes
versionintegerVersion to base the update on (default: latest)No
add_fieldsarrayFields to add: [{ name, description, type?, selector? }] (triggers async regeneration)No
modify_fieldsarrayFields to modify (triggers async regeneration)No
rename_fieldsarrayRenames: [{ name, new_name }] (applied immediately)No
remove_fieldsarray<string>Field names to remove (applied immediately)No

Prompt templates

  • Please scrape this URL <URL>. If you receive a 500 server error identify the website's geo-targeting and add the corresponding country_code to overcome geo-restrictions. If errors continues, upgrade the request to use premium proxies by adding premium=true. For persistent failures, activate ultra_premium=true to use enhanced anti-blocking measures.
  • Can you scrape URL <URL> to extract <SPECIFIC_DATA>? If the request returns missing/incomplete <SPECIFIC_DATA>, set render=true to enable JS Rendering.

Configuration

Settings

Configure the server through environment variables. Only API_KEY is required.

VariableDefaultDescription
API_KEYβ€”Required. Your ScraperAPI API key.
API_TIMEOUT_SECONDS70Per-request timeout, in seconds.
RATE_LIMIT_MAX_CALLS10Maximum tool calls allowed per rate-limit window.
RATE_LIMIT_WINDOW_SECONDS60Length of the rate-limit window, in seconds.
IMAGE_SIZE_LIMIT_BYTES700000Maximum size of an image the scrape tool returns inline.

Client Setup

Use the JSON configuration file from the Installation section. Below are steps for common clients.

Claude Desktop & Claude Code

Claude Desktop:

  1. Open Claude Desktop and click the settings icon
  2. Select the "Developer" tab
  3. Click "Edit Config" and paste the JSON configuration file

Claude Code:

  1. Add the server manually to your .claude/settings.json with the JSON configuration file, or run:
    claude mcp add scraperapi -e API_KEY=<YOUR_SCRAPERAPI_API_KEY> -- python -m scraperapi_mcp_server
    
Cursor Editor
  1. Open Cursor
  2. Access the Settings Menu
  3. Open Cursor Settings
  4. Go to Tools & Integrations section
  5. Click '+ Add MCP Server'
  6. Choose Manual and paste the JSON configuration file

More here

Windsurf Editor
  1. Open Windsurf
  2. Access the Settings Menu
  3. Click on the Cascade settings
  4. Click on the MCP server section
  5. Click on the gear icon, the mcp_config.json file will open
  6. Paste the JSON configuration file

More here

Cline (VS Code extension)
  1. Open VS Code and click the Cline icon in the activity bar to open the Cline panel
  2. Click the MCP Servers icon in the top navigation bar of the Cline pane
  3. Select the "Configure" tab
  4. Click "Configure MCP Servers" at the bottom of the pane β€” this opens cline_mcp_settings.json
  5. Paste the JSON configuration file

More here

Development

Local setup

  1. Clone the repository:

    git clone https://github.com/scraperapi/scraperapi-mcp
    cd scraperapi-mcp
    
  2. Install dependencies:

    • Using Poetry:
      poetry install
      
    • Using pip:
      # Create virtual environment and activate it
      python -m venv .venv
      source .venv/bin/activate # MacOS/Linux
      # OR
      .venv/Scripts/activate # Windows
      
      # Install the local package in editable mode
      pip install -e .
      
    • Using Docker:
      # Build the Docker image locally
      docker build -t scraperapi-mcp-server .
      

Run the server

  • Using Python:
    python -m scraperapi_mcp_server
    
  • Using Docker:
    # Run the Docker container with your API key
    docker run -e API_KEY=<YOUR_SCRAPERAPI_API_KEY> scraperapi-mcp-server
    

Debug

python3 -m scraperapi_mcp_server --debug

Testing

This project uses pytest for testing.

Install Test Dependencies

  • Using Poetry:
    poetry install --with dev
    
  • Using pip:
    pip install -e .
    pip install pytest pytest-mock pytest-asyncio
    

Running Tests

# Run All Tests
pytest

# Run Specific Test
pytest <TEST_FILE_PATH>

Related MCP Servers

linxule/mineru-mcp

πŸ“‡ ☁️ - MCP server for MinerU document parsing API. Parse PDFs, images, DOCX, and PPTX with OCR (109 languages), batch processing (200 docs), page ranges, and local file upload. 73% token reduction with structured output.

πŸ”Ž Search & Data Extraction1 views
0xdaef0f/job-searchoor

πŸ“‡ 🏠 - An MCP server for searching job listings with filters for date, keywords, remote work options, and more.

πŸ”Ž Search & Data Extraction0 views
Aas-ee/open-webSearch

🐍 πŸ“‡ ☁️ - Web search using free multi-engine search (NO API KEYS REQUIRED) β€” Supports Bing, Baidu, DuckDuckGo, Brave, Exa, and CSDN.

πŸ”Ž Search & Data Extraction0 views
ac3xx/mcp-servers-kagi

πŸ“‡ ☁️ - Kagi search API integration

πŸ”Ž Search & Data Extraction0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it β†’
β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.