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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb08cf2a990970d30740240744a793ddfe0a06ec9380b7b3898dcbadc1f8a77a
|
|
| MD5 |
8ca0324809dace84510ac21626d46236
|
|
| BLAKE2b-256 |
eeb66c95ee747dabb3e36ee9715a8d92c707e79b7ca757dcf37fd229a6e6991f
|
File details
Details for the file nstdata_ai_crawl-0.1.1-py3-none-any.whl.
File metadata
- Download URL: nstdata_ai_crawl-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
122b0a260149bd3fd80f304032a1ee97b4a19a28c1082c4147ce08518685c9af
|
|
| MD5 |
0e84af7850f2f7f71c17a9cbef5b60e5
|
|
| BLAKE2b-256 |
a7c01ff22ea1aa7c15af48697bfc75d4c76810cdcb23aef1ee0b3d4016550043
|