Skip to main content

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

Requirements

  • Python 3.6+
  • requests >= 2.25.0

License

MIT License

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webcrawlerapi-2.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

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

Hashes for webcrawlerapi-2.1.0.tar.gz
Algorithm Hash digest
SHA256 dee5b643ca05824f37529abe1eadfc3656097fa48de340d18fb90344faeb268a
MD5 0ac40c9eb89de4a900f3cec832843f90
BLAKE2b-256 074a0df460f11276a510303db37cad72992cc3c2528e700d1e302fc384e75ef9

See more details on using hashes here.

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

Hashes for webcrawlerapi-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a8603eb188c8bee34cf1271db45747e73b3f84a5386db452315773c21f9e4da
MD5 2bad3586ac50aacde7684a374dba58f0
BLAKE2b-256 e780539da12dc0aa5556d3fb3f51a1d61d1febd5250621163b47a3b59e05160e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page