Skip to main content

Scrapingdog Python Library & Package

Package CI Python

Integrate web scraping and search data into your AI workflow, RAG / fine-tuning, or Python application using this official-style wrapper for Scrapingdog.

Scrapingdog supports general web scraping (rotating & residential proxies, JavaScript rendering), Google, Google Maps, Google Shopping, Bing, Baidu, DuckDuckGo, Amazon, Walmart, eBay, App Stores, and more.

Query a vast range of data at scale, including web pages, search results, product listings, flight and hotel data, job postings, social profiles, and more.

Installation

To install the scrapingdog package, simply run the following command:

$ pip install scrapingdog

Requires Python 3.8+ and depends only on requests.

Simple Usage

Let's start by searching for Coffee on Google:

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.google(query="coffee")

print(results)

The results variable now contains a ScrapingdogResults object, which acts just like a standard dictionary, with attribute-style access added on top (results.organic_results).

Scraping an arbitrary web page returns the raw HTML instead:

html = client.scrape("https://example.com", dynamic=True, premium=False)

The Scrapingdog API key can be obtained from scrapingdog.com/signup.

Environment variables are a secure, safe, and easy way to manage secrets. Set export SCRAPINGDOG_API_KEY=<secret_api_key> in your shell. The client reads this variable automatically when api_key is omitted.

Error handling

Unsuccessful requests raise scrapingdog.HTTPError or scrapingdog.TimeoutError exceptions. The returned status code reflects the sort of error that occurred; please refer to the Scrapingdog documentation for more details.

import os
import scrapingdog

# A default timeout can be set here.
client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"), timeout=10)

try:
    results = client.google(query="coffee")
except scrapingdog.HTTPError as e:
    if e.status_code == 401:   # Invalid API key
        print(e.message)
    elif e.status_code == 400: # Missing required parameter
        pass
    elif e.status_code == 429: # Exceeds the plan's throughput limit
        pass
except scrapingdog.TimeoutError as e:
    # Handle timeout
    print(f"The request timed out: {e}")

All exceptions inherit from scrapingdog.ScrapingdogError.

Documentation

Full API documentation is available on scrapingdog.com.

Every Scrapingdog scraper has a dedicated method (75 in total). Each is a thin wrapper over client.get(), so any documented query parameter can also be passed as a keyword argument — booleans are auto-converted to true/false and None values are dropped. For any endpoint without a named method, call get() directly with the path:

data = client.get("google_trends", query="bitcoin", geo="US")

Basic Examples in Python

General Web Scraping

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
html = client.scrape(
    "https://example.com",
    dynamic=True,     # render JavaScript
    premium=True,     # use premium/residential proxies
    country="us",
)

Search Google

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.google(query="coffee", country="us", results=10, page=0)

Search Bing

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.bing(query="coffee", cc="us")

Search Baidu

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.baidu(query="coffee")

Search DuckDuckGo

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.duckduckgo(query="coffee")

Search Google Maps

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.google_maps(query="pizza")

Search Google Shopping

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.google_shopping(query="shoes", country="us")

Search Google News

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.google_news(query="football", country="us")

Search Google Scholar

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.google_scholar(query="coffee")

Search Google Jobs

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.google_jobs(query="jobs in london")

Google Trends

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.google_trends(query="pizza,burger", data_type="TIMESERIES")

Amazon Search

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.amazon_search(query="spoon", domain="com", country="us", page=1)

Amazon Product

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.amazon_product(asin="B00AP877FS", domain="com", country="us")

Walmart Search

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.walmart_search(url="https://www.walmart.com/search?q=coffee")

Search eBay

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.ebay_search(url="https://www.ebay.com/sch/i.html?_nkw=coffee")

Apple App Store

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.apple_app_store(term="whatsapp", country="us", lang="en-us")

Profile

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.profile("rbranson", type="profile")

YouTube

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.youtube(channel_id="UCX6OQ3DkcsbYNE6H8uQQuVA", country="us")

Screenshot

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
results = client.screenshot(url="https://www.scrapingdog.com")

Account

import os
import scrapingdog

client = scrapingdog.Client(api_key=os.getenv("SCRAPINGDOG_API_KEY"))
account = client.account()  # remaining credits & plan usage

Available Methods

All 75 endpoint methods (click to expand)

General & account: scrape, screenshot, account, webhook

Google Search: google, google_images, google_videos, google_shorts, google_news, google_news_v2, google_shopping, google_local, google_jobs, google_autocomplete, google_finance, google_flights, google_hotels, google_lens, google_product, google_immersive_product, google_ai_mode, google_ai_overview, google_ads_transparency

Google Maps: google_maps, google_maps_places, google_maps_photos, google_maps_posts, google_maps_reviews

Google Scholar: google_scholar, google_scholar_profiles, google_scholar_author, google_scholar_cite

Google Patents / Trends: google_patents, google_patents_details, google_trends, google_trends_autocomplete, google_trends_trending_now

Other search engines: bing, bing_shopping, baidu, duckduckgo, yelp, universal_search

Amazon: amazon_search, amazon_product, amazon_offers, amazon_reviews, amazon_autocomplete

Apple: apple_app_store, apple_product, apple_reviews

Retail: walmart_search, walmart_product, walmart_reviews, walmart_autocomplete, ebay_search, ebay_product, flipkart_search, flipkart_product, myntra_search, myntra_product, zillow

Social & professional: profile, profile_post, jobs, indeed, x_profile, x_post, tiktok_profile, tiktok_post, tiktok_ads, facebook, instagram, youtube

AI: chatgpt

License

MIT License.

Contributing

Bug reports and pull requests are welcome. Once dependencies are installed (pip install -e ".[test]"), you can run the tests with pytest.

Publishing a new release

Releases are published to PyPI automatically via GitHub Actions using Trusted Publishing (no API token required).

  1. Bump __version__ in scrapingdog/__init__.py (the single source of truth — pyproject.toml reads it dynamically).
  2. Push a version tag — the release workflow tests, builds, and publishes to PyPI:
    git tag v1.0.0
    git push origin v1.0.0
    

One-time PyPI setup (before the first release): on pypi.org/manage/account/publishing, add a pending publisher with — Project: scrapingdog, Owner: Darshan972, Repository: Scrapingdog-PIP, Workflow: release.yml, Environment: pypi.

Release files for scrapingdog 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scrapingdog 1.1.0
File Size Uploaded
scrapingdog-1.1.0.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scrapingdog 1.1.0
File Interpreter ABI Platform
scrapingdog-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.4 kB

Release files / scrapingdog-1.1.0.tar.gz

Download URL scrapingdog-1.1.0.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3cc68959dd65e6d2fb4efd4adf6e291e4b44d93c1d613ee7926e2305babc6e3b
BLAKE2b-256 checksum
How to use checksums
36cf9743fb3b119c7df72976cf6b44f560c1ebd97e4d1e6c99043fea85ce48f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / scrapingdog-1.1.0-py3-none-any.whl

Download URL scrapingdog-1.1.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b4748fc17df4365f02e15f00bdd3cc25717a50d2978112f7af3a596a79ed547
BLAKE2b-256 checksum
How to use checksums
8350e792134d5a07d85d60d15e4321f35afc13a6dd79e2b0ff1f1a5c3a1f129c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page