Skip to main content

B2B lead generation for AI agents. 20+ tools: Apollo, Google Maps, email finder, skip trace, and more.

Project description

ScraperCity Python SDK

B2B lead generation for AI agents and Python developers. 20+ tools including Apollo scraping, Google Maps, email finder/validator, mobile lookup, skip trace, ecommerce store data, and more.

Install

pip install scrapercity

Quick Start

from scrapercity import ScraperCity

sc = ScraperCity("your-api-key")

# Check balance
print(sc.wallet())

# Scrape Google Maps
result = sc.scrape_maps("plumbers", "Denver, CO", limit=200)
print(result["runId"])

# Query lead database (requires $649/mo plan)
leads = sc.query_leads(title="CEO", state="California", limit=50)

LangChain / LangGraph

from scrapercity import langchain_tools
from langgraph.prebuilt import create_react_agent

tools = langchain_tools(api_key="your-key")
agent = create_react_agent(llm, tools)
result = agent.invoke({"messages": [{"role": "user", "content": "Find 50 CEOs in New York"}]})

OpenAI Agents SDK

from agents import Agent
from scrapercity.openai_tools import get_tools, init

init("your-api-key")
agent = Agent(name="Lead Gen Agent", tools=get_tools())

OpenAI Function Calling

from scrapercity.openai_tools import get_function_definitions, handle_tool_call, init

init("your-api-key")
tools = get_function_definitions()

response = client.chat.completions.create(
    model="gpt-4o",
    messages=messages,
    tools=tools
)

# Handle the tool call
for call in response.choices[0].message.tool_calls:
    result = handle_tool_call(call.function.name, json.loads(call.function.arguments))

Available Methods

Method Description Cost
scrape_apollo(url, count) B2B contacts from Apollo.io $0.0039/lead
scrape_maps(query, location) Google Maps businesses $0.01/place
validate_emails(emails) Email deliverability check $0.0036/email
find_emails(contacts) Email from name + company $0.05/contact
find_mobiles(inputs) Phone from LinkedIn/email $0.25/input
find_people(**params) Skip trace by name/email/phone $0.02/result
scrape_store_leads(**params) Shopify/WooCommerce stores $0.0039/lead
scrape_builtwith(technology) Sites using a technology $4.99/search
search_criminal_records(name) Background check $1.00 if found
query_leads(**params) 4M+ B2B database (instant) Included ($649 plan)
scrape_yelp(**params) Yelp business listings varies
scrape_angi(keyword, zips) Angi service providers varies
scrape_zillow_agents(location) Zillow real estate agents varies
scrape_airbnb(**params) Airbnb host emails varies
scrape_youtube_email(channels) YouTube channel emails varies

Authentication

export SCRAPERCITY_API_KEY="your-key"

Or pass directly: ScraperCity(api_key="your-key")

Get your API key at scrapercity.com

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scrapercity-1.0.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scrapercity-1.0.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file scrapercity-1.0.0.tar.gz.

File metadata

  • Download URL: scrapercity-1.0.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for scrapercity-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d96499ef562748392e3b43e3cb13cf237be3b439963ef43ef550c0d0ae3a1bad
MD5 ef3fcdebb1dbc9eb15f7c491fbedd964
BLAKE2b-256 6ea965e31de8faa407e22e9dae53e5ca723fc22d5d4e6178acd997d9ab54e637

See more details on using hashes here.

File details

Details for the file scrapercity-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: scrapercity-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for scrapercity-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5daebbeae265053262b178d37eaed023d09dea30259b19443ff534f6242d72c7
MD5 a0b86ae393e40be88becaa9db7d234b7
BLAKE2b-256 cb92b44c8c72ddcfefcb98b9b3b93680f19107f7cbff8d6ecfeda1d712829cd0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page