Agent Fetch Docs

Web content fetching designed for AI agents. Give us a URL, get clean structured content.

🚀 Getting Started

1. Get an API Key

curl -X POST https://fetch.bedrocklabs.dev/api/v1/billing/register \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent"}'

→ { "api_key": "af_abc123...", "credits": 100 }

2. Fetch a URL

curl -X POST https://fetch.bedrocklabs.dev/api/v1/fetch \
  -H "Authorization: Bearer af_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "mode": "markdown"}'

→ { "title": "...", "content": "...", "metadata": {...} }

📡 Endpoints

POST /api/v1/fetch

Fetch a URL and return clean content.

FieldTypeDefaultDescription
urlstringRequired. The URL to fetch.
modestringmarkdownOne of: markdown, text, structured, raw
maxCharsnumber50000Max characters in response.
fullPagebooleanfalseWait for full page load (JS-heavy sites).
Tip for agents: Use mode: "structured" when you need headings, links, and tables. Use mode: "markdown" for article content. Use mode: "raw" to get the full HTML.

Response Fields

FieldDescription
successAlways true on success
urlThe final URL (after redirects)
titlePage title
contentExtracted content (depends on mode)
excerptShort description / first paragraph
metadataOG tags, description, author, publish date
structuredJSON-LD structured data (if found)
charCountCharacter count of content
truncatedWhether content was truncated to maxChars
tookMsResponse time in milliseconds
credits_remainingYour remaining API credits

POST /api/v1/screenshot

Take a screenshot of a URL. Returns PNG image.

curl -X POST https://fetch.bedrocklabs.dev/api/v1/screenshot \
  -H "Authorization: Bearer af_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}' \
  -o screenshot.png

GET /api/v1/usage

Check your API key usage and remaining credits.

curl -H "Authorization: Bearer af_your_key" \
  https://fetch.bedrocklabs.dev/api/v1/usage

POST /api/v1/billing/register

Register a new API key (no auth needed).

GET /api/v1/health

Service health check. No auth needed.

💰 Pricing

TierCreditsPriceBest for
Free100/mo$0Testing & hobby projects
Pro1,000$5Personal agents & prototyping
Scale10,000$20Production agents
EnterpriseCustomCustomHigh-volume / dedicated

1 credit = 1 API request. Credits never expire.

Stripe checkout coming soon — in the meantime, email us.

🤖 For AI Agents

Agent Fetch is designed to be called as a tool by AI agents. Here's how to add it:

OpenAI / Claude / Custom

Tool: fetch_url
Description: Fetch web content from a URL
Parameters:
  - url (string, required): The URL to fetch
  - mode (string, optional): "markdown" | "text" | "structured" | "raw"
  - maxChars (number, optional): Max characters (default 50000)

Implementation:
  POST https://fetch.bedrocklabs.dev/api/v1/fetch
  Headers: Authorization: Bearer YOUR_API_KEY
  Body: { "url": "...", "mode": "markdown" }
OpenClaw / custom agents: When registering this as a tool, set rate limit to ~30 req/min and handle 402 (insufficient credits) by prompting the user to top up.