Skip to main content Switch to mobile version scrapercity 1.0.49 ScraperCity Python SDK: B2B lead generation for AI agents and developers. Lead, local business and ecommerce databases, Google Maps, Apollo, email finder and validator, skip trace, with LangChain and OpenAI tools.
pip install scrapercity==1.0.49 Copy PIP instructions
The official Python SDK for ScraperCity: B2B lead generation for AI agents and developers. Query the Lead Database, the Local Business Database and the Ecommerce Store Database, scrape Google Maps and Apollo, find and validate emails, find mobile numbers, skip trace, and more, from plain Python or from any LangChain, LangGraph or OpenAI agent.
The SDK carries the same tool list as the ScraperCity MCP server. It is regenerated from the live API docs on every release, so a new scraper or a new filter reaches Python the same day it reaches the MCP.
pip install scrapercity pip install "scrapercity[langchain]" # LangChain / LangGraph tools pip install "scrapercity[openai]" # OpenAI Agents SDK tools No key yet? scrapercity.start_here("dentists in Austin") needs none: a guided tour with what ScraperCity is, how to sign up, the plans and the trial with their live terms, and real searches with live counts. With a key, ScraperCity().start_here(...) plans for your account and returns the exact next call.
The trial, plainly: The trial is real usage, not a demo or a free tier: $5 of credit for 7 days that works on every tool and database at the normal prices, so you can pull real records on day one and judge the data. A card is required at signup. When the 7 days end, the plan picked at signup starts; cancel before then from billing and nothing more is charged. If the credit runs out sooner, database pulls wait (nothing is charged for them); a scraper run that goes past the credit starts the plan early. Planning searches and checking counts are free. start_here() returns the live terms.
Get your API key at app.scrapercity.com/dashboard/api-docs, then export SCRAPERCITY_API_KEY=your_key (or pass it to ScraperCity("your_key")).
from scrapercity import ScraperCity sc = ScraperCity() # reads SCRAPERCITY_API_KEY print(sc.wallet()) # balance and plan # Instant database search (included on $149/mo and up; per record from credits on a trial or $49) leads = sc.query_leads(title="Head of Marketing", country=["United States"], hasEmail=True, limit=25) # Not sure of the filter values? Describe who you want in plain English. plan = sc.plan_search("dentists in Austin, Texas") # Scrapers run in the background: start, wait, download run = sc.scrape_maps("plumbers", "Denver, CO", limit=200) sc.poll_until_done(run["runId"]) sc.download(run["runId"], "plumbers.csv") Every tool by name
ScraperCity.tools() (or scrapercity.TOOLS) lists every tool with its name, description and JSON schema. Run any of them with the same arguments an MCP client would send:
sc.call_tool("query_local_business_database", {"keyword": ["thai restaurant"], "location": ["Houston TX"], "hasEmail": True}) sc.call_tool("validate_emails", {"emails": ["jane@acme.com"]}) LangChain and LangGraph
from scrapercity import langchain_tools from langgraph.prebuilt import create_react_agent tools = langchain_tools() # every tool # tools = langchain_tools(include=["plan_search", "query_lead_database"]) agent = create_react_agent(llm, tools) agent.invoke({"messages": [("user", "Find 50 VPs of Sales at SaaS companies in Texas with emails")]}) OpenAI Agents SDK and function calling
from agents import Agent, Runner from scrapercity.openai_tools import get_tools agent = Agent(name="Lead finder", tools=get_tools()) Runner.run_sync(agent, "Find 100 roofing companies in Phoenix with phone numbers") import json from openai import OpenAI from scrapercity.openai_tools import get_function_definitions, handle_tool_call client = OpenAI() resp = client.chat.completions.create(model="gpt-4.1", messages=messages, tools=get_function_definitions()) for call in resp.choices[0].message.tool_calls or []: result = handle_tool_call(call.function.name, call.function.arguments) # JSON string for the tool message For the Responses API use get_response_tools().
A failed call raises scrapercity.ScraperCityError with the API's message, .status (the HTTP code) and .data (the answer body). ScraperCityError is a RuntimeError, so code written for older versions keeps working.
Scrapers charge per result from your credits. The database tools are included with the $149/mo plan and up; on a trial or the $49 plan each new record is paid from credits. Prices below come from the live catalog on each release.
JavaScript SDK, CLI and MCP server: npm install scrapercity
MIT View SPDX License List
scrapercity sdk api-client leads lead-generation b2b b2b-data lead-database apollo google-maps email-finder email-validation skip-trace prospecting contact-enrichment langchain langgraph openai openai-agents function-calling tool-calling ai-agent mcp
Development Status 5 - Production/Stable
Intended Audience Developers
Operating System OS Independent
Programming Language Python :: 3
Topic Internet :: WWW/HTTP
Scientific/Engineering :: Artificial Intelligence
Software Development :: Libraries :: Python Modules
Release files for scrapercity 1.0.49
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 66.0 kB
Release files / scrapercity-1.0.49.tar.gz
Release files / scrapercity-1.0.49-py3-none-any.whl
Security for scrapercity 1.0.49
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 30, 2026 2 release files No provenance
Nov 29, 2026 2 release files No provenance
Nov 27, 2026 2 release files No provenance
Nov 26, 2026 2 release files No provenance
Nov 20, 2026 2 release files No provenance
Nov 19, 2026 2 release files No provenance
Nov 17, 2026 2 release files No provenance
Nov 16, 2026 2 release files No provenance
Nov 12, 2026 2 release files No provenance
Nov 9, 2026 2 release files No provenance
Nov 5, 2026 2 release files No provenance
Nov 4, 2026 2 release files No provenance
Nov 3, 2026 2 release files No provenance
Oct 31, 2026 2 release files No provenance
Oct 30, 2026 2 release files No provenance
Oct 28, 2026 2 release files No provenance
Mar 14, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




