SDKs and Code Examples
AI Agent
Copy-paste prompt for integrating WebCrawlerAPI with your coding agent.
Integrate with your Coding Agent
Just copy paste this into your Coding Agent:
You are integrating WebCrawlerAPI into an existing project.
Before writing code, fetch and follow the full guide at:
https://webcrawlerapi.com/docs/agent-integration
Your job:
1. Inspect the codebase and identify the project's language, framework, and HTTP/client patterns.
2. Use an official WebCrawlerAPI SDK if one matches the project language; otherwise use the raw HTTP API.
3. Ask the user for a WebCrawlerAPI API key if one is not already configured.
4. Store the key in environment variables only. Never hardcode secrets.
5. Implement the smallest clean integration that fits the existing architecture and conventions.
Integration rules:
- For a single page, prefer POST https://api.webcrawlerapi.com/v2/scrape
- For multi-page website crawling, prefer POST https://api.webcrawlerapi.com/v1/crawl
- Default to output_formats: ["markdown"] unless the user needs something else
- Use main_content_only when the goal is clean LLM-ready content
- Handle errors, timeouts, and async polling correctly
- Reuse existing logging, config, and error-handling patterns in the repo
- Add concise usage notes or examples if the codebase already includes integration docs/tests
Expected outcome:
- Working WebCrawlerAPI integration
- Environment variable wiring
- Minimal example usage in the project's existing style
- Clear notes on what was added and how to use it