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.2.tar.gz (14.5 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.2-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file webcrawlerapi-2.1.2.tar.gz.

File metadata

  • Download URL: webcrawlerapi-2.1.2.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for webcrawlerapi-2.1.2.tar.gz
Algorithm Hash digest
SHA256 b05af943a179ae5f68f778ebbb8cafe1736677be567e0ba952742dd81c7a5860
MD5 2ed23dcff3417561b3948507bd55f774
BLAKE2b-256 e93baf1c7850e750ce988c7903239c8074c06a7564c9ee78b01f5e1e39f45d30

See more details on using hashes here.

File details

Details for the file webcrawlerapi-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: webcrawlerapi-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for webcrawlerapi-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c415e845175cce1ce8d477cd637230b94f7cda5682b85985269df83cea9ca067
MD5 2697e5868e95357d623fbd398435609b
BLAKE2b-256 0aa8f847ee14248229ce778bd73f65ae9ebd56d88c1404bb9548ebbef30c58c5

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