Skip to content

Official Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it.

843 B
Raw Blame
"""
NSTProxy Integration Examples for crawl4ai
------------------------------------------

NSTProxy is a premium residential proxy provider.
👉 Purchase Proxies: https://nstproxy.com
💰 Use coupon code "crawl4ai" for 10% off your plan.

"""
import asyncio
from crawl4ai import AsyncWebCrawler, BrowserConfig


async def main():
    """
    Example: Use NSTProxy with manual username/password authentication.
    """

    browser_config = BrowserConfig(proxy_config={
        "server": "http://gate.nstproxy.io:24125",
        "username": "your_username",
        "password": "your_password",
    })

    async with AsyncWebCrawler(config=browser_config) as crawler:
        result = await crawler.arun(url="https://example.com")
        print("[Auth Proxy] Status:", result.status_code)


if __name__ == "__main__":
    asyncio.run(main())