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 crawlkit import CrawlKit

# Initialize client
ck = CrawlKit(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 crawlkit import AsyncCrawlKit

async def main():
    async with AsyncCrawlKit(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

CrawlKit(api_key, base_url=...)

base_url defaults to https://runcrawl.runsystem.work. Override it with the argument or the CRAWLKIT_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 crawlkit import CrawlKit, 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 CrawlKit(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.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 runcrawl 0.1.0
File Size Uploaded Provenance Actions
runcrawl-0.1.0.tar.gz 11.5 kB Without provenance Details for runcrawl-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 22.3 kB

Release files / runcrawl-0.1.0.tar.gz

Download URL runcrawl-0.1.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a2abdd86a8e8375ec54c883c278b92133f85fb5b32197055da4c979d6ad35b4b
BLAKE2b-256 checksum
How to use checksums
33c0095eb7f968299ffaf384a3b22e81a511a9874f981de41fbdecf60fc7d080
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.0-py3-none-any.whl

Download URL runcrawl-0.1.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
891cd01a41d455cbb7bcf67965e431a29264ef96406a0157f33a3283e8e859f7
BLAKE2b-256 checksum
How to use checksums
afc1c10f69adb69a883f1978e22e2dfc4885784e3fa901fe67642beee826dcd7
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.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.

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