Skip to content
Back to blog
AutomationJuly 19, 20267 min readBy Hamza Rehman

Generate Up to 1,000 B2B Leads in One Hour with a Free AI Lead Scraper

Finding business leads manually is slow. A typical process involves searching for companies, opening websites, checking whether each company matches your target market, finding contact information, re...

Build this with us

Tell us what you want to automate, modernize, or launch. We will map the fastest practical delivery path.

Generate Up to 1,000 B2B Leads in One Hour with a Free AI Lead Scraper cover image
Automation insight from the softquorra engineering team.

Finding business leads manually is slow.

A typical process involves searching for companies, opening websites, checking whether each company matches your target market, finding contact information, removing duplicates, and organizing everything in a spreadsheet.

The AI Python Lead Scraper is an open-source project that automates much of this workflow using Python, FastAPI, PostgreSQL, web scraping, and Claude AI.

It can help generate large lead lists, but the result depends on search limits, website speed, AI processing time, and how strict your targeting criteria are. Therefore, generating exactly 1,000 qualified leads in one hour should be treated as a possible high-volume target, not a guaranteed result.

Repository: AI Python Lead Scraper

What Is the AI Python Lead Scraper?

The AI Python Lead Scraper is a backend application for B2B lead research.

You provide details about your business and ideal customers, such as:

target countries; industries; company size; services you offer; positive buying signals; negative signals; minimum qualification score; number of required leads.

The system then searches for relevant companies, evaluates them against your requirements, discovers publicly available email addresses, checks basic email validity, removes duplicates, and saves the results.

A simplified workflow looks like this:

Create a campaign ↓ AI prepares search queries ↓ Search providers return companies ↓ AI evaluates each company ↓ The scraper checks company websites ↓ Emails are discovered and verified ↓ Qualified leads are saved ↓ Results are exported as CSV Technologies Used

The project combines several tools, each with a specific responsibility.

Python

Python controls the business logic, scraping process, AI requests, email checks, and database communication.

FastAPI

FastAPI provides API endpoints for creating campaigns, starting lead-generation runs, checking progress, and exporting results.

It also creates interactive documentation at:

http://localhost:8000/docs PostgreSQL

PostgreSQL stores:

campaigns; lead-generation runs; discovered leads; qualification scores; email-verification results.

Because leads are stored permanently, future runs can avoid adding the same companies again.

Claude AI

Claude helps plan search queries and evaluate companies against the campaign’s ideal customer profile.

For example, instead of searching only for:

SaaS companies

the AI may create more focused searches such as:

Recently funded SaaS startups looking for a development partner Non-technical founders building an MVP Startups hiring product managers but not software engineers Companies planning to add AI features Docker

Docker packages the Python application and PostgreSQL database into a consistent environment.

This makes the project easier to run on different computers.

Campaign-Based Lead Generation

One useful feature is that targeting information is stored as a campaign.

A campaign can contain:

{ "name": "AI Development Leads", "company_name": "Softquorra", "regions": ["USA", "Canada", "UK"], "sectors": ["B2B SaaS", "HealthTech", "FinTech"], "services": [ "AI Agent Development", "MVP Development", "SaaS Development" ], "min_score": 60, "target_leads_per_run": 50 }

This means separate campaigns can be created for different services without changing the program’s code.

For example:

Campaign 1: AI-agent development Campaign 2: SaaS development Campaign 3: Mobile-app development Campaign 4: Dedicated engineering teams AI-Based Lead Qualification

The tool does not only collect company names.

It also attempts to measure how closely each company matches the campaign.

A result may look like this:

Company: Example Startup Score: 82/100

Positive signals:

  • Recently raised seed funding

  • Small team

  • Non-technical founder

  • Preparing to launch an MVP

Negative signals:

  • No clear buying timeline

The minimum score can be adjusted.

For example, setting the score to 70 produces a smaller but more focused list. Setting it to 50 may produce more leads but also allow weaker matches.

AI scoring should still be reviewed by a person because language models can misunderstand incomplete or outdated information.

Search Provider Fallback

The project supports multiple search providers, including:

DuckDuckGo; SearXNG; Brave Search; Serper.

The system can try one provider and move to another when the first provider fails or reaches a limit.

This makes the application more flexible, but free search sources may apply restrictions when too many automated searches are made.

Email Discovery and Verification

After finding a company, the scraper can visit pages such as:

Home Contact About Team Support Privacy

It looks for publicly displayed email addresses and performs basic checks.

Syntax validation

It checks whether the email follows a reasonable format.

Valid-looking example:

[email protected]

Invalid-looking example:

sales-example.com MX verification

The tool checks whether the company’s domain has an email server configured.

This does not guarantee that a particular mailbox exists, but it provides more confidence than syntax checking alone.

Optional SMTP verification

A deeper SMTP check can be enabled, but it should be used carefully because repeated verification requests may be blocked or treated as suspicious.

Duplicate Protection

The system stores previously discovered leads in PostgreSQL.

Before saving a new lead, it can compare information such as:

company domain; company name; LinkedIn URL; campaign history.

This reduces repeated records when a campaign is run more than once.

Duplicate protection is especially important for weekly or monthly lead-generation workflows.

CSV Export

Saved leads can be exported into a CSV file.

The exported file may include:

Company name Website Email Qualification score Verification status Source page Positive signals Negative signals Campaign

CSV files can be opened in:

Microsoft Excel; Google Sheets; CRM software; email outreach tools; sales-management platforms. Can It Generate 1,000 Leads in One Hour?

The tool is designed for automated and scalable research, but performance depends on several factors.

Search-provider limits

Free providers may slow down or block high request volumes.

Targeting difficulty

A broad campaign such as “software companies in the USA” may return results faster than a narrow campaign such as “recently funded HealthTech startups with non-technical founders and no internal engineering team.”

Website response time

Some websites load quickly, while others are slow, protected, or heavily dependent on JavaScript.

AI processing

Every qualification request requires time and may have an API cost.

Email verification

Deeper verification improves confidence but increases processing time.

Hardware and internet speed

The number of simultaneous searches and crawls also depends on the machine running the application.

A more accurate statement is:

The tool can automate hundreds or potentially thousands of lead-research operations, but the number of qualified and verified leads produced per hour will vary.

For testing, it is better to begin with:

{ "target_leads": 10 }

After confirming that the campaign quality is good, the target can be increased gradually.

Who May Find It Useful?

The project may be useful for:

software development agencies; SaaS companies; marketing teams; sales teams; recruiters; startup founders; consultants; freelancers; AI-automation businesses; B2B service providers.

A software development company could use it to find businesses that may need:

MVP development; SaaS engineering; AI agents; mobile applications; custom business systems; dedicated development teams. Important Limitations

This project is useful, but it is not a complete replacement for human research.

AI results may be wrong

A company can receive an incorrect score because the available search information is incomplete.

Email addresses may be outdated

An email may be technically valid but no longer monitored.

Websites may block scraping

Some websites restrict automated access or use anti-bot systems.

Free search providers may be unreliable

Provider limits or changes can affect the number of results.

It is mainly a backend tool

The repository provides FastAPI documentation, but it does not include a polished customer-facing dashboard.

A complete commercial product would also require:

user authentication; team permissions; billing; monitoring; job queues; security controls; backups; tests; cloud deployment; compliance features. Responsible Use

Lead-generation tools should be used carefully.

Publicly visible contact information does not automatically mean that unlimited marketing messages are welcome.

Before using collected leads, review:

website terms; privacy requirements; applicable marketing laws; email-provider policies; regional consent rules.

Outreach should be relevant and personalized. Recipients should also have a clear way to opt out.

Final Thoughts

The AI Python Lead Scraper demonstrates how several technologies can work together in a real business application.

It combines:

AI-powered research; campaign-based targeting; web scraping; lead scoring; email discovery; verification; duplicate protection; PostgreSQL storage; CSV export.

Its strongest benefit is not the promise of a fixed number of leads in one hour.

The real value is reducing repetitive research and giving businesses control over their own targeting rules.

For developers, it is also a practical example of building an AI workflow with Python, FastAPI, PostgreSQL, Claude, and Docker.

For sales and marketing teams, it can serve as a customizable starting point for building more focused B2B lead lists.
click here to generate 1000+ leads [https://github.com\]

Originally published through the softquorra publication on Hashnode. View the source publication.

Turn the idea into software

Bring us the workflow. We will help shape the product.