Skip to main content

nstdata crawl SDK (Python)

中文版

Python SDK for nstdata crawl, an advanced web scraping and crawling service.

Installation

pip install nstdata-ai-crawl

Features

  • Basic Scraping: Get HTML and Markdown synchronously.
  • Screenshots & PDFs: Take full-page screenshots and export pages as PDFs.
  • Browser Actions: Orchestrate browser actions like wait for elements, fill forms, click buttons, scroll, and execute JS.
  • Custom Configuration: Bring your own cookies, headers, and simulate mobile devices.
  • Content Filtering: Automatically extract high-quality main content, filter out ads and navigational elements.
  • Proxy Location: Specify proxy exit country with proxy.country.
  • Synchronous or Asynchronous Scraping: Use the same scrape API; asynchronous submission returns a task ID for polling.
  • Batch Crawling: Traverse entire sites with depth and page limits.

Quick Start

See main.py for a complete list of usage examples.

import os
from nstdata_ai_crawl import NstDataClient, ScrapeRequestDto, Format

# Initialize the client with your API token
TOKEN = os.getenv("NSTDATA_API_TOKEN", "YOUR_API_TOKEN")

def main():
    with NstDataClient(TOKEN) as client:
        # Submit a basic scraping task
        res = client.submit_scrape_task_sync(ScrapeRequestDto(
            url="https://example.com/",
            formats=[Format.MARKDOWN],
            timeout=60000,
        ))
        
        # Output the resulting markdown
        print(res.data.get_markdown())

if __name__ == "__main__":
    main()

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nstdata_ai_crawl-0.1.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

nstdata_ai_crawl-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file nstdata_ai_crawl-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for nstdata_ai_crawl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eb08cf2a990970d30740240744a793ddfe0a06ec9380b7b3898dcbadc1f8a77a
MD5 8ca0324809dace84510ac21626d46236
BLAKE2b-256 eeb66c95ee747dabb3e36ee9715a8d92c707e79b7ca757dcf37fd229a6e6991f

See more details on using hashes here.

File details

Details for the file nstdata_ai_crawl-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nstdata_ai_crawl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 122b0a260149bd3fd80f304032a1ee97b4a19a28c1082c4147ce08518685c9af
MD5 0e84af7850f2f7f71c17a9cbef5b60e5
BLAKE2b-256 a7c01ff22ea1aa7c15af48697bfc75d4c76810cdcb23aef1ee0b3d4016550043

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

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