PyScrappy
PyScrappy is a web scraping MCP server that provides AI agents with 22 tools to retrieve structured data from across the web — from general URLs to specialized platforms.
General Web Scraping
scrape_url— Scrape any URL for structured text, links, images, tables, and metadata; supports CSS selectors, pagination, and optional JavaScript rendering
Data & Research
scrape_wikipedia— Fetch Wikipedia articles in full, paragraph, or header modescrape_stock— Get Yahoo Finance stock quotes, historical price data, and company profilesscrape_news— Fetch articles from RSS/Atom feeds, auto-discover feeds from a news site, or extract full text from a single article URLsearch_images— Search for images and return URLs and metadata (default engine: Bing)search_youtube— Search YouTube videos and return titles, channels, links, and metadatasearch_linkedin_jobs— Search public LinkedIn job postings by keyword and locationsearch_github— Search GitHub repositories by query, sortable by stars, forks, or recencysearch_hackernews— Search Hacker News stories by relevance or datesearch_books— Search books via Open Library by title, author, or free textget_weather— Get current weather (temperature, humidity, wind, condition) for any location (no API key required)get_crypto— Get cryptocurrency prices, market cap, and 24h change via CoinGeckoconvert_currency— Get exchange rates and convert amounts between currenciesdefine_word— Look up English word definitions, part of speech, and usage exampleslookup_movie— Look up movie/TV info from IMDB via the OMDb API (requiresOMDB_API_KEY)
E-Commerce
search_amazon— Search Amazon products and return title, price, rating, and imagesearch_newegg— Search Newegg for electronics and computer hardwaresearch_ikea— Search IKEA furniture and home products with per-country pricing
Food Delivery
search_ubereats— List Uber Eats restaurants delivering in a cityget_ubereats_menu— Retrieve a full menu (items and prices) for a specific Uber Eats restaurantscrape_zomato— Search restaurants on Zomato by city (with optional cuisine/name filter)
Entertainment
search_soundcloud— Search SoundCloud tracks (uses browser backend for JS rendering)
Scrapes Amazon marketplace for product listings, including titles, prices, and details.
Scrapes GitHub repositories or profiles (details not fully shown in excerpt but listed as built-in scraper).
Scrapes IKEA product search results per country, including prices and details.
Fetches movie and TV information via OMDb API, such as title, year, rating, and genre.
Scrapes Newegg electronics and hardware product listings.
Scrapes RSS feeds (e.g., news articles) from any provided feed URL.
Searches SoundCloud for tracks and returns metadata like title and plays.
Scrapes Uber Eats restaurant listings and menus by city and locale.
Scrapes Wikipedia articles, summaries, and infoboxes by query.
Searches YouTube for videos and returns metadata such as title, views, and URL.
Scrapes Zomato restaurant listings by city.
PyScrappy: Python web scraping toolkit + MCP server for AI agents
PyScrappy is an AI-native web scraping toolkit that turns websites into structured, LLM-ready data. Use it as a Python library or expose it as an MCP server for AI agents.
📖 Documentation: pyscrappy.vercel.app
Related MCP server: webclaw
Key features
Generic scraper — give it any URL, get back structured text, links, images, tables, and metadata
LLM-ready output —
.to_markdown()turns any result into clean Markdown; also.to_json()and.to_dataframe()MCP server — expose the scrapers as tools for AI agents (Claude, Cursor, local LLMs, …)
JS rendering — optional Playwright backend for JavaScript-heavy sites
Custom selectors — pass CSS selectors to extract exactly what you need
Concurrent scraping —
scrape_many/scrape_allrun scrapes in parallelProxy & scraping-API support — route through a proxy or ScraperAPI/ScrapeOps for blocked sites
Retry & rate-limiting — built-in exponential backoff and per-domain rate limiting
Type-safe — full type hints,
py.typedmarker20+ built-in scrapers — Wikipedia, IMDB, stocks, news, GitHub, Amazon/IKEA, YouTube, and more
Installation
pip install pyscrappyOptional extras:
# Browser support (for JS-rendered pages)
pip install 'pyscrappy[browser]'
playwright install chromium
# DataFrame support
pip install 'pyscrappy[dataframe]'
# MCP server (use PyScrappy's scrapers as AI-agent tools)
pip install 'pyscrappy[mcp]'
# Everything
pip install 'pyscrappy[all]'For AI agents
PyScrappy ships an MCP server that exposes its scrapers as tools, so an agent (Claude, Cursor, an OpenAI agent, a local LLM) can pull structured web data from any URL and hand it straight to the model:
AI agent ──MCP tool call──▶ PyScrappy ──fetch + extract──▶ Any website
▲ │
└────────────── clean Markdown / JSON ◀───────────────────────┘pip install 'pyscrappy[mcp]'
claude mcp add pyscrappy pyscrappy-mcpThen just ask: "use pyscrappy to summarize the latest headlines from bbc.com." See MCP server for the full setup and tool list.
Local models (Ollama), no MCP host needed
Ollama can't talk MCP on its own, so normally you'd run a host (Goose, Cline, …) in between. PyScrappy skips that with a built-in agent that talks to Ollama directly and lets a local model call the scrapers as tools:
pip install 'pyscrappy[mcp]' # needs Python 3.10+
pyscrappy chat --model qwen2.5 "what's the current AAPL quote?"It exposes the same 22 tools as the MCP server. The only requirement is a model
that supports tool calling (Llama 3.1, Qwen 2.5, Mistral, …); how well it
picks the right tool is up to the model. Point it at a remote Ollama with
--host, and pass -v to see each tool call.
MCP server (use PyScrappy from an AI agent)
PyScrappy ships an optional Model Context Protocol server, so an AI agent (e.g. Claude) can call PyScrappy's scrapers as tools and get structured web data back.
pip install 'pyscrappy[mcp]'This installs a pyscrappy-mcp command (a stdio MCP server). You can also run it
with python -m pyscrappy.mcp.
Register with Claude Code
claude mcp add pyscrappy pyscrappy-mcpRegister with Claude Desktop
Add to your claude_desktop_config.json and restart the app:
{
"mcpServers": {
"pyscrappy": {
"command": "pyscrappy-mcp"
}
}
}Tip: Claude Desktop does not inherit your shell
PATH. Ifpyscrappy-mcpis not found, use the absolute path to the command (e.g. the one printed bywhich pyscrappy-mcp).
Available tools
Tool | Description |
| Scrape any URL — text, links, images, tables, metadata |
| Fetch a Wikipedia article ( |
| Yahoo Finance quotes, history, and profiles |
| RSS/Atom feeds, auto-discovered site feeds, or a single article |
| Image search (returns URLs + metadata) |
| YouTube video search |
| Public LinkedIn job listings |
| GitHub repository search (stars, language, …) |
| Hacker News story search (points, comments) |
| Book search via Open Library (title, author, year) |
| Current weather for a place (no key) |
| Cryptocurrency prices and market data (CoinGecko) |
| Exchange rates and currency conversion |
| Word definitions and examples |
| Amazon product search |
| Newegg electronics / computer hardware search |
| IKEA furniture / home search |
| SoundCloud track search (uses the browser backend) |
| Movie/TV info from IMDB by title or id (via OMDb; needs |
| Restaurant listings by city |
| Uber Eats restaurants by city |
| An Uber Eats restaurant's full menu (from its store URL) |
The lookup_movie tool needs a free OMDb API
key. Pass it to the server through your MCP client config, e.g. for Claude Desktop:
{
"mcpServers": {
"pyscrappy": {
"command": "pyscrappy-mcp",
"env": { "OMDB_API_KEY": "your-key" }
}
}
}Once registered, just ask the agent naturally, e.g. "use pyscrappy to get the latest headlines from bbc.co.uk and the AAPL stock quote."
Built-in scrapers
Every scraper that works without a proxy is also exposed as an MCP tool (last column).
Scraper | What it does | Browser? | MCP tool |
| Scrape any URL with auto-extraction | Optional |
|
Data / Research | |||
| Articles, sections, infoboxes | No |
|
| Movie/TV info by title or id (via OMDb API; needs | No |
|
| Quotes, history, profiles (Yahoo Finance) | No |
|
| RSS/Atom feeds, article extraction | No |
|
| Image search + download | No |
|
| Public job listings | No |
|
| Repository search (stars, language, …) via GitHub API | No |
|
| Story search (points, comments) via HN API | No |
|
| Book search (title, author, year) via Open Library | No |
|
| Current weather by place, via Open-Meteo (no key) | No |
|
| Crypto prices / market cap via CoinGecko (no key) | No |
|
| Currency exchange rates + conversion (no key) | No |
|
| Word definitions, examples (Free Dictionary API) | No |
|
E-Commerce | |||
| Product search | No |
|
| Electronics / computer hardware search | No |
|
| Furniture / home search, per-country prices (JSON API) | No |
|
Social Media | |||
| Video search, channel scraping | Optional |
|
| Profiles, hashtag posts (blocked; needs proxy) | Recommended | — |
| Tweet search (blocked; needs proxy) | Recommended | — |
Music | |||
| Track/playlist search (blocked; needs proxy) | Recommended | — |
| Track search | Optional |
|
Food Delivery | |||
| Restaurant listings by city | Recommended |
|
| Restaurants by city + full menus (any Uber Eats country) | No |
|
Plugins
PyScrappy is extensible: you can add your own scrapers, and third parties can
ship them as standalone pyscrappy-<name> packages. A registered scraper works
everywhere a built-in does, including the MCP server and the pyscrappy chat
agent, with no change to PyScrappy core.
In your own code — register with the decorator:
from pyscrappy import BaseScraper, register_scraper, get_scraper
from pyscrappy.core.models import ScrapeResult, ScrapeMetadata
@register_scraper("reddit")
class RedditScraper(BaseScraper):
def scrape(self, subreddit: str, **kwargs) -> ScrapeResult:
data = self.fetch_and_parse(f"https://old.reddit.com/r/{subreddit}/.json")
# ... build a list of dicts ...
return ScrapeResult(data=[...], metadata=ScrapeMetadata(scraper="reddit"))
get_scraper("reddit")().scrape(subreddit="python")As a distributable package — advertise an entry point in your
pyproject.toml, and PyScrappy discovers it once your package is installed:
[project.entry-points."pyscrappy.scrapers"]
reddit = "pyscrappy_reddit:RedditScraper"After pip install pyscrappy-reddit, the scraper shows up in
list_scrapers(), and an AI agent can call it via the scrape_with MCP tool —
no core change required.
See the plugin template for a complete, copyable starting point, and the plugin guide for the full walkthrough.
Quick start
Scrape any URL → clean, LLM-ready Markdown
from pyscrappy import scrape
result = scrape("https://en.wikipedia.org/wiki/Web_scraping")
print(result.to_markdown()) # feed straight to an LLM
# ...or result.to_json() / result.to_dataframe()Prefer raw fields? Every result is a ScrapeResult with .data (a list of
dicts):
print(result.data[0]["metadata"]["title"])
print(result.data[0]["text"]["word_count"])Custom CSS selectors
from pyscrappy import GenericScraper
with GenericScraper() as gs:
result = gs.scrape(
url="https://news.ycombinator.com",
selectors={"title": ".titleline a", "score": ".score"},
)
for item in result.data:
print(item["title"], item.get("score", ""))Wikipedia
from pyscrappy import WikipediaScraper
with WikipediaScraper() as ws:
result = ws.scrape(query="Python (programming language)", mode="summary")
print(result.data[0]["text"])Stock data
from pyscrappy import StockScraper
with StockScraper() as ss:
result = ss.scrape(symbol="AAPL", mode="history", period="1mo")
df = result.to_dataframe()
print(df.head())IMDB (via OMDb API)
IMDB's own pages are protected by an anti-bot challenge, so PyScrappy fetches IMDB
data through the free OMDb API. Set an OMDb API key in
the OMDB_API_KEY environment variable (or pass api_key=...).
from pyscrappy import IMDBScraper
with IMDBScraper() as scraper: # reads OMDB_API_KEY from the environment
# Search by title
result = scraper.scrape(query="inception")
# ...or look up a specific IMDB id
result = scraper.scrape(query="tt1375666")
df = result.to_dataframe()
print(df[["title", "year", "rating", "genre"]])News (RSS feeds)
from pyscrappy import NewsScraper
with NewsScraper() as ns:
result = ns.scrape(feed_url="https://rss.nytimes.com/services/xml/rss/nyt/World.xml")
for article in result.data[:5]:
print(article["title"])Image search
from pyscrappy import ImageSearchScraper
with ImageSearchScraper() as iss:
result = iss.scrape(query="golden retriever", max_images=10, download_to="./dogs")YouTube
from pyscrappy import YouTubeScraper
with YouTubeScraper() as scraper:
result = scraper.scrape(query="python tutorial", max_results=10)
for video in result.data:
print(video["title"], video.get("views", ""))SoundCloud
from pyscrappy import SoundCloudScraper
with SoundCloudScraper() as scraper:
result = scraper.scrape(query="lo-fi beats", max_results=10)E-Commerce (Amazon, Newegg, IKEA)
from pyscrappy import AmazonScraper, NeweggScraper, IKEAScraper
# Amazon — general marketplace
with AmazonScraper() as scraper:
result = scraper.scrape(query="laptop", max_pages=2)
# Newegg — electronics / computer hardware
with NeweggScraper() as scraper:
result = scraper.scrape(query="graphics card", max_pages=2)
# IKEA — furniture / home (uses IKEA's JSON search API).
# Prices and products are per-country: pass the store's country/lang.
with IKEAScraper(country="gb", lang="en") as scraper: # or "us"/"en", "de"/"de", …
result = scraper.scrape(query="desk", max_results=24)
df = result.to_dataframe()Food Delivery (Zomato, Uber Eats)
from pyscrappy import ZomatoScraper, UberEatsScraper
with ZomatoScraper() as scraper:
result = scraper.scrape(city="bangalore", max_results=20)
# Uber Eats: restaurants by city (any country Uber Eats operates in),
# then the full menu of any restaurant. Pass the country's locale.
with UberEatsScraper(locale="gb") as scraper:
result = scraper.scrape(city="London", max_results=30)
store = result.data[0]
menu = scraper.get_menu(store["url"]) # items with pricesConfiguration
from pyscrappy import ScraperConfig, GenericScraper
config = ScraperConfig(
timeout=20.0, # request timeout in seconds
max_retries=3, # retry failed requests
rate_limit=2.0, # seconds between requests per domain
proxy="http://...", # proxy URL, or a list to rotate through
scraper_api=None, # route via a scraping-API service (see below)
headless=True, # browser runs headless
render_js="auto", # auto-detect if JS rendering is needed
cache_ttl=0, # response cache TTL in seconds (0 = disabled)
)
with GenericScraper(config) as gs:
result = gs.scrape(url="https://example.com")Proxies and blocked sites
Some sites (e.g. eBay, Instagram, Twitter/X, Spotify) block direct automated requests. PyScrappy supports two ways to get through them.
A proxy (or a rotating list) — applies to both the HTTP and browser backends:
from pyscrappy import ScraperConfig, AmazonScraper
# Single proxy
config = ScraperConfig(proxy="http://user:pass@host:port")
# Rotating list (one picked per request)
config = ScraperConfig(proxy=["http://p1:8080", "http://p2:8080"])A scraping-API service (ScraperAPI, ScrapeOps, ScrapingBee) — routes requests through the service, which handles proxies and anti-bot challenges for you:
config = ScraperConfig(scraper_api={
"provider": "scraperapi", # or "scrapeops", "scrapingbee"
"api_key": "YOUR_KEY",
"render_js": True, # optional
})
# Now any scraper works through the service, unchanged:
with AmazonScraper(config) as scraper:
result = scraper.scrape(query="laptop")This is the reliable way to use the scrapers marked "needs proxy" above.
Concurrent scraping
Scraping is I/O-bound, so running several scrapes at once parallelizes the
network waits. scrape_many runs one scraper over many inputs; scrape_all
runs a mix of scrapers together. Both preserve input order.
from pyscrappy import scrape_many, scrape_all, AmazonScraper, WikipediaScraper, NewsScraper
# One scraper, many queries, concurrently:
results = scrape_many(AmazonScraper, [{"query": "laptop"}, {"query": "phone"}])
# Different scrapers at once:
results = scrape_all([
lambda: WikipediaScraper().scrape(query="Python"),
lambda: NewsScraper().scrape(feed_url="https://rss.nytimes.com/services/xml/rss/nyt/World.xml"),
])Response caching
Set cache_ttl to a positive number of seconds to cache successful GET
responses. Repeated requests for the same URL (and query params) within the TTL
are served from cache, skipping both the network and the rate limiter. Caching
is disabled by default (cache_ttl=0).
from pyscrappy import WikipediaScraper
from pyscrappy import ScraperConfig
config = ScraperConfig(cache_ttl=300) # cache for 5 minutes
with WikipediaScraper(config) as ws:
ws.scrape(query="Python") # fetched over the network
ws.scrape(query="Python") # served from cacheThe cache is in memory and shared across scraper instances in the same process
(so it also speeds up repeated calls through the MCP server), and is cleared
when the process exits. Call HttpClient.clear_cache() to empty it manually.
Dependencies
Required: httpx, beautifulsoup4, lxml
Optional: playwright (JS rendering), pandas (DataFrames), mcp (MCP server)
License
Contributing
All contributions welcome. See Issues.
This package is for educational and research purposes.
Maintenance
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/mldsveda/PyScrappy'
If you have feedback or need assistance with the MCP directory API, please join our Discord server