Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

🚀 Looking for an even faster and simpler way to scrape at scale (only 5 lines of code)? Check out our enhanced version at ScrapeGraphAI.com! 🚀


🕷️ ScrapeGraphAI: You Only Scrape Once

ScrapeGraphAI

English | 中文 | 日本語 | 한국어 | Русский | Türkçe | Deutsch | Español | français | Português | Italiano

PyPI Downloads

License: MIT

ScrapeGraphAI%2FScrapegraph-ai | Trendshift

ScrapeGraphAI is a web scraping python library that uses LLM and direct graph logic to create scraping pipelines for websites and local documents (XML, HTML, JSON, Markdown, etc.).

Just say which information you want to extract and the library will do it for you!

🚀 Integrations

ScrapeGraphAI offers seamless integration with popular frameworks and tools to enhance your scraping capabilities. Whether you're building with Python or Node.js, using LLM frameworks, or working with no-code platforms, we've got you covered with our comprehensive integration options..

Web data extraction at scale? Try ScrapeGraphAI cloud

You can find more informations at the following link

Integrations:

🚀 Quick install

The reference page for Scrapegraph-ai is available on the official page of PyPI: pypi.

pip install scrapegraphai

# IMPORTANT (for fetching websites content)
playwright install

Note: it is recommended to install the library in a virtual environment to avoid conflicts with other libraries 🐱

💻 Usage

There are multiple standard scraping pipelines that can be used to extract information from a website (or local file).

The most common one is the SmartScraperGraph, which extracts information from a single page given a user prompt and a source URL.

from scrapegraphai.graphs import SmartScraperGraph

# Define the configuration for the scraping pipeline
graph_config = {
    "llm": {
        "model": "ollama/llama3.2",
        "model_tokens": 8192,
        "format": "json",
    },
    "verbose": True,
    "headless": False,
}

# Create the SmartScraperGraph instance
smart_scraper_graph = SmartScraperGraph(
    prompt="Extract useful information from the webpage, including a description of what the company does, founders and social media links",
    source="https://scrapegraphai.com/",
    config=graph_config
)

# Run the pipeline
result = smart_scraper_graph.run()

import json
print(json.dumps(result, indent=4))

[!NOTE] For OpenAI and other models you just need to change the llm config!

graph_config = {
   "llm": {
       "api_key": "YOUR_OPENAI_API_KEY",
       "model": "openai/gpt-4o-mini",
   },
   "verbose": True,
   "headless": False,
}

The output will be a dictionary like the following:

{
    "description": "ScrapeGraphAI transforms websites into clean, organized data for AI agents and data analytics. It offers an AI-powered API for effortless and cost-effective data extraction.",
    "founders": [
        {
            "name": "",
            "role": "Founder & Technical Lead",
            "linkedin": "https://www.linkedin.com/in/perinim/"
        },
        {
            "name": "Marco Vinciguerra",
            "role": "Founder & Software Engineer",
            "linkedin": "https://www.linkedin.com/in/marco-vinciguerra-7ba365242/"
        },
        {
            "name": "Lorenzo Padoan",
            "role": "Founder & Product Engineer",
            "linkedin": "https://www.linkedin.com/in/lorenzo-padoan-4521a2154/"
        }
    ],
    "social_media_links": {
        "linkedin": "https://www.linkedin.com/company/101881123",
        "twitter": "https://x.com/scrapegraphai",
        "github": "https://github.com/ScrapeGraphAI/Scrapegraph-ai"
    }
}

There are other pipelines that can be used to extract information from multiple pages, generate Python scripts, or even generate audio files.

Pipeline Name Description
SmartScraperGraph Single-page scraper that only needs a user prompt and an input source.
SearchGraph Multi-page scraper that extracts information from the top n search results of a search engine.
SpeechGraph Single-page scraper that extracts information from a website and generates an audio file.
ScriptCreatorGraph Single-page scraper that extracts information from a website and generates a Python script.
SmartScraperMultiGraph Multi-page scraper that extracts information from multiple pages given a single prompt and a list of sources.
ScriptCreatorMultiGraph Multi-page scraper that generates a Python script for extracting information from multiple pages and sources.

For each of these graphs there is the multi version. It allows to make calls of the LLM in parallel.

It is possible to use different LLM through APIs, such as OpenAI, Groq, Azure, Gemini, MiniMax and more, or local models using Ollama.

Remember to have Ollama installed and download the models using the ollama pull command, if you want to use local models.

📖 Documentation

Open In Colab

The documentation for ScrapeGraphAI can be found here.

🆚 Open Source vs Managed API

ScrapeGraphAI comes in two flavours: this open-source library, which you run yourself, and the managed cloud API (used via the Python and JS/TS SDKs). This table explains the difference so you can pick the right one.

Open Source (scrapegraphai) Managed API (scrapegraph-py / scrapegraph-js)
What it is A Python library you run yourself A hosted cloud service you call via SDK
Where it runs Your own infrastructure (self-hosted) ScrapeGraphAI cloud
LLM Bring your own (OpenAI, Groq, Gemini, Azure, local via Ollama) Managed for you
Browser / JS rendering You configure it (Playwright) Managed (stealth, auto/fast/js modes)
Proxies & anti-bot Your responsibility Included
Scaling & maintenance Your responsibility Fully managed
Cost model LLM tokens + your own infra Pay-as-you-go credits
Auth Your own LLM keys SGAI_API_KEY
Capabilities Graph pipelines (SmartScraper, Search, Speech, ScriptCreator…) Scrape, Extract, Search, Crawl, Monitor, History
Setup effort More configuration Minimal — API key + one call
License MIT SDK is MIT; the API service is paid

Choose the open-source library if you want full control, on-prem/self-hosted data, local LLMs (Ollama), or fine-grained cost tuning — and you're happy to manage browsers, proxies and scaling yourself.

Choose the managed API if you want zero infrastructure, managed JS rendering & anti-bot, built-in Crawl and scheduled Monitor jobs, and the fastest path to production — billed per credit.

🏆 Sponsors

NodeMaven

Codes for ScrapeGraphAI users: SCRAPEGRAPH35 (35% off mobile and residential proxies), SCRAPEGRAPH40 (40% off ISP / static proxies).

🤝 Contributing

Feel free to contribute and join our Discord server to discuss with us improvements and give us suggestions!

Please see the contributing guidelines.

My Skills My Skills My Skills

🔗 ScrapeGraph API & SDKs

If you are looking for a quick solution to integrate ScrapeGraph in your system, check out our powerful API here!

API Banner

We offer SDKs in both Python and Node.js, making it easy to integrate into your projects. Check them out below:

SDK Language GitHub Link
Python SDK Python scrapegraph-py
Node.js SDK Node.js scrapegraph-js

The Official API Documentation can be found here.

📈 Telemetry

We collect anonymous usage metrics to enhance our package's quality and user experience. The data helps us prioritize improvements and ensure compatibility. If you wish to opt-out, set the environment variable SCRAPEGRAPHAI_TELEMETRY_ENABLED=false. For more information, please refer to the documentation here.

❤️ Contributors

Contributors

🎓 Citations

If you have used our library for research purposes please quote us with the following reference:

  @misc{scrapegraph-ai,
    author = {Lorenzo Padoan, Marco Vinciguerra},
    title = {Scrapegraph-ai},
    year = {2024},
    url = {https://github.com/ScrapeGraphAI/Scrapegraph-ai},
    note = {A Python library for scraping leveraging large language models}
  }

Authors

Contact Info
Marco Vinciguerra Linkedin Badge
Lorenzo Padoan Linkedin Badge

📜 License

ScrapeGraphAI is licensed under the MIT License. See the LICENSE file for more information.

Acknowledgements

  • We would like to thank all the contributors to the project and the open-source community for their support.
  • ScrapeGraphAI is meant to be used for data exploration and research purposes only. We are not responsible for any misuse of the library.

Made with ❤️ by ScrapeGraph AI

Scarf tracking

Release files for scrapegraphai 2.2.4b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scrapegraphai 2.2.4b1
File Size Uploaded
scrapegraphai-2.2.4b1.tar.gz 3.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for scrapegraphai 2.2.4b1
File Interpreter ABI Platform
scrapegraphai-2.2.4b1-py3-none-any.whl Python 3 none any Details

Total release size: 3.4 MB

Release files / scrapegraphai-2.2.4b1.tar.gz

Download URL scrapegraphai-2.2.4b1.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
71f101cd58e1294ad64951be33077868b9dd60967191e777912a2126e122d57b
BLAKE2b-256 checksum
How to use checksums
f3d3fe699aa51ef288bf02d276ef5820d9d290eff8787643c764967593432bbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / scrapegraphai-2.2.4b1-py3-none-any.whl

Download URL scrapegraphai-2.2.4b1-py3-none-any.whl
Size 204.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16f9d58648322d8a2183c8f76bc46d0ad9034a212c4ace3c9d4ca77b7b27cc1a
BLAKE2b-256 checksum
How to use checksums
2af17dc666ed9e8e44f9071ac0243c7d22eece280be7b2317b8a81e6f62d02e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

2.3.0

2 release files

2.2.4

2 release files

This release

2.2.4b1 This release

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

1.75.1

2 release files

1.75.0

2 release files

1.74.0

2 release files

1.73.1

2 release files

1.73.0

2 release files

1.72.0

2 release files

1.69.0

2 release files

1.68.0

2 release files

1.67.0

2 release files

1.66.0

2 release files

1.63.1

2 release files

1.63.0

2 release files

1.62.0

2 release files

1.60.0

2 release files

1.59.0

2 release files

1.58.0

2 release files

1.57.0

2 release files

1.56.0

2 release files

1.52.0

2 release files

1.51.0

2 release files

1.50.0

2 release files

1.49.0

2 release files

1.48.0

2 release files

1.47.0

2 release files

1.46.0

2 release files

1.45.0

2 release files

1.44.0

2 release files

1.43.1

2 release files

1.43.0

2 release files

1.42.1

2 release files

1.42.0

2 release files

1.40.1

2 release files

1.40.0

2 release files

1.39.0

2 release files

1.38.1

2 release files

1.37.1

2 release files

1.37.0

2 release files

1.36.0

2 release files

1.33.3

2 release files

1.31.1

2 release files

1.31.0

2 release files

1.27.0

2 release files

1.26.7

2 release files

1.26.6

2 release files

1.26.5

2 release files

1.26.4

2 release files

1.26.3

2 release files

1.26.2

2 release files

1.26.1

2 release files

1.26.0

2 release files

1.25.1

2 release files

1.25.0

2 release files

1.24.1

2 release files

1.24.0

2 release files

1.23.1

2 release files

1.23.0

2 release files

1.22.0

2 release files

1.21.1

2 release files

1.21.0

2 release files

1.20.1

2 release files

1.20.0

2 release files

1.19.0

2 release files

1.18.3

2 release files

1.18.2

2 release files

1.15.1

2 release files

1.15.0

2 release files

1.14.1

2 release files

1.14.0

2 release files

1.13.3

2 release files

1.13.2

2 release files

1.11.3

2 release files

1.11.2

2 release files

1.11.1

2 release files

1.11.0

2 release files

1.10.4

2 release files

1.10.3

2 release files

1.10.2

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.5

2 release files

1.7.4

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page