scrapio
Official Python SDK for Scrapio — fetch, crawl, search, and extract structured data from any URL.
Install
pip install scrapio-py
Requires Python 3.9 or later.
Quickstart
from scrapio import ApiClient, FetchRequest
client = ApiClient(api_key="YOUR_API_KEY")
result = client.fetch.fetch(FetchRequest(
url="https://example.com",
output=["markdown"],
))
print(result.outputs["markdown"])
Usage
Fetch a page
result = client.fetch.fetch(FetchRequest(
url="https://news.ycombinator.com",
render_js=True,
output=["markdown"],
))
Google Search
from scrapio import GoogleSearchParams
results = client.google.search(GoogleSearchParams(
search="best web scraping API 2025",
country_code="us",
))
print(results.organic_results)
Amazon product
product = client.amazon.get_product("B08N5WRWNW")
print(product.title, product.price)
Walmart search
items = client.walmart.search("headphones")
YouTube transcript
video = client.youtube.get_video("dQw4w9WgXcQ")
Browser automation
result = client.interact.interact({
"url": "https://example.com",
"actions": [
{"type": "click", "selector": "#login"},
{"type": "type", "selector": "#email", "text": "user@example.com"},
],
})
Crawl a site
result = client.crawl.crawl({
"seeds": ["https://docs.example.com"],
"max_pages": 50,
})
Async jobs
from scrapio import CreateJobRequest
job = client.jobs.create(CreateJobRequest(
kind="fetch",
input={"url": "https://example.com", "output": ["markdown"]},
))
result = client.jobs.wait_for_completion(job.job_id, poll_interval=2.0, timeout=120.0)
Async client
import asyncio
from scrapio import AsyncApiClient, FetchRequest
async def main():
async with AsyncApiClient(api_key="YOUR_API_KEY") as client:
result = await client.fetch.fetch(FetchRequest(
url="https://example.com",
output=["markdown"],
))
print(result.outputs["markdown"])
asyncio.run(main())
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
api_key |
str |
required | Your API key |
base_url |
str |
https://api.scrapio.dev |
Override for local/staging |
timeout |
float |
30.0 |
Per-request timeout (seconds) |
max_retries |
int |
3 |
Max retries on 429/503 |
Error handling
from scrapio import (
ApiClient, FetchRequest,
AuthError, RateLimitError, CreditsExhaustedError, ApiError,
)
try:
client.fetch.fetch(FetchRequest(url="https://example.com"))
except AuthError:
print("Invalid API key")
except CreditsExhaustedError:
print("No credits remaining")
except RateLimitError:
print("Rate limited — back off and retry")
except ApiError as e:
print(f"API error {e.status_code}: {e}")
Links
License
MIT
Metadata
Release files for scrapio-py 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scrapio_py-1.2.0.tar.gz | 12.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scrapio_py-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.2 kB
Release files / scrapio_py-1.2.0.tar.gz
| Download URL | scrapio_py-1.2.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03485fb32a24320178818619d12d775e8c65c36449f45310df538d64a1eaf49a
|
|
BLAKE2b-256 checksum How to use checksums |
900bf0106c423f3ad4a5933929e1e391ebac574e78716b50562d5bd9cd57ac7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / scrapio_py-1.2.0-py3-none-any.whl
| Download URL | scrapio_py-1.2.0-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07852dce977c97b479afdf21204bcb216553b8ab129e6347c88c13ce89dd68ff
|
|
BLAKE2b-256 checksum How to use checksums |
e75dbe8ad8a4f2d7eca01070a4f689bba4872b3484902eef0d8e469959c2d34d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|