How-to
How to fit a web page into an LLM context window.
Ask for the page as Markdown with a token budget. The API returns parts that each fit it, so you never truncate a page blindly.
curl https://webscraper.apexflowlabs.com/v1/scrape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://docs.python.org/3/","render":"never","max_tokens":2000}'
The response holds the first part in result.markdown. Follow pagination.next_page to request the next part until there is none. Headings stay headings, tables stay tables and code keeps its language, so each part is usable on its own.
Retrieval chunks
For RAG, add "chunks": 800 to get chunks of about that many tokens. Each result includes a receipt describing how the page was read, so you can show a source.
What it costs
Plain page 1 credit, rendered page 3, failed pages refunded, no automatic overage. See pricing and the docs.