← All posts

Automation

How to Scrape Websites With AI in Plain English Using ScrapeGraphAI

How to Scrape Websites With AI in Plain English Using ScrapeGraphAI

How to Scrape Websites With AI in Plain English Using ScrapeGraphAI

Anthony Sitaš

·

How to Scrape Websites With AI in Plain English Using ScrapeGraphAI

Yes, you can scrape a website with AI without buying a scraping tool. ScrapeGraphAI is a free, open source Python library: you give it a URL, describe the data you want in plain English, and it returns the results as structured data.

I covered it in a 30-second reel about lead generation. This post explains how it works, what it costs to run and how to use it responsibly.

What ScrapeGraphAI is

  • An open source Python library under the MIT license, with more than 30,000 stars on GitHub.

  • Its main pipeline, SmartScraperGraph, takes two inputs: a prompt describing what to extract and the source URL.

  • It uses a large language model to read the page and returns a structured result, a JSON-style dictionary you can save or load into a spreadsheet.

  • It works with hosted models from providers such as OpenAI, Groq, Azure and Google Gemini, or with local models through Ollama.

How to scrape a site with ScrapeGraphAI

  1. Install it. Run pip install scrapegraphai, then playwright install so it can load web pages.

  2. Choose a model. Add an API key for a hosted model, or run a local model with Ollama.

  3. Write your request in plain English. For example: “List every business name, phone number and city on this page.”

  4. Run it on the URL. Pass your prompt and the page address to SmartScraperGraph.

  5. Check the output. Compare a few results against the page before you rely on them.

Using it with Claude Code and other AI agents

You don’t have to write the Python yourself. An AI coding agent such as Claude Code can install the library, write the script from your description and run it in your project.

There is also an official ScrapeGraph MCP server that lets Claude Desktop, Cursor and other MCP clients call ScrapeGraph directly. That server uses ScrapeGraphAI’s hosted API, which needs an API key and paid credits. The free option is the open source library.

The hosted route makes sense when you want scraping to run without your own computer. Through the MCP server, the API offers multi-page crawls and monitors that run scraping jobs on a schedule, all billed in credits.

Example: a local lead list

Say you want a list of businesses from a public chamber of commerce directory that allows it. Your request could be: “From this page, list each business name, website, phone number and the city it serves.” Run it on each directory page, load the results into a spreadsheet, remove duplicates and check each entry against the business’s own website before you reach out. Expect some gaps, since the model can only return what the page actually shows.

What it costs

  • The library is free.

  • If you use a hosted model, that provider bills you for usage.

  • If you run a local model through Ollama, there is no API bill, but your computer needs to be able to run the model.

  • ScrapeGraphAI’s hosted API is a separate, paid service.

Scrape responsibly

  • Read the site’s terms. Some sites ban scraping. LinkedIn, for example, says it does not permit third-party crawlers or bots that scrape its site, so leave it out of your lead lists.

  • Handle personal data with care. Collect only what you need, and follow the privacy and anti-spam rules where you do business before you contact anyone.

  • Go easy on servers. Scrape at a modest pace and avoid pulling the same pages again and again.

  • Keep a record. Note which sites you scraped, when and why, so you can answer questions about where your data came from.

How a business owner can use ScrapeGraphAI

  • Build lead lists from public business directories and association member pages that allow it.

  • Track competitors by pulling prices, packages and offers from their public pages each month.

  • Research a market by collecting product details, locations or opening hours across many sites.

  • Check your listings to confirm your business details are correct on directories that mention you.

Data like this helps behind the scenes. Out front, MetaEngines turns what you know into daily videos presented by your own AI clone. Get started to see how it works.

Frequently asked questions

Is ScrapeGraphAI free?

The open source library is free under the MIT license. You pay only for the language model you connect, unless you run a local model through Ollama. ScrapeGraphAI’s hosted API is a separate, paid service.

Do I need to code to use ScrapeGraphAI?

A little. It is a Python library, but an AI coding agent such as Claude Code can install it and write the script from a plain-English description.

Can I use ScrapeGraphAI on LinkedIn?

You shouldn’t. LinkedIn says it does not permit third-party crawlers or bots that scrape its site. Stick to public pages whose terms allow it.

What does ScrapeGraphAI return?

Structured data, usually a JSON-style dictionary that you can save or turn into a spreadsheet.

Every day you don’t post, someone else gets the customer.

Every day you don’t post, someone else gets the customer.

Every day you don’t post, someone else gets the customer.

What are you waiting for?