Metadata-Version: 2.5
Name: scrapeit-sdk
Version: 0.1.0
Summary: Official Python SDK for the ScrapeIt Web Scraping API and product APIs.
Project-URL: Documentation, https://docs.scrapeit.io/guide/sdks
License-Expression: MIT
Keywords: amazon,google-maps,google-serp,scrapeit,scraping-api,web-scraping
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx<1,>=0.27
Provides-Extra: dev
Requires-Dist: datamodel-code-generator==0.83.0; extra == 'dev'
Requires-Dist: pytest==9.1.1; extra == 'dev'
Description-Content-Type: text/markdown

# ScrapeIt Python SDK

Official Python client for the [ScrapeIt](https://scrapeit.io) Web Scraping API and product APIs
(Google SERP, Google Maps, Amazon, Website Crawler and more). Sync and async clients on `httpx`,
request types generated from the ScrapeIt OpenAPI document.

```bash
pip install scrapeit-sdk
```

```python
from scrapeit import Scrapeit, ScrapeitError

client = Scrapeit()  # reads SCRAPEIT_API_KEY, or pass Scrapeit("YOUR_API_KEY")

page = client.scrape(url="https://example.com", jsRendering=True)
print(page["data"])

results = client.google_search(q="coffee near me", gl="us")
```

```python
import asyncio
from scrapeit import AsyncScrapeit

async def main() -> None:
    async with AsyncScrapeit() as client:
        job = await client.scrape_async(url="https://example.com")
        done = await client.wait_for_async_scrape(job["data"]["id"])
        print(done["data"]["status"])

asyncio.run(main())
```

Every method returns the API envelope `{"data": ..., "meta": ...}` and raises `ScrapeitError` with
the stable API error `code` (for example `INSUFFICIENT_CREDITS`). 429, 500 and 503 responses are
retried automatically with `Retry-After`.

Documentation: <https://docs.scrapeit.io/guide/sdks>
