{"name":"OKF Index","description":"The search index of Open Knowledge Format bundles: markdown trees an agent reads whole, with concept search, bundle details and publisher links. Free, no account. For agents and people.","build":"597d0edd","base_url":"https://staging.okfindex.com","docs":{"llms":"https://staging.okfindex.com/llms.txt","llms_full":"https://staging.okfindex.com/llms-full.txt","openapi":"https://staging.okfindex.com/openapi.json","mcp":"https://staging.okfindex.com/mcp","pricing":"https://staging.okfindex.com/api/pricing","billing":"https://staging.okfindex.com/api/billing","human_ui":"https://staging.okfindex.com/","data_indexes":[{"id":"cep","produto":"https://pontofato.com","caminho":"/enderecos","title":"Postal codes and addresses","description":"Find addresses by location, with coordinates and a 2022 reference date. Not a current postal-code certification.","hierarchy":"State → municipality → locality → street → addresses","url":"https://api.pontofato.com/enderecos/","formats":{"html":"https://api.pontofato.com/enderecos/","json":"https://api.pontofato.com/enderecos/index.json","md":"https://api.pontofato.com/enderecos/index.md","okf":"https://api.pontofato.com/enderecos/index.okf.md"},"llms":"https://api.pontofato.com/enderecos/llms.txt","openapi":"https://api.pontofato.com/enderecos/openapi.json","mcp":"https://api.pontofato.com/enderecos/mcp","okf":"https://api.pontofato.com/enderecos/okf/index.md","access":"public-read-only","pagination":{"max_items":20,"next":"links.proximo"},"updates":"manual"},{"id":"editais","produto":"https://editalmd.com","caminho":"/licitacoes","title":"Public procurement","description":"Find public procurement by location and date. View documents and reading options in EditalMD.","hierarchy":"Procedure → state → year → month → day → municipality → purchases","url":"https://api.editalmd.com/licitacoes/","formats":{"html":"https://api.editalmd.com/licitacoes/","json":"https://api.editalmd.com/licitacoes/index.json","md":"https://api.editalmd.com/licitacoes/index.md","okf":"https://api.editalmd.com/licitacoes/index.okf.md"},"llms":"https://api.editalmd.com/licitacoes/llms.txt","openapi":"https://api.editalmd.com/licitacoes/openapi.json","mcp":"https://api.editalmd.com/licitacoes/mcp","okf":"https://api.editalmd.com/licitacoes/okf/index.md","access":"public-read-only","pagination":{"max_items":20,"next":"links.proximo"},"updates":"manual"}]},"conventions":{"format":"JSON in `/api/*`, except private WebP at `/api/account/avatar`; `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).","credito":"Prepaid credit token in `Authorization: Bearer cred_…` (or the `X-Credito` header). Not an account: it is a bearer of balance.","session":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},"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":[{"o_que":"agent contact (`POST /api/contact`)","price_usd":0.1}],"how_to_pay":"The index is free and needs no account. Only agent contact is paid: **402** with `accepts[]` (x402) and `credito` (prepaid, `POST /api/credito?usd=10`, valid in every product of the house). Pay and retry with `X-PAYMENT`, or send `Authorization: Bearer cred_…`.","live":"https://staging.okfindex.com/api/"},"mcp":{"endpoint":"https://staging.okfindex.com/mcp","transport":"streamable-http","tools":7},"mcp_tools":["api_index","search_bundles","get_bundle","index_stats","submit_bundles","pricing","billing"],"endpoints":[{"method":"GET","path":"/api/auth/bootstrap","auth":"none","grupo":"Account","summary":"Prepare the browser for global sign-in.","desc":"Sets a host-only HttpOnly browser cookie. CSRF is bound to the current session. No CORS.","retorno":{"csrf":{"tipo":"string","desc":"X-CSRF-Token"},"context":{"tipo":"string","desc":"Opaque view context, also in X-MM-Context; not a credential / contexto opaco da vista, não é credencial."}},"erros":{"400":"invalid_request","403":"invalid_origin / invalid_csrf","503":"auth_unavailable: a sessão anterior é preservada / the previous session is preserved"},"returns":"{ csrf, context }","url":"https://staging.okfindex.com/api/auth/bootstrap","auth_detail":"Public."},{"method":"GET","path":"/api/account/profile","auth":"session","grupo":"Account","exemplo":"await fetch(\"$ORIGIN/api/account/profile\", {credentials: \"same-origin\"}).then(r => r.json());","exemploLinguagem":"js","summary":"Read your global profile.","desc":"Reads current preferences from the account. Edit them on your account page; products never own a separate profile.","retorno":{"_texto":"{profile:{name,locale,timeZone,theme,revision}}"},"erros":{"401":"invalid_session","503":"auth_unavailable"},"returns":"{profile:{name,locale,timeZone,theme,revision}}","url":"https://staging.okfindex.com/api/account/profile","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"GET","path":"/api/account/avatar","auth":"session","grupo":"Account","exemplo":"await fetch(\"$ORIGIN/api/account/avatar\", {credentials: \"same-origin\"}).then(r => {if (!r.ok) throw new Error(\"HTTP \" + r.status); return r.blob();});","exemploLinguagem":"js","summary":"Read your global profile photo.","desc":"Private WebP, up to 64 KiB, no cache. Change it on your account. No user ID or object URL accepted.","retorno":{"_texto":"image/webp; Cache-Control: no-store"},"erros":{"401":"invalid_session","404":"not_found: no photo / sem foto","503":"auth_unavailable"},"returns":"image/webp; Cache-Control: no-store","url":"https://staging.okfindex.com/api/account/avatar","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"GET","path":"/api/me","auth":"session","grupo":"Account","exemplo":"await fetch(\"$ORIGIN/api/me\", {credentials: \"same-origin\"}).then(r => r.json());","exemploLinguagem":"js","summary":"Read the current global account in this product.","retorno":{"_texto":"{user:{identityId,sessionId,productId,audience,authTime,methods,mfaState}}"},"erros":{"401":"invalid_session","503":"auth_unavailable"},"returns":"{user:{identityId,sessionId,productId,audience,authTime,methods,mfaState}}","url":"https://staging.okfindex.com/api/me","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/auth/logout","auth":"session","grupo":"Account","exemplo":"// Execute no console da página do produto / Run in the product page console.\n(async () => {\n  const origin = \"$ORIGIN\";\n  const {csrf} = await fetch(origin + \"/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(origin + \"/api/auth/logout\", {\n    method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({})\n  });\n  if (!r.ok) throw new Error(\"Auth HTTP \" + r.status);\n  return r.json();\n})();","exemploLinguagem":"js","summary":"Revoke this product session.","desc":"Bootstrap/CSRF must belong to this browser and session. Other product sessions remain active.","retorno":{"ok":{"tipo":"bool","desc":"true"}},"erros":{"400":"invalid_request","403":"invalid_origin / invalid_csrf","503":"auth_unavailable: a sessão anterior é preservada / the previous session is preserved"},"returns":"{ ok }","url":"https://staging.okfindex.com/api/auth/logout","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"GET","path":"/api/account/keys","auth":"session","grupo":"Account","summary":"List your API keys in this product.","desc":"Never returns the key itself: name, last 4 characters, organization, creation, last use (hourly) and whether it still works.","retorno":{"keys":{"tipo":"object[]","desc":"`id`, `name`, `organizationId`, `last4`, `createdAt`, `lastUsedAt`, `revokedAt`, `active` (false when revoked or stopped by a password change / ending all sessions)."}},"erros":{"401":"invalid_session","503":"auth_unavailable"},"exemplo":"await fetch(\"$ORIGIN/api/account/keys\", {credentials: \"same-origin\"}).then(r => r.json());","exemploLinguagem":"js","returns":"{ keys }","url":"https://staging.okfindex.com/api/account/keys","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/account/keys/create","auth":"session","grupo":"Account","summary":"Create an API key for agents and scripts.","desc":"Needs a sign-in in the last 5 minutes; an organization key also needs a second factor in the session and the owner/admin role with this product enabled. At most 10 live keys per account and product. The key (`secret`) is returned ONCE.","corpo":{"name":{"tipo":"string","obrigatorio":true,"desc":"Up to 60 characters."},"organizationId":{"tipo":"string","nulo":true,"obrigatorio":true,"desc":"`null` for an account key."}},"body":{"name":"agent","organizationId":null},"retorno":{"key":{"tipo":"object","desc":"`id`, `name`, `organizationId`, `last4`, `createdAt`."},"secret":{"tipo":"string","desc":"`mmk_…`, shown once."}},"erros":{"400":"invalid_key_name / invalid_organization","401":"invalid_session / reauth_required","403":"invalid_origin / invalid_csrf / organization_forbidden / organization_mfa_required","409":"key_limit_reached","503":"auth_unavailable"},"exemplo":"(async () => {\n  const {csrf} = await fetch(\"$ORIGIN/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(\"$ORIGIN/api/account/keys/create\", {method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({name: \"agent\", organizationId: null})});\n  return r.json();\n})();","exemploLinguagem":"js","returns":"{ key, secret }","url":"https://staging.okfindex.com/api/account/keys/create","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/account/keys/revoke","auth":"session","grupo":"Account","summary":"Revoke one of your API keys.","desc":"Stops the key at once. Repeating is harmless.","corpo":{"id":{"tipo":"string","obrigatorio":true,"desc":"The key `id`."}},"body":{"id":"…"},"retorno":{"ok":{"tipo":"bool","desc":"true"}},"erros":{"400":"invalid_key_id","401":"invalid_session","403":"invalid_origin / invalid_csrf","404":"key_not_found","503":"auth_unavailable"},"exemplo":"(async () => {\n  const {csrf} = await fetch(\"$ORIGIN/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(\"$ORIGIN/api/account/keys/revoke\", {method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({id: \"…\"})});\n  return r.json();\n})();","exemploLinguagem":"js","returns":"{ ok }","url":"https://staging.okfindex.com/api/account/keys/revoke","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"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://staging.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://staging.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://staging.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://staging.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://staging.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://staging.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://staging.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/okf/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"},"version":{"tipo":"string","desc":"Only bundles declaring one of these `okf_version` values; comma-separated, up to 5.","exemplo":"0.1,0.2"},"concept":{"tipo":"string","desc":"Text in the indexed root content, including listed concept names and summaries (first 1000 characters); up to 80 characters."},"concepts":{"tipo":"string","desc":"Number of entries listed by the root. Up to 5 comma-separated bands: 0,1-5,6-20,21-100,101+."},"type":{"tipo":"string","desc":"Type declared by the root, not the types of every concept. Up to 5 comma-separated values, 40 characters each."},"license":{"tipo":"string","desc":"Repository license. Up to 5 comma-separated values, 40 characters each."},"language":{"tipo":"string","desc":"Only bundles whose repository language is one of these; comma-separated, up to 5 (GitHub bundles).","exemplo":"TypeScript,Go"},"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,concept_list,type,index_url,page_url,source,repo,indexed_at,updated_at,api}], limit, offset, next_offset, next }","url":"https://staging.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, concept_list[{name,url,summary}], 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://staging.okfindex.com/api/bundles/:id","auth_detail":"Public."},{"method":"GET","path":"/api/okf/stats","auth":"none","summary":"Size of the index by provenance, and when it last changed.","grupo":"Index","retorno":"IndexStats","exemplo":"curl -s $ORIGIN/api/okf/stats","returns":"{ total, by_origin, by_version[{v,n}], by_type[{v,n}], by_concepts[{v,n}], by_license[{v,n}], by_language[{v,n}], last_update }","url":"https://staging.okfindex.com/api/okf/stats","auth_detail":"Public."},{"method":"GET","path":"/api/stats","auth":"none","summary":"Counts and facets for the OKF Index home.","grupo":"Index","retorno":"IndexStats","exemplo":"curl -s $ORIGIN/api/stats","returns":"{ total, by_origin, by_version[{v,n}], by_type[{v,n}], by_concepts[{v,n}], by_license[{v,n}], by_language[{v,n}], last_update }","url":"https://staging.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://staging.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://staging.okfindex.com/api/visit","auth_detail":"Public."},{"method":"GET","path":"/api/vitrine","auth":"none","grupo":"Public stats","summary":"The product's public numbers: traffic, agents, usage and reliability, no money.","desc":"Projection published hourly by the house collector, rounded to two significant digits; `null` is a missing measurement, never zero. 15-minute cache with ETag (`If-None-Match` → 304). There is no way to send numbers through this route: publishing belongs to the collector, with its own token.","retorno":{"v":{"tipo":"int","desc":"Contract version (1)."},"produto":{"tipo":"string","desc":"Product id."},"publicado":{"tipo":"bool","desc":"`false` before the collector's first publication; then only these five keys come."},"atualizado_em":{"tipo":"string","desc":"When the collector published (ISO 8601).","nulo":true},"stale":{"tipo":"bool","desc":"`true` when the projection is older than 26 h."},"nome":{"tipo":"string","desc":"Product name.","opcional":true},"desde":{"tipo":"string","desc":"First day the series covers.","nulo":true,"opcional":true},"fuso":{"tipo":"string","desc":"Time zone of the days (`UTC`).","opcional":true},"hoje":{"tipo":"object","desc":"Today: pages by class (human, AI, bot), API calls by class, machine-surface reads and product usage.","opcional":true},"dias":{"tipo":"object[]","desc":"Up to 31 days, oldest first: `dia`, `paginas`, `api`, `api_ia`, `maquina`, `visitantes`, `uso`.","opcional":true},"janelas":{"tipo":"object","desc":"7- and 30-day sums (`d7`, `d30`).","opcional":true},"visitantes":{"tipo":"object","desc":"Unique visitors at the edge over 7 days.","opcional":true},"pessoas":{"tipo":"object","desc":"GA4 when available: users, sessions, countries, devices and who arrived from AI.","nulo":true,"opcional":true},"agentes":{"tipo":"object","desc":"The AI agents and bots that read the most, 7 days.","opcional":true},"superficies":{"tipo":"object","desc":"Reads of OKF, llms, well-known, OpenAPI and MCP over 7 days.","opcional":true},"mcp":{"tipo":"object","desc":"MCP calls over 7 days.","opcional":true},"uso":{"tipo":"object","desc":"Real product usage per resource: label, today, 7 and 30 days.","opcional":true},"contas":{"tipo":"object","desc":"Users and guests.","nulo":true,"opcional":true},"confiabilidade":{"tipo":"object","desc":"Share of requests without 5xx over 7 days, and the live build.","opcional":true},"catalogo":{"tipo":"object","desc":"Size of the catalog, when the product has one.","nulo":true,"opcional":true},"apoio":{"tipo":"object","desc":"Impressions and clicks per sponsor, when any.","opcional":true}},"exemplo":"curl -s $ORIGIN/api/vitrine","returns":"{ v, produto, publicado, atualizado_em, stale, nome?, desde?, fuso?, hoje?, dias?, janelas?, visitantes?, pessoas?, agentes?, superficies?, mcp?, uso?, contas?, confiabilidade?, catalogo?, apoio? }","url":"https://staging.okfindex.com/api/vitrine","auth_detail":"Public."},{"method":"GET","path":"/api/vitrine/operador","auth":"none","grupo":"Public stats","summary":"The product's full document on the operator panel — operator token only.","headers":{"Authorization":{"tipo":"string","desc":"`Bearer <METRICS_TOKEN>` — the operator class.","obrigatorio":true}},"retorno":{"produto":{"tipo":"string","desc":"Product id."},"atualizado_em":{"tipo":"string","desc":"When the collector published.","nulo":true},"operador":{"tipo":"object","desc":"The collector's full document, with what the public projection leaves out.","nulo":true}},"erros":{"401":"No token, wrong token or a token of another class.","503":"Worker without `METRICS_TOKEN` or without the control plane."},"exemplo":"curl -s $ORIGIN/api/vitrine/operador -H \"Authorization: Bearer $METRICS_TOKEN\"","returns":"{ produto, atualizado_em, operador }","url":"https://staging.okfindex.com/api/vitrine/operador","auth_detail":"Public."},{"method":"GET","path":"/api/vitrine/painel","auth":"none","grupo":"Public stats","summary":"The whole house panel, in the shape the gm reads — operator token only.","headers":{"Authorization":{"tipo":"string","desc":"`Bearer <METRICS_TOKEN>` — the operator class.","obrigatorio":true}},"retorno":{"apps":{"tipo":"object[]","desc":"One operator document per product, ordered by id."},"updated":{"tipo":"string","desc":"When the collector closed the round.","opcional":true},"totals":{"tipo":"object","desc":"House totals.","opcional":true}},"erros":{"401":"No token, wrong token or a token of another class.","503":"Worker without `METRICS_TOKEN` or without the control plane."},"exemplo":"curl -s $ORIGIN/api/vitrine/painel -H \"Authorization: Bearer $METRICS_TOKEN\"","returns":"{ apps, updated?, totals? }","url":"https://staging.okfindex.com/api/vitrine/painel","auth_detail":"Public."},{"method":"GET","path":"/api/vitrine/cursores","auth":"none","grupo":"Public stats","summary":"The resolved-error cursor per product (`borda`, `cli`) — operator token only.","headers":{"Authorization":{"tipo":"string","desc":"`Bearer <METRICS_TOKEN>` — the operator class.","obrigatorio":true}},"retorno":{"_texto":"JSON: `{ [product]: { borda?: ISO, cli?: ISO } }`; empty is `{}`."},"erros":{"401":"No token, wrong token or a token of another class.","503":"Worker without `METRICS_TOKEN` or without the control plane."},"exemplo":"curl -s $ORIGIN/api/vitrine/cursores -H \"Authorization: Bearer $METRICS_TOKEN\"","returns":"JSON: `{ [product]: { borda?: ISO, cli?: ISO } }`; empty is `{}`.","url":"https://staging.okfindex.com/api/vitrine/cursores","auth_detail":"Public."},{"method":"GET","path":"/api/partners","auth":"none","grupo":"Partnership","summary":"Partnership, sponsorship and advertising: the product's placements with a suggested price, the public numbers next to them and how to propose.","desc":"Information on request, no activation: placements from the house catalogue priced in USD per 30 days (90 and 365 days discounted), sponsors in effect, an excerpt of `/api/vitrine`, the house wallet (USDC on Base) and the contact path — bank deposit, PIX or invoice are arranged in the reply. Cached for 1 hour.","retorno":{"status":{"tipo":"string","desc":"`sob_consulta`: information and proposal, no activation and no charge."},"produto":{"tipo":"string","desc":"Product name."},"idioma":{"tipo":"string","desc":"Language of the texts (the product's)."},"titulo":{"tipo":"string","desc":"Title of the offer."},"descricao":{"tipo":"string","desc":"One sentence about the offer."},"publico":{"tipo":"string","desc":"Who uses the product — the audience a sponsor reaches."},"modalidades":{"tipo":"object[]","desc":"`{ id, nome }`: patrocinio, parceria, anuncio."},"placements":{"tipo":"object[]","desc":"The product's placements: `id`, `nome`, `onde`, `formato`, `exclusivo`, `medicao`, `price_usd_30d` (suggested; `null` is on request), `exposure[{ dias, price_usd }]` for 30, 90 and 365 days, `disponivel`."},"house_bundle":{"tipo":"object","desc":"The house bundle: footer and agent mention across the ten products, discounted."},"parcerias":{"tipo":"string[]","desc":"Partnership ideas the product is open to discuss."},"current_sponsors":{"tipo":"object[]","desc":"Sponsors in effect: `id`, `nome`, `url`, `frase`, `espacos`, `ate`."},"stats":{"tipo":"object","desc":"Excerpt of the public numbers (`hoje`, `janelas`, `agentes`, `confiabilidade`) and the `link` to `/api/vitrine`; `publicado: false` before the first publication."},"payment":{"tipo":"object","desc":"How to pay: `rede`, `chain_id`, `ativo`, `pay_to`, `eip681` (the house wallet, when declared), `alternativas` and the `nota` — bank deposit, PIX or invoice in the reply."},"contact":{"tipo":"object","desc":"`email`, `form_url`, `api_url` (`POST /api/contact` where the handler exists), `campos` (required), `campos_proposta` (the optional proposal fields, each with its accepted values), `price_agent_usd`, `message_template`, `instructions`."},"politica":{"tipo":"object","desc":"Placement label, refused sectors, prepayment, deadlines."},"_links":{"tipo":"object","desc":"`self`, `stats`, `page` (`null` until the page exists), `contact`, `casa` (the same path on the ten products)."}},"exemplo":"curl -s $ORIGIN/api/partners","returns":"{ status, produto, idioma, titulo, descricao, publico, modalidades, placements, house_bundle, parcerias, current_sponsors, stats, payment, contact, politica, _links }","url":"https://staging.okfindex.com/api/partners","auth_detail":"Public."},{"method":"POST","path":"/api/contact","auth":"none","summary":"Talks to the people behind the index: a human solves Turnstile, an agent pays $0.10 in x402 or prepaid credit.","grupo":"Contact","desc":"Without a captcha in the body the request is treated as an agent: 402 until paid — x402 (`X-PAYMENT`) or prepaid credit (`Authorization: Bearer cred_…`, bought at `POST /api/credito`, the same token in every product of the house). The first agent message is free; after that the backoff is 60s doubling up to a 1-hour cap, announced in `Retry-After`. A partnership proposal goes through this same route with `tipo`.","corpo":{"name":{"tipo":"string","desc":"What to call the person writing.","obrigatorio":true},"email":{"tipo":"string","desc":"Where to reply.","obrigatorio":true},"message":{"tipo":"string","desc":"What you want to say.","obrigatorio":true},"form_ts":{"tipo":"int","desc":"When the form was opened; the anti-robot of the human path, and only it requires this."},"cf_turnstile_response":{"tipo":"string","desc":"Turnstile response; present only on the human path."},"tipo":{"tipo":"string","desc":"Proposal: `patrocinio`, `parceria` or `anuncio`. Turns on the fields below."},"empresa":{"tipo":"string","desc":"Who is proposing, when it is a company."},"site":{"tipo":"string","desc":"Website of who is proposing."},"orcamento":{"tipo":"string","desc":"`ate_100`, `100_500`, `500_2000`, `2000_mais` or `a_combinar`."},"espaco":{"tipo":"string[]","desc":"Placement ids from `GET /api/partners`, up to 6."},"duracao":{"tipo":"string","desc":"Exposure in days: `30`, `90` or `365`."},"pagamento":{"tipo":"string","desc":"`usdc`, `deposito` or `a_combinar`."}},"body":{"name":"Agent","email":"agent@example.com","message":"hello from an agent"},"retorno":{"ok":{"tipo":"bool","desc":"Always `true` when the message was accepted."},"path":{"tipo":"string","desc":"Which path it came through: human with captcha or paid agent."}},"erros":{"400":"Required field missing.","402":null,"429":"Agent backoff: wait for `Retry-After`.","503":"Mail or captcha not configured on the Worker; nothing was charged."},"exemplo":"curl -s -XPOST $ORIGIN/api/contact -H \"X-PAYMENT: $PAYMENT\" -H 'content-type: application/json' -d '{\"name\":\"Agent\",\"email\":\"agent@example.com\",\"message\":\"hello from an agent\"}'","returns":"{ ok, path }","url":"https://staging.okfindex.com/api/contact","auth_detail":"Public."},{"method":"POST","path":"/api/credito","auth":"none","summary":"Top up prepaid credit: pay once with x402 and get the token that debits on any API of the house.","grupo":"Credit","query":{"usd":{"tipo":"int","desc":"Package: 1, 5, 10 ou 25 dollars.","obrigatorio":true}},"retorno":{"token":{"tipo":"string","desc":"Bearer token for the balance (`cred_…`). Shown ONCE — it cannot be recovered."},"saldo_usd":{"tipo":"string","desc":"Credited balance."},"guarde":{"tipo":"string","desc":"Warning that the token is the bearer of the credit."},"usar":{"tipo":"string","desc":"How to present the token on paid routes."},"saldo_em":{"tipo":"string","desc":"Where to check balance and statement."}},"erros":{"400":"Package outside the list (1, 5, 10 ou 25).","402":"Unpaid — the body carries the x402 `accepts[]`."},"exemplo":"curl -s -XPOST '$ORIGIN/api/credito?usd=10'","returns":"{ token, saldo_usd, guarde, usar, saldo_em }","url":"https://staging.okfindex.com/api/credito","auth_detail":"Public."},{"method":"GET","path":"/api/credito","auth":"credito","summary":"Credit balance and statement — the latest movements, without returning the token.","grupo":"Credit","retorno":{"saldo_micros":{"tipo":"int","desc":"Balance in micro-dollars (1e-6 USD)."},"saldo_usd":{"tipo":"string","desc":"Formatted balance."},"criado_em":{"tipo":"string","desc":"When the credit was opened."},"movimentos":{"tipo":"object[]","desc":"Recent credits and debits, with product and resource."}},"erros":{"401":"No token, or unknown token."},"exemplo":"curl -s $ORIGIN/api/credito -H 'Authorization: Bearer cred_…'","returns":"{ saldo_micros, saldo_usd, criado_em, movimentos }","url":"https://staging.okfindex.com/api/credito","auth_detail":"Prepaid credit token in `Authorization: Bearer cred_…` (or the `X-Credito` header). Not an account: it is a bearer of balance."},{"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://staging.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://staging.okfindex.com/api/erro-cliente","auth_detail":"Public."},{"method":"POST","path":"/api/pagamento/aberto","auth":"none","statusOk":202,"summary":"The interface reports a visible payment prompt. Agents must not call this route.","grupo":"Operations","desc":"An empty same-origin report, sent automatically when a payment prompt becomes visible. It starts no payment, grants no access and receives no identity or credentials. It writes no database row per report. Counts events, not unique people. The private operator dashboard separates API payment requests and browser payment views per UTC day; the two counts may overlap.","headers":{"Origin":{"tipo":"string","desc":"The page origin, identical to this route's origin.","obrigatorio":true},"Sec-Fetch-Site":{"tipo":"string","desc":"`same-origin`, set by the browser.","obrigatorio":true},"X-MM-Payment-View":{"tipo":"string","desc":"`1`, set by the shared component.","obrigatorio":true}},"retorno":{"_texto":"202 with no body when accepted; 204 when ignored. Always no-store."},"returns":"202 with no body when accepted; 204 when ignored. Always no-store.","url":"https://staging.okfindex.com/api/pagamento/aberto","auth_detail":"Public."},{"method":"GET","path":"/api/pricing","auth":"none","grupo":"Discovery","summary":"Current prices and free allowances.","retorno":{"product":{"tipo":"string","desc":"Product name."},"quota":{"tipo":"PaymentQuota","desc":"Public allowances and current list prices; not personal usage."},"pricing":{"tipo":"string","desc":"Absolute URL of the current price list."},"billing":{"tipo":"string","desc":"Absolute URL of payment discovery or the existing billing summary."},"api_index":{"tipo":"string","desc":"Absolute URL of the API catalog."}},"erros":{"405":"Use GET or HEAD."},"exemplo":"curl -s $ORIGIN/api/pricing","returns":"{ product, quota{free,paid,how_to_pay,live,free_now?,trial?}, pricing, billing, api_index }","url":"https://staging.okfindex.com/api/pricing","auth_detail":"Public."},{"method":"GET","path":"/api/billing","auth":"none","grupo":"Discovery","summary":"Public payment and prepaid credit discovery.","retorno":{"product":{"tipo":"string","desc":"Product name."},"quota":{"tipo":"PaymentQuota","desc":"Public allowances and current list prices; not personal usage."},"pricing":{"tipo":"string","desc":"Absolute URL of the current price list."},"billing":{"tipo":"string","desc":"Absolute URL of payment discovery or the existing billing summary."},"api_index":{"tipo":"string","desc":"Absolute URL of the API catalog."},"payment":{"tipo":"PaymentX402","desc":"Public x402 configuration; pay_to=null means not configured."},"credit":{"tipo":"PaymentCredit","desc":"Prepaid credit entry point. Never contains a balance or token."}},"erros":{"405":"Use GET or HEAD."},"exemplo":"curl -s $ORIGIN/api/billing","returns":"{ product, quota{free,paid,how_to_pay,live,free_now?,trial?}, pricing, billing, api_index, payment{provider,mode,network,chain_id,pay_to,homolog,dev,dev_gate,gratis?,facilitator,asset,asset_address,faucet,wallets}, credit{url,header} }","url":"https://staging.okfindex.com/api/billing","auth_detail":"Public."}],"quickstart":["curl -s https://staging.okfindex.com/api/stats","curl -s 'https://staging.okfindex.com/api/bundles?q=agent&limit=5'","curl -s https://staging.okfindex.com/okf/protocolo.md"]}