Python SDK for WebCrawler API
Project description
WebCrawler API Python SDK
A Python SDK for interacting with the WebCrawlerAPI.
Get your API key at dash.webcrawlerapi.com/access.
Installation
pip install webcrawlerapi
Crawling
from webcrawlerapi import WebCrawlerAPI
client = WebCrawlerAPI(api_key="your_api_key")
job = client.crawl(
url="https://example.com",
output_formats=["markdown"],
items_limit=10,
)
for item in job.job_items:
if item.status == "done":
print(item.original_url)
print(item.content)
Scraping
from webcrawlerapi import WebCrawlerAPI
client = WebCrawlerAPI(api_key="your_api_key")
result = client.scrape(
url="https://example.com",
output_formats=["markdown"],
)
if result.success:
print(result.markdown)
else:
print(f"Error: {result.error_code} — {result.error_message}")
Documentation
- Crawling — parameters, async, job/item responses, cancellation
- Scraping — parameters, async, response fields
- Advanced — output formats, structured outputs, webhooks, S3 actions
Requirements
- Python 3.6+
- requests >= 2.25.0
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
webcrawlerapi-2.1.0.tar.gz
(13.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webcrawlerapi-2.1.0.tar.gz.
File metadata
- Download URL: webcrawlerapi-2.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dee5b643ca05824f37529abe1eadfc3656097fa48de340d18fb90344faeb268a
|
|
| MD5 |
0ac40c9eb89de4a900f3cec832843f90
|
|
| BLAKE2b-256 |
074a0df460f11276a510303db37cad72992cc3c2528e700d1e302fc384e75ef9
|
File details
Details for the file webcrawlerapi-2.1.0-py3-none-any.whl.
File metadata
- Download URL: webcrawlerapi-2.1.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a8603eb188c8bee34cf1271db45747e73b3f84a5386db452315773c21f9e4da
|
|
| MD5 |
2bad3586ac50aacde7684a374dba58f0
|
|
| BLAKE2b-256 |
e780539da12dc0aa5556d3fb3f51a1d61d1febd5250621163b47a3b59e05160e
|