Skip to main content

scrapyio-sdk

Official Python SDK for Scrapy.io.

Server-side only. Keep API keys off client devices.

Install

pip install scrapyio-sdk

Authentication

import os
from scrapyio_sdk import ScrapyIO

client = ScrapyIO(api_key=os.environ["SCRAPYIO_API_KEY"])

Always sends Authorization: Bearer <api_key>.

First request

tools = client.tools.list(q="instagram", limit=20)
# {"items", "total", "offset", "limit"}

tool = client.tools.get("datadoping", "instagram-profile-scraper")
# or:
same = client.tool("datadoping/instagram-profile-scraper").get()

Run a scraper

Sync (/v1/api)

result = client.tool("datadoping/instagram-profile-scraper").call({
    "username": "nasa",
})

Async (/v1/scraper) + poll

run = client.tool("datadoping/instagram-profile-scraper").start({
    "usernames": ["nasa"],
})

finished = client.run(run["id"]).wait(
    poll_interval_ms=3000,
    timeout_ms=15 * 60_000,
)

page = client.run(run["id"]).list_items(offset=0, limit=100)

Schedules

schedule = client.schedules.create(
    {
        "publisher": "datadoping",
        "slug": "instagram-profile-scraper",
        "runName": "nightly-ig",
        "timezone": "UTC",
        "frequency": "one-time",
        "date": "2026-09-20",
        "time": "23:50",
        "inputs": ["nasa"],
    },
    idempotency_key="nightly-ig-v1",
)

client.schedules.update(schedule["id"], {"isActive": False})
client.schedules.delete(schedule["id"])

Errors

from scrapyio_sdk import ScrapyIO, ScrapyIOError

try:
    client.tools.get("nope", "missing")
except ScrapyIOError as err:
    # err.type, err.status, err.message, err.doc_url
    ...

Mental model

client
├── tools.list / tools.get
├── tool("publisher/slug").get / .call / .start
├── runs.list / runs.get
├── run(id).get / .wait / .list_items
└── schedules.list / get / create / update / delete

Development

cd sdk/python
python -m pip install -e ".[dev]"
pytest

Notes

  • GET requests may retry on transient 5xx/429; execution POSTs are not auto-retried.
  • list_items() is JSON-only in v0.1.
  • Companion JS package: @scrapyio/sdk.

Metadata

Release files for scrapyio-sdk 0.1.1

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

Source distribution (sdist)

Source distribution for scrapyio-sdk 0.1.1
File Size Uploaded Provenance Actions
scrapyio_sdk-0.1.1.tar.gz 9.4 kB Without provenance Details for scrapyio_sdk-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scrapyio-sdk 0.1.1
File Interpreter ABI Platform Actions
scrapyio_sdk-0.1.1-py3-none-any.whl Python 3 none any Details for scrapyio_sdk-0.1.1-py3-none-any.whl

Total release size: 22.0 kB

Release files / scrapyio_sdk-0.1.1.tar.gz

Download URL scrapyio_sdk-0.1.1.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6bd2d3a43a805f69a48969cc9b7646d208f91a9d05762f2a9950270fcbaddf52
BLAKE2b-256 checksum
How to use checksums
0ff789419b74531415baf1568e6998f1532aa2c564d13b0e78361031d194f884
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / scrapyio_sdk-0.1.1-py3-none-any.whl

Download URL scrapyio_sdk-0.1.1-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5616f1212df91f8331c6d242e7d4e3e1016b16657911b25d5ddc3c51dade23c8
BLAKE2b-256 checksum
How to use checksums
7e4ad7d4327ef20b1105d751c6fdac28d5184dcfe92b67134d7ecc039462a4c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Security for scrapyio-sdk 0.1.1

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.

No provenance found

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.

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