Registry / devops / scrapegraphai

scrapegraphai

JSON →
library2.1.3pypypi✓ verified 84d ago

A Python library for building scraping pipelines using LLMs and direct graph logic, built on LangChain. Current version 2.1.3, supports Python >=3.12, <4.0, and has frequent releases.

pip install scrapegraphai
INSTALL
IMPORT
SIG · SCRAPEGRAPHAI
S
scrapegraphai
devopspythonv2.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SmartScraperGraph
from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai import SmartScraperGraph
Class is in the graphs module, not top-level
SearchGraph
from scrapegraphai.graphs import SearchGraph

Basic example using SmartScraperGraph to scrape a webpage with an LLM.

from scrapegraphai.graphs import SmartScraperGraph import os # Define the configuration for the scraping pipeline config = { "llm": { "api_key": os.environ.get('OPENAI_API_KEY', 'your-api-key-here'), "model": "gpt-4o-mini", }, "verbose": True, } # Define the prompt and source prompt = "Extract all product names and prices from the page." source = "https://example.com/products" # Create and run the graph graph = SmartScraperGraph(prompt=prompt, source=source, config=config) result = graph.run() print(result)
Debug
Known issues
breakingIn version 2.0.0, the library was rewritten with a new graph-based architecture. The old `SmartScraper` and `SmartScraperGraph` (from v1) are removed. Code from v1.x is incompatible.
fix
Migrate to new graph classes like SmartScraperGraph, SearchGraph, etc. Check docs for config changes.
affects: >=2.0.0
gotchaThe library uses Playwright under the hood for browser-based scraping. If you haven't installed Playwright browsers, you'll get an error. Run `playwright install`.
fix
Run `playwright install` after installing scrapegraphai to download browser binaries.
affects: all
deprecatedThe `llm` config key now requires a `model` parameter. In v1.x, some models were inferred; now you must specify explicitly.
fix
Always include `'model'` in the `llm` config dictionary.
affects: >=2.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'scrapegraphai'
The package is not installed or the environment is incorrect.
fix
Ensure you have installed scrapegraphai via pip: `pip install scrapegraphai`
PlaywrightError: It looks like you are using Playwright without installing the browsers
Playwright browsers are not installed.
fix
Run `playwright install` in your terminal after installing scrapegraphai.
KeyError: 'model'
The `model` key is missing in the `llm` config.
fix
Add `'model': 'gpt-4o-mini'` (or your chosen model) to the `llm` dictionary.
Upgrade
Version history
2.1.3latest on PyPI · released Jun 2, 2026
Audit
Dependencies
playwrightoptionalRequired for browser-based scraping
chromiumoptionalRequired by Playwright if using browser scraping
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources

No resource links recorded.

scrapegraphai — pip install scrapegraphai · libregistry