HAMMAD YOUSUF

FREE RESOURCE · FROM THE "HARVEST" REEL

A free daily lead finder with ScrapeGraphAI: setup, code and UK rules

By Hammad Yousuf · 18 October 2026

What it is: ScrapeGraphAI is an MIT-licensed Python library (31,844 GitHub stars on 17 Oct 2026) that uses an LLM to read a web page and return only the fields you ask for, as structured JSON. It runs with local models through Ollama, so you don't pay per lead.

Setup (local, about 15 minutes)

terminal
python3.12 -m venv .venv && source .venv/bin/activate
pip install scrapegraphai
playwright install chromium
ollama pull llama3.2
export SCRAPEGRAPHAI_TELEMETRY_ENABLED=false

Minimal scraper

python
import json
from pydantic import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph

class CompanyContact(BaseModel):
    company_name: str = Field(description="Trading name of the business")
    business_email: str | None = Field(description="Generic business email, e.g. hello@ or sales@")
    contact_page: str | None = Field(description="URL of the contact page")

graph = SmartScraperGraph(
    prompt="Extract the company's public business contact details. Do not extract personal phone numbers or home addresses.",
    source="https://example-shop.co.uk/contact",
    schema=CompanyContact,
    config={"llm": {"model": "ollama/llama3.2", "temperature": 0, "model_tokens": 8192}, "headless": True},
)
print(json.dumps(graph.run(), indent=2))

Copy-paste prompts

1 · Build the harvester

prompt 1 of 3
Clone https://github.com/ScrapeGraphAI/Scrapegraph-ai into ./harvest, set up a Python 3.12 venv, and write harvest.py that reads a list of UK limited-company websites from companies.csv, extracts company name, generic business email and contact page with SmartScraperGraph on ollama/llama3.2, checks robots.txt first with urllib.robotparser, and appends new rows to leads.csv without duplicates.

2 · Find UK companies the clean way

prompt 2 of 3
Use the Companies House Public Data API (free key) to list active limited companies with SIC code 47910 (online retail) and save name, number and website to companies.csv.

3 · Schedule it

prompt 3 of 3
Save this as a skill called harvest and create a scheduled task that runs it every day at 07:00.

Rules that keep you out of trouble (UK)

  • Business contacts only: limited companies and LLPs (corporate subscribers). Sole traders and ordinary partnerships need consent: if unsure, skip them.

  • Every email: say who you are and include a working opt-out. Keep a suppression list.

  • Named people (jane@brand.co.uk) are personal data under UK GDPR: legitimate-interests test, tell them where you got their data within a month.

  • Respect robots.txt and site terms; never scrape LinkedIn or Instagram; never use proxies or stealth tools to get around blocks.

Not legal advice. Fines under PECR now reach GBP 17.5m or 4% of turnover.

Sources checked

The facts on this page were checked against the sources below. Repos and docs can change at any time, so treat each project's own docs as the final word.

  • ScrapeGraphAI repo, MIT, 31,844 stars, v2.3.1. Source ↗
  • Ollama local model support and SmartScraperGraph example. Source ↗
  • ChatGPT Scheduled tasks and desktop app local runs. Source ↗
  • Claude Code desktop scheduled tasks and routines. Source ↗
  • PECR corporate vs individual subscribers, opt-out requirement. Source ↗
  • Companies House Public Data API. Source ↗

About the video: the reel that sent you here is presented by an AI avatar of Hammad Yousuf.

Keep going