{"name":"OKF Index","description":"The search index of Open Knowledge Format bundles: markdown trees an agent reads whole, found on public GitHub and submitted by live domains. Free, no account. Client: agent and human.","build":"1a422e37","base_url":"https://www.okfindex.com","docs":{"llms":"https://www.okfindex.com/llms.txt","llms_full":"https://www.okfindex.com/llms-full.txt","openapi":"https://www.okfindex.com/openapi.json","mcp":"https://www.okfindex.com/mcp","human_ui":"https://www.okfindex.com/"},"conventions":{"format":"JSON in `/api/*`; `text/markdown` under `/okf/`.","cors":"`Access-Control-Allow-Origin: *` on every agent route.","pagination":"`GET /api/bundles` pages with `limit`/`offset` and returns `next` (absolute URL) until `null`.","parity":"Changed the UI/API → apidocs + MCP in the same PR."},"auth":{"none":"Public.","token":"Operator token `METRICS_TOKEN` as `Authorization: Bearer` (metrics)."},"quota":{"free":[{"o_que":"search, bundle cards, statistics, llms.txt, OpenAPI and MCP","limite":"no quota","janela":null},{"o_que":"submission (`POST /api/ping`)","limite":"100 URLs per request, 200 per host per UTC day","janela":null}],"paid":[],"how_to_pay":"Nothing to pay: the index is free and needs no account.","live":"https://www.okfindex.com/api/"},"mcp":{"endpoint":"https://www.okfindex.com/mcp","transport":"streamable-http","tools":5},"mcp_tools":["api_index","search_bundles","get_bundle","index_stats","submit_bundles"],"endpoints":[{"method":"GET","path":"/agent.json","auth":"none","summary":"Agent card: identity, operator, documentation, the MCP endpoint and the tools it serves. Same document as `/.well-known/agent-card.json`.","grupo":"Discovery","retorno":{"_texto":"`application/json`: `name`, `provider`, `protocol` (`mcp`), `interfaces[]` and `skills[]`."},"exemplo":"curl -s $ORIGIN/agent.json","returns":"`application/json`: `name`, `provider`, `protocol` (`mcp`), `interfaces[]` and `skills[]`.","url":"https://www.okfindex.com/agent.json","auth_detail":"Public."},{"method":"GET","path":"/okf/:arquivo","auth":"none","summary":"OKF bundle (Open Knowledge Format v0.1): markdown with frontmatter so an agent reads the whole product without parsing HTML.","grupo":"Discovery","params":{"arquivo":{"desc":"`index.md`, `sobre.md`, `api.md` or `faq.md`.","exemplo":"index.md"}},"retorno":{"_texto":"`text/markdown`. Start at `/okf/index.md`, which lists the bundle."},"erros":{"404":"File outside the bundle."},"exemplo":"curl -s $ORIGIN/okf/index.md","returns":"`text/markdown`. Start at `/okf/index.md`, which lists the bundle.","url":"https://www.okfindex.com/okf/:arquivo","auth_detail":"Public."},{"method":"GET","path":"/.well-known/:arquivo","auth":"none","summary":"Machine discovery before the home page: `api-catalog` (RFC 9727, a linkset with the API and the MCP), `security.txt` (RFC 9116), `x402` (payment manifest: network, wallet and the routes that charge) and `mcp-registry-auth` (the official MCP registry key).","grupo":"Discovery","params":{"arquivo":{"desc":"`api-catalog`, `security.txt`, `x402`, `mcp-registry-auth` or `apis.json`.","exemplo":"api-catalog"}},"retorno":{"_texto":"`application/linkset+json` for the api-catalog; `application/json` for x402 and apis.json; `text/plain` for the other two."},"erros":{"404":"Name outside the five published."},"exemplo":"curl -s $ORIGIN/.well-known/api-catalog","returns":"`application/linkset+json` for the api-catalog; `application/json` for x402 and apis.json; `text/plain` for the other two.","url":"https://www.okfindex.com/.well-known/:arquivo","auth_detail":"Public."},{"method":"GET","path":"/apis.json","auth":"none","summary":"APIs.json (apisjson.org, 0.19): the index APIs.io harvests — the API, the MCP, OpenAPI, guide and OKF bundle in one file. Also at `/.well-known/apis.json`.","grupo":"Discovery","retorno":{"_texto":"`application/json` in the APIs.json 0.19 format: `apis[]` with `baseURL`, `humanURL` and `properties[]`."},"exemplo":"curl -s $ORIGIN/apis.json","returns":"`application/json` in the APIs.json 0.19 format: `apis[]` with `baseURL`, `humanURL` and `properties[]`.","url":"https://www.okfindex.com/apis.json","auth_detail":"Public."},{"method":"GET","path":"/api/","auth":"none","summary":"Índice auto-descrito: cada rota, o que cobra e como plugar o MCP.","grupo":"Descoberta","retorno":{"name":{"tipo":"string","desc":"Nome do produto."},"description":{"tipo":"string","desc":"O que o produto faz."},"build":{"tipo":"string","desc":"Commit publicado."},"base_url":{"tipo":"string","desc":"Origem em que esta API está servindo."},"docs":{"tipo":"object","desc":"Links para llms.txt, OpenAPI, MCP e a UI."},"endpoints":{"tipo":"object[]","desc":"Catálogo de endpoints."},"mcp_tools":{"tipo":"string[]","desc":"Tools do MCP."}},"returns":"{ name, description, build, base_url, docs, endpoints, mcp_tools }","url":"https://www.okfindex.com/api/","auth_detail":"Public."},{"method":"GET","path":"/api/health","auth":"none","grupo":"Descoberta","summary":"Liveness and the build being served.","retorno":"Saude","returns":"{ ok, app, build }","url":"https://www.okfindex.com/api/health","auth_detail":"Public."},{"method":"POST","path":"/mcp","auth":"none","summary":"MCP Streamable HTTP — as tools deste catálogo, despachadas neste mesmo Worker.","grupo":"Descoberta","retorno":{"_texto":"JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`)."},"exemplo":"curl -s -XPOST $ORIGIN/mcp -H 'content-type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}'","returns":"JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`).","url":"https://www.okfindex.com/mcp","auth_detail":"Public."},{"method":"GET","path":"/api/bundles","auth":"none","colecao":{"porPagina":24,"teto":1000,"anda":"next_offset"},"summary":"Paginated search of the index: every live OKF bundle, from GitHub and from live domains.","grupo":"Index","desc":"Only `live` bundles. Free text matches the name, the tagline, the description and the origin identifier (`owner/repo:path` or the bundle URL). No `total` on purpose: `GET /api/stats` has it.","query":{"q":{"tipo":"string","desc":"Free text over name, tagline, description and origin identifier.","exemplo":"agent"},"origin":{"tipo":"string","desc":"Provenance: found by the GitHub sweep, or submitted by a domain.","valores":["github","domain"]},"repo":{"tipo":"string","desc":"Only bundles of one repository, `owner/repo` (case-insensitive).","exemplo":"fastendpoints/fastendpoints"},"sort":{"tipo":"string","desc":"Result order: arrival, last content change, name or repository stars.","valores":["recent","updated","name","stars"],"padrao":"recent"},"limit":{"tipo":"int","desc":"Bundles per page, at most 100.","padrao":24},"offset":{"tipo":"int","desc":"How many bundles to skip. Use `next_offset` from the previous response; the list ends at 1000.","padrao":0}},"retorno":"PaginaDeBundles","exemplo":"curl -s '$ORIGIN/api/bundles?q=agent&sort=stars&limit=5'","returns":"{ items[{id,name,tagline,description,okf_version,concepts,type,index_url,page_url,source,repo,indexed_at,updated_at,api}], limit, offset, next_offset, next }","url":"https://www.okfindex.com/api/bundles","auth_detail":"Public."},{"method":"GET","path":"/api/bundles/:id","auth":"none","summary":"One bundle's card, by id.","grupo":"Index","desc":"`live` and `low` (example or fixture bundles kept out of the search) both answer here.","params":{"id":{"desc":"Bundle id, the `id` of every item in the list.","exemplo":"okf-fastendpoints"}},"retorno":"Bundle","erros":{"404":"No bundle with that id, or it is not public."},"exemplo":"curl -s $ORIGIN/api/bundles/<id>","returns":"{ id, name, tagline, description, okf_version, concepts, type, index_url, page_url, source{origin,via,url,host,repo,dir,path}, repo{stars,forks,pushed_at,state,language,license}, indexed_at, updated_at, api }","url":"https://www.okfindex.com/api/bundles/:id","auth_detail":"Public."},{"method":"GET","path":"/api/stats","auth":"none","summary":"Size of the index by provenance, and when it last changed.","grupo":"Index","retorno":"IndexStats","exemplo":"curl -s $ORIGIN/api/stats","returns":"{ total, by_origin, last_update }","url":"https://www.okfindex.com/api/stats","auth_detail":"Public."},{"method":"POST","path":"/api/ping","auth":"none","statusOk":202,"summary":"Submits OKF bundles from a domain you control, using the IndexNow protocol.","grupo":"Publish","desc":"No account, no payment: ownership is proved by a key file on the host, exactly as IndexNow does it. Host `https://<host>/<key>.txt` containing the key (or point `keyLocation` at another path on the SAME host), then send the bundle URLs. We answer **202**: the key has not been checked yet. Verification and reading happen on our collector, never at the edge — so nothing is published, and no URL of yours is fetched, before the key matches. Re-sending a URL is how you say the bundle changed; it goes back in line to be re-read. At most 100 URLs per request and 200 per host per UTC day. Bundles in public GitHub repositories need no ping: the sweep finds them.","corpo":{"urlList":{"tipo":"string[]","obrigatorio":true,"desc":"The bundle roots (`index.md` files): https, on `host`, ending in .md — any path, since the spec fixes none."},"host":{"tipo":"string","obrigatorio":true,"desc":"The domain that serves the bundles and the key file."},"key":{"tipo":"string","obrigatorio":true,"desc":"The IndexNow key: 8 to 128 characters of [a-zA-Z0-9-]."},"keyLocation":{"tipo":"string","desc":"Alternative location of the key file, on the SAME host. Default: `https://<host>/<key>.txt`."}},"body":{"urlList":["https://kb.example.org/knowledge/index.md"],"host":"kb.example.org","key":"okf-2026-09-08-k3y"},"retorno":{"ok":{"tipo":"bool","desc":"The submission was queued."},"estado":{"tipo":"string","desc":"Always `pendente`: the key has not been checked yet."},"host":{"tipo":"string","desc":"The host as normalized (lowercase)."},"recebidos":{"tipo":"int","desc":"How many distinct URLs entered the queue."},"chave_em":{"tipo":"string","desc":"Where we will look for the key file. Check it if you are unsure."},"mensagem":{"tipo":"string","desc":"What happens next, in one sentence."},"api_index":{"tipo":"string","desc":"Absolute URL of this API's index."}},"erros":{"400":"Body is not JSON, `host` is not a domain, `key` is out of shape, or `urlList` is missing/empty/over 100.","422":"Some URL is not https, does not end in .md or lives on another host; `keyLocation` off-host too.","429":"The host already submitted 200 bundles this UTC day."},"exemplo":"curl -s -XPOST $ORIGIN/api/ping -H 'content-type: application/json' -d '{\"urlList\":[\"https://kb.example.org/knowledge/index.md\"],\"host\":\"kb.example.org\",\"key\":\"okf-2026-09-08-k3y\"}'","returns":"{ ok, estado, host, recebidos, chave_em, mensagem, api_index }","url":"https://www.okfindex.com/api/ping","auth_detail":"Public."},{"method":"POST","path":"/api/visit","auth":"none","summary":"One ping per page view from the interface; it feeds the index's own visit counter.","grupo":"Operations","desc":"Counted under the index's metric (`okf_visit`), apart from the Meta Agent Tools counter that shares the database. Test traffic is left out: `X-MM-Smoke`, User-Agent `mm-smoke` or `smoke: true`.","corpo":{"smoke":{"tipo":"bool","desc":"`true` flags a test call, which is acknowledged but not counted."},"p":{"tipo":"string","desc":"Path of the page that was opened (informative)."}},"body":{"p":"/","smoke":false},"retorno":{"counted":{"tipo":"bool","desc":"`false` for test traffic, `true` when the day's counter moved."},"ok":{"tipo":"bool","desc":"Always `true`; the route never refuses a ping."}},"exemplo":"curl -s -XPOST $ORIGIN/api/visit -H 'content-type: application/json' -d '{\"p\":\"/\",\"smoke\":false}'","returns":"{ counted, ok }","url":"https://www.okfindex.com/api/visit","auth_detail":"Public."},{"method":"GET","path":"/api/metrics","auth":"token","summary":"Usage of the index for the house dashboard: bundles indexed, visits and MCP calls per day.","grupo":"Operations","desc":"Anonymous calls get the usage block only. Send `METRICS_TOKEN` as Bearer and the finance block is added — all zeros, because nothing here is charged.","headers":{"Authorization":{"tipo":"string","desc":"Optional `Bearer <METRICS_TOKEN>`; unlocks the zeroed finance block.","obrigatorio":false}},"retorno":{"_texto":"`{app, today, today_visits, days[], usage: {okf, mcp}, accounts, payments?}`."},"erros":{"401":"Token present but wrong.","503":"Token present, but the Worker has no `METRICS_TOKEN` to compare."},"exemplo":"curl -s \"$ORIGIN/api/metrics\" -H \"authorization: Bearer $METRICS_TOKEN\"","returns":"`{app, today, today_visits, days[], usage: {okf, mcp}, accounts, payments?}`.","url":"https://www.okfindex.com/api/metrics","auth_detail":"Operator token `METRICS_TOKEN` as `Authorization: Bearer` (metrics)."},{"method":"POST","path":"/api/erro-cliente","auth":"none","summary":"Browser error report, sent by the interface itself. Agents need not call it.","grupo":"Operations","desc":"The interface reports on its own JS errors, unhandled rejections, scripts/CSS that failed to load and CSP blocks — once per session — and the app reports handled failures through `window.mmErro.relata`. The server validates the envelope, redacts credentials, e-mails and phone numbers, merges repeats of the same failure per minute and records an operational event; nothing is written to a database. It keeps no IP, cookie, query string or full User-Agent. Always answers 204, even for an invalid report.","corpo":{"code":{"tipo":"string","desc":"Failure code, `UI-` + letters/digits (`UI-JS-001` global error, `UI-PROMESSA-001`, `UI-RECURSO-001`, `UI-CSP-001`, `UI-APP-001` app report).","obrigatorio":true},"phase":{"tipo":"string","desc":"Where it broke, lowercase: `global`, `promessa`, `script`, `load_list`…","obrigatorio":true},"path":{"tipo":"string","desc":"Path of the open page, without query."},"message":{"tipo":"string","desc":"Error message, up to 2000 characters."},"stack":{"tipo":"string","desc":"Stack trace, up to 12000 characters."},"source":{"tipo":"string","desc":"Originating script; only its path is kept."},"line":{"tipo":"int","desc":"Line in the originating script."},"column":{"tipo":"int","desc":"Column in the originating script."},"visivel":{"tipo":"bool","desc":"Whether the tab was visible when it broke."}},"body":{"code":"UI-APP-001","phase":"carregar_lista","path":"/","message":"lista 500"},"retorno":{"_texto":"204 with no body, always — an invalid, repeated or over-cap report also gets 204."},"exemplo":"curl -s -XPOST $ORIGIN/api/erro-cliente -H 'content-type: application/json' -d '{\"code\":\"UI-APP-001\",\"phase\":\"carregar_lista\",\"path\":\"/\",\"message\":\"lista 500\"}'","returns":"204 with no body, always — an invalid, repeated or over-cap report also gets 204.","url":"https://www.okfindex.com/api/erro-cliente","auth_detail":"Public."}],"quickstart":["curl -s https://www.okfindex.com/api/stats","curl -s 'https://www.okfindex.com/api/bundles?q=agent&limit=5'","curl -s https://www.okfindex.com/okf/protocolo.md"]}