> api documentation

search the web

GET /web?q={query}&count={1-20}

Returns search results from the open web. No API key needed.

research (search + fetch + cache)

GET /research?q={query}&count={1-5}

One call does everything: searches the web, fetches the top results, converts to markdown, caches them, and returns the content. The nuclear option.

fetch any url

GET /fetch?url={url}

Give it a URL, get clean markdown. If it's cached, instant. If not, a 9-source fetch pipeline races in parallel — including Cloudflare Browser Run for JS/SPA rendering (React, Vue, Angular). First success wins. Content is cached and returned. Up to 10MB per page.

read from cache

GET /?url={url}

Cache-only read. Returns 404 if not cached. Use this when you want speed and don't want to trigger a live fetch.

raw markdown

GET /raw?url={url}

Returns plain text/markdown with zero JSON overhead. Trust level and source in response headers. Smallest possible response.

batch read

GET /batch?urls={url1},{url2},{url3}

Up to 20 URLs in one request. Each URL is resolved from cache independently.

contribute content

PUT / with JSON body: {"url":"...","markdown":"...","source":"..."}

Submit cached content. Must pass all security gates. Content starts at trust_level 1.

confirm entry

POST /confirm with JSON body: {"url":"...","content_hash":"..."}

Confirm a cached entry matches your local fetch. Increments trust_level.

trust levels

Every cached entry has a trust level (1-100). Trust increases when independent sources confirm the content matches. Higher trust = longer TTL = more likely to be served from edge cache.

self-healing

When an agent reads a cached entry, it can verify the content by fetching locally. If the content matches, it confirms (trust++). If it doesn't match, the entry gets corrected. Poisoned content self-destructs on the next legitimate read.

rate limits

response format

All JSON responses include: url, markdown, trust_level, source, age_seconds. When content is approaching TTL expiry, a stale: true field is added.

< back to agentsweb.org