Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Agent Surface documentation Md API
version: 1.0.0
description: 'Public read-only documentation retrieval, without credentials. Search to discover pages, then fetch the canonical Markdown. Compatibility: these unversioned URLs and existing operationIds are stable within API version 1. Additive fields may appear; clients should ignore unknown fields. Breaking changes require a new major version and a documented migration period before retiring an existing route. There is no application quota or rate-limit policy; query and response bounds below apply. Remote MCP uses POST /mcp with protocol 2026-07-28.'
servers:
- url: https://agentsurface.dev
security: []
tags:
- name: Md
paths:
/api/md/{slug}:
get:
operationId: getPage
summary: Read a documentation page as Markdown
description: Use after searchDocs to read one complete authoritative page. The processed Markdown includes canonical URL, description and freshness metadata where available. Use the result slug verbatim, or index for the documentation home. Missing slugs return a 404 Problem Details document with recovery hints; they do not return an HTML shell. For offline indexing only, the opt-in /llms-full.txt export is roughly 1.9 MB or 470,000 estimated tokens (characters / 4); prefer single pages for normal reading.
parameters:
- name: slug
in: path
required: true
description: Slash-separated documentation path from a search result. Use index for the documentation home.
example: discovery/llms-txt
schema:
type: string
minLength: 1
responses:
'200':
description: Complete processed Markdown with source metadata.
content:
text/markdown:
schema:
type: string
'404':
description: Problem Details with recovery suggestions and a trace_id. is_retriable means safe to retry the unchanged request.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
tags:
- Md
components:
schemas:
Problem:
type: object
required:
- type
- title
- status
- detail
- instance
- is_retriable
- suggestions
- trace_id
- code
- message
- hint
properties:
type:
type: string
example: about:blank
title:
type: string
status:
type: integer
detail:
type: string
instance:
type: string
description: Request path and query, identifying the failed request.
example: /api/docs/search?query=x
is_retriable:
type: boolean
description: True only when it is safe to retry the unchanged request. Validation and missing-page errors are false; a temporary read-only search failure is true.
suggestions:
type: array
items:
type: string
trace_id:
type: string
description: Opaque request identifier, also returned in X-Request-Id.
code:
type: string
message:
type: string
hint:
type: string