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.2

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.2
File Size Uploaded Provenance Actions
scrapyio_sdk-0.1.2.tar.gz 14.9 kB Without provenance Details for scrapyio_sdk-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 27.7 kB

Release files / scrapyio_sdk-0.1.2.tar.gz

Download URL scrapyio_sdk-0.1.2.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
08d7b58e6fe2aa3ba5e2558f5fd514cf9119145039d74a365f08f71ba57fb5fe
BLAKE2b-256 checksum
How to use checksums
79eab486be586b741fa35d1a27c6847dd969116ce01e74f7c65a3d287ce6d9be
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.2-py3-none-any.whl

Download URL scrapyio_sdk-0.1.2-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3839c3171963187a2a2b308ea725475cc87170485d09cb55367365a856f446d
BLAKE2b-256 checksum
How to use checksums
dc418aa4082a52dd89c7aaa0dbd5330380365d2d7f8414339caf94dc6c008106
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.2

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