B2B Scrapers Demo

Async Python scrapers for 3 major B2B trade platforms:

Platform Type Coverage
Alibaba.com Product listings China / Global
TradeKey.com Buying leads (RFQ) Global
Kompass.com Company directory Europe / Global

Installation

pip install git+https://github.com/Bhllcoder1/b2b-scrapers-demo.git

Or clone and install:

git clone https://github.com/Bhllcoder1/b2b-scrapers-demo.git
cd b2b-scrapers-demo
pip install -e .

Quick Start

import asyncio
from b2b_scrapers import DemoScraperService

async def main():
    results = await DemoScraperService.search_all("textile manufacturer", max_results=10)
    for r in results:
        print(r["source"], r.get("product_name") or r.get("company_name") or r.get("rfq_title"))

asyncio.run(main())

Run the included example:

SCRAPERAPI_KEY=your_key python example.py

Individual Scrapers

from b2b_scrapers import AlibabaScraper, TradeKeyScraper, KompassScraper

# Alibaba product search
results = await AlibabaScraper.search_products("cotton fabric", max_results=20)

# TradeKey buying leads
leads = await TradeKeyScraper.search_rfqs("leather goods", country="Turkey")

# Kompass company directory
companies = await KompassScraper.search_companies("textile exporter", country="Italy")

Environment Variables

Variable Description
SCRAPERAPI_KEY ScraperAPI key — enables HTML parsing. Without it, direct search URLs are returned as fallback.

Requirements

  • Python 3.10+
  • httpx, beautifulsoup4, lxml

Built With

Share this project:

Updates