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

Built distribution (wheel)

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

Total release size: 22.4 kB

Release files / runcrawl-0.1.2.tar.gz

Download URL runcrawl-0.1.2.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f22162c36e9448df9c256d3b28fd9b58da81e943e5fe34fb1c1a2429b45f7d8e
BLAKE2b-256 checksum
How to use checksums
40848dc1fcf67143e771cbf8bce489de87c09823814cf1ed24212d7b6b783f49
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.2-py3-none-any.whl

Download URL runcrawl-0.1.2-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07f914d4fa99d163d512871d508c7a63618d92faccebd84c902f280149abf782
BLAKE2b-256 checksum
How to use checksums
73011c2af5317fb74b0defeb8a4b56f63c59d86f2f313a13c6c56b20fc3bed18
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.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