Skip to main content

fetchora — Python SDK

Official Python client for the Scraping SaaS REST API. Sync + async interfaces, zero-setup auth (SCRAPING_API_KEY env var), wait-with-fallback semantics.

Install

pip install fetchora

Requires Python 3.9+.

Quickstart

from fetchora import ScrapingClient

client = ScrapingClient()  # SCRAPING_API_KEY read from env
page = client.scrape("https://example.com")
print(page["result"]["markdown"])
import asyncio
from fetchora import AsyncScrapingClient

async def main():
    async with AsyncScrapingClient() as client:
        page = await client.scrape("https://example.com")
        print(page["result"]["markdown"])

asyncio.run(main())

Environment variables

Variable Required Default Description
SCRAPING_API_KEY yes (unless passed explicitly) — Bearer token
SCRAPING_BASE_URL no https://api.scraping.io Override for self-hosted / dev

API reference

Method REST
get_balance() GET /v1/billing/balance
scrape(url, *, wait=True, wait_timeout_s=60, cookies=None, format="markdown") POST /v1/scrape + poll
get_scrape_status(task_id) GET /v1/scrape/{id}
crawl(urls, *, wait=True, wait_timeout_s=600, cookies=None, include_items=True) POST /v1/crawl + poll
get_crawl_status(crawl_id, *, include_items=True) GET /v1/crawl/{id} + fan-out

On wait=True timeout → ScrapingTimeoutError. On wait=False → returns {"task_id": ...} / {"crawl_id": ...} immediately.

Errors

All errors inherit from fetchora.ScrapingError:

Class Code Trigger
InvalidApiKeyError invalid_api_key 401
InsufficientBalanceError insufficient_balance 402
ForbiddenError forbidden 403
NotFoundError not_found 404
AlreadyTerminalError already_terminal 409
InvalidInputError invalid_input 400, 422
ServerError server_error 5xx
ScrapingTimeoutError timeout SDK wait-timeout

License

MIT. See repo root for source.

Metadata

Release files for fetchora 0.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 fetchora 0.1.0
File Size Uploaded Provenance Actions
fetchora-0.1.0.tar.gz 10.4 kB With provenance Details for fetchora-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 20.5 kB

Release files / fetchora-0.1.0.tar.gz

Download URL fetchora-0.1.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
85e6f49e5c9475c7a37e5e49cbfe5cde22b53ef4e6c9c936e5e023d7cf60ed0b
BLAKE2b-256 checksum
How to use checksums
8b34ea6a5a3f43ca39eee29897e5806f6cb4ff8f1db00ddb94065dbd9f273e57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 24, 2026.

Transparency log

Release files / fetchora-0.1.0-py3-none-any.whl

Download URL fetchora-0.1.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9fbc8f9d08abdc802cc08dc5dbef545af0ca3c6bfbe6f3435e7702affbb8fb6
BLAKE2b-256 checksum
How to use checksums
e63bcb0f8977d64ae2e589a7c2c63b6e4d6435ed214661f0d398e8e245ed3cee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 24, 2026.

Transparency log

Security for fetchora 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fetchora-0.1.0.tar.gz

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 Apr 24, 2026.

Transparency log

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

This release

0.1.0 This release

2 release files Full provenance

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