Skip to main content

RUNCrawl Python SDK

Official Python SDK for RUNCrawl — Web + Video Intelligence API for AI.

Installation

pip install runcrawl

Quick Start

from runcrawl import RunCrawl

# Initialize client
ck = RunCrawl(api_key="ck_free_xxx")

# Scrape a webpage
result = ck.scrape("https://vnexpress.net/thoi-su")
print(result.title)
print(result.content[:200])

# Scrape YouTube video transcript
video = ck.scrape("https://youtu.be/-Td-D-vKJDg")
print(video.content)  # Full transcript

# Batch scrape multiple URLs
results = ck.batch([
    "https://vnexpress.net",
    "https://cafef.vn",
])

for result in results:
    print(f"{result.title}: {len(result.content)} chars")

Async Support

import asyncio
from runcrawl import AsyncRunCrawl

async def main():
    async with AsyncRunCrawl(api_key="ck_free_xxx") as ck:
        result = await ck.scrape("https://example.com")
        print(result.title)

asyncio.run(main())

Features

  • 🚀 Simple & Fast — Clean API with sync and async support
  • 🎥 Video Intelligence — Extract transcripts from YouTube videos
  • 📄 Smart Parsing — Automatic content extraction from any webpage
  • 🔄 Batch Processing — Scrape multiple URLs efficiently
  • 🔗 Link Discovery — Find related links on any page
  • 💪 Type Safe — Full type hints support
  • 🛡️ Error Handling — Automatic retries and custom exceptions

API Reference

RunCrawl(api_key, base_url=...)

base_url defaults to https://runcrawl.runsystem.work. Override it with the argument or the RUNCRAWL_BASE_URL environment variable.

Main client class.

Methods:

scrape(url, chunk=False, chunk_size=1000, parser=None)

Scrape a single URL.

Parameters:

  • url (str): URL to scrape
  • chunk (bool): Split content into chunks
  • chunk_size (int): Size of each chunk
  • parser (str): Specific parser to use

Returns: ScrapeResult

batch(urls, chunk=False, chunk_size=1000)

Scrape multiple URLs in one request.

Parameters:

  • urls (list[str]): List of URLs to scrape
  • chunk (bool): Split content into chunks
  • chunk_size (int): Size of each chunk

Returns: list[ScrapeResult]

discover(url, limit=20)

Discover links from a page.

Parameters:

  • url (str): URL to discover links from
  • limit (int): Maximum number of links

Returns: list[dict] — each item is {"url": ..., "title": ...}

health()

Check API health status.

Returns: dict

parsers()

List available parsers.

Returns: list[ParserInfo]

usage()

Get your API usage statistics.

Returns: UsageStats

Examples

Chunked Content

result = ck.scrape(
    "https://en.wikipedia.org/wiki/Python",
    chunk=True,
    chunk_size=500
)

for i, chunk in enumerate(result.chunks):
    print(f"Chunk {i+1}: {chunk[:50]}...")

Error Handling

from runcrawl import RunCrawl, RateLimitError, AuthenticationError

try:
    result = ck.scrape("https://example.com")
except RateLimitError as e:
    print(f"Rate limited! Retry after {e.retry_after}s")
except AuthenticationError:
    print("Invalid API key")

Context Manager

with RunCrawl(api_key="ck_free_xxx") as ck:
    result = ck.scrape("https://example.com")
    # Client automatically closes

Get an API Key

  1. Visit runcrawl.runsystem.work
  2. Sign up for a free account
  3. Get your API key from the dashboard

Free tier includes:

  • 100 requests/day
  • Web scraping
  • Video transcripts
  • All parsers

License

MIT License - see LICENSE file for details.

Metadata

Release files for runcrawl 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 runcrawl 0.1.1
File Size Uploaded Provenance Actions
runcrawl-0.1.1.tar.gz 11.5 kB Without provenance Details for runcrawl-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 22.3 kB

Release files / runcrawl-0.1.1.tar.gz

Download URL runcrawl-0.1.1.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eccf2a35255159eeec26fa6a5e5d498a7f182f53b83864185f6f0e050fb634ee
BLAKE2b-256 checksum
How to use checksums
2e762c1a2116834c77d3950753827dc97ae914e92afbaefbcd64d4078ef960ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL runcrawl-0.1.1-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20d069d3a34c429a054440aca6a6f79163e0bcaa90b5fb5a9b93e13210c7e06c
BLAKE2b-256 checksum
How to use checksums
a22dc1aefd87851f982058649c1a83a3dc6a7dac831e7e56a863efef52ff24b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for runcrawl 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