AI and RAG preparation
Prepare focused page content before it enters a prompt, search index, or retrieval pipeline.
Content extraction endpoint
Turn a public webpage into content your application can read and store. The endpoint removes much of the page chrome that makes raw HTML hard to use, while keeping fetch evidence beside the result.

Endpoint
POST /v1/extractSet your key once in a server-side environment variable, then send a JSON request.
curl --request POST \
--url "https://api.tooltrace.io/v1/extract" \
--header "X-ToolTrace-Key: ${TOOLTRACE_KEY}" \
--header "Content-Type: application/json" \
--data '{
"url": "https://example.com",
"render": "auto",
"mode": "structured",
"include": [
"markdown"
]
}'Response scope
The response is structured for software, with source evidence kept beside the extracted or inspected data.
Practical uses
Prepare focused page content before it enters a prompt, search index, or retrieval pipeline.
Save readable source material with the final URL, status, and extraction evidence attached.
Compare live page content with expected releases or transform approved sources into another format.
Implementation guidance
Static retrieval is faster and works for pages that include useful content in the initial HTML. Browser rendering is for pages that depend on JavaScript before their main content appears.
Use automatic rendering when targets vary. If you already know a site is server rendered, choose static retrieval to keep the request simpler and faster.
Store the requested URL, final URL, status, render method, warnings, and request ID with extracted content. These fields help an agent or reviewer judge whether the result is complete and current.
Send your key through the X-ToolTrace-Key header from server-side code. Read credit and rate-limit headers after every request. Validation, blocked destination, authentication, plan, and upstream fetch errors use structured responses that applications should handle by code rather than message text.
Use a dedicated key for each environment. Review current fields in the interactive API reference and compare usage limits on the pricing page.