Documentação

A documentação para programadores está em inglês.

Documentação

Changelog

Changes to the Answers API contract and to @webknox/elements. Within v2, changes are additive: new fields, card types, layouts, reason values and error codes can appear, so ignore what you don't know. Anything that would break existing code comes as a new version.

2026-11-13 · Number cards and @webknox/elements 1.4

  • A new card type, statistic: a number and how it changes ("What's the world's population?", "birth rate of South Korea", "US inflation"), places compared ("Japan vs South Korea fertility"), countries ranked ("Which countries have the lowest birth rates?", within a group too: "the lowest fertility in the EU"), and a city's population. The numbers come from the World Bank, the U.S. Bureau of Labor Statistics, Eurostat, the UN and Wikidata, each value with its period; a gap in a source stays null. The latest value comes with its history, a projection where there is one, comparable places, records, and a live estimate for the world's population.
  • A number no dataset has ("How many lions are there in Africa?") is looked up on the web: WebKnox reads the pages the search cites and keeps only numbers it finds on them. Such cards say provenance: "web" and list those pages as sources. These lookups have a daily budget; once it is spent, such a question is matched: false until the next UTC day.
  • Layouts full, glance, chart and table (the dashboard theme shows the table). Other measures of the same thing and other places of the same name refine in place with refine: {card: "statistic", indicator, subjects}, a ranking with {card: "statistic", indicator, order, t, within, subjects}, also in hosted embeds.
  • @webknox/elements 1.4 renders the card; 1.3 shows it as text only. The live estimate has a pause button, and code written for 1.3 works unchanged.

2026-11-13 · @webknox/elements 1.3

  • On npm: npm install @webknox/elements now renders the entity card (a person, place or chemical element, with its photo or element tile, a locator map, a timeline, its place in the periodic table, density bars, key facts and a fun fact) in the layouts full, glance and map, and the book.search card. 1.2.1 showed both as text only.
  • An entity card's related people and other meanings emit webknox-refine with {card: "entity", id}; unclaimed, they ask "Tell me about …" as a follow-up. While a refine is out the card shows that it is loading.
  • The map layout needs a map: a person or an element in map gets the full card, follow-ups included. The maps are images from https://webknox.com/geo/v1/, so a page with a Content Security Policy needs webknox.com in img-src, as for photos.
  • Code written for 1.2 works unchanged.

2026-11-12 · Knowledge cards

  • A new card type, entity: who a named person is, what a named place or chemical element is, where a place is and when someone lived ("Who is Plato?", "Where is Dresden?", "What is uranium?"), with a photo, a summary, key facts and a fun fact worked out from the data. A place comes with a locator map (https://webknox.com/geo/v1/<country>.svg, drawn from Natural Earth) and its distance from the capital, a person born by 1500 with a timeline when they were born closer in time to the building of a famous monument than to today, an element with its place in the periodic table and its density next to familiar metals. Facts come from Wikidata, the summary from Wikipedia, photos from Wikimedia Commons.
  • Layouts full, glance and map. Other things of the same name come as alternatives, and the card's related people and other meanings open with refine: {card: "entity", id}, also in hosted embeds.
  • A question for one fact ("What is the capital of Australia?") is not answered with this card: it stays matched: false for now.

2026-11-06 · Free plan in any project

  • The free plan is no longer limited to non-commercial use. Answers on it still carry the attribution credit, which must stay visible.

2026-11-05 · @webknox/elements 1.2.1

  • The handles on a search card's range filters (a recipe's nutrients, an artwork's period) now move: drag them, or use the arrow keys, and the number boxes follow. In the sidebar a move sends one webknox-refine once the handle has rested for 250 ms; in the drawer it waits for the drawer's button, like the drawer's other filters.
  • Filter options that would leave no results are hidden instead of disabled, and so is a filter with nothing left to offer. A chosen option stays, so it can be turned off, and a capped search keeps its options, since its counts cover only part of the results.

2026-11-05 · @webknox/elements 1.2

  • On npm: npm install @webknox/elements now brings the recipe.search, game.search and artwork.search cards, the webknox-refine event, a theme's cards options, external-media and recipe cards without an empty photo frame. 1.0 had none of these, and 1.1 was never published. Code written for 1.0 works unchanged.

2026-11-05 · Filters in hosted embeds

  • A hosted embed's search cards now work in place: filters, sort, "Show more" and a recipe search's recipes update the card, on any site, without a key on your page and without using your tokens, and a recipe opens with a link back to the results. A follow-up message reaches your page only if a change could not be answered in place.

2026-11-04 · Recipe cards without a photo

  • <webknox-answer> no longer draws an empty photo frame for a recipe whose image is null (every recipe that is not Creative Commons): full starts with the title, glance shows the text alone.

2026-10-27 · WebKnox in AI apps (MCP)

  • WebKnox is an MCP server at https://mcp.webknox.com/mcp. Claude, ChatGPT and other apps that support MCP Apps show its cards in the chat; Claude Code, Codex and other text-only clients get the answer as text with its sources. Without an account there are 10 answers with a card a day per person (in Claude's apps, which don't say who is asking, a shared daily pool); after that, signing in with WebKnox uses your own plan. See WebKnox in AI apps.
  • <webknox-answer> takes external-media: videos and audio open with their provider in a new tab instead of playing in the card, for pages whose content security policy allows no players.

2026-10-26 · @webknox/elements 1.0

  • On npm under the MIT licence: npm install @webknox/elements. Version 1.0 keeps the preview's element, properties and events.
  • New since the preview: a theme's style options accent, corners and font, and accent text shaded for contrast (see Saved themes below).

2026-10-25 · Saved themes

  • Pro and Scale can save themes in the console's new Themes section: a style preset with an accent colour, corners, a font and a layout per card type, at most 20 per account. render.theme takes a saved theme's id (th_ and 12 characters); another account's id, or one that does not exist, is a 400. A render keeps the theme as it was when it was made.
  • The theme object takes three safe style options, accent, corners and font, besides the preset and raw tokens; schemas/theme.schema.json describes a saved theme.
  • An accent colour (the accent attribute or a theme's) keeps text readable: text in the accent colour is shaded until it reaches 4.5:1 on the style's surfaces, while buttons and highlights keep the colour as given.

2026-10-25 · Hosted render

  • render (Pro and Scale): a matched answer with a card comes back with the URLs of the formats you ask for: embed_url (the interactive card for an iframe, which reports follow-ups, actions and its height to your page by postMessage) and image_url. They work for 30 days, then answer 410 Gone until the answer is deleted (within a day). The embed is free; an image adds 1 token.
  • The image is a PNG, or a JPEG when the card shows photos, 1200 px wide with square corners.
  • 403 plan_required: a request with render on Free or Starter. A 503 unavailable means the URLs could not be made; nothing is charged.

2026-10-22 · Free-plan credit and the daily quota

  • attribution: answers on the Free plan carry {text, url}, a credit such as "Answer by WebKnox" in the answer's language. Show it with the answer; <webknox-answer> shows it in every layout.
  • 429 quota_exceeded: no tokens are left today. Wait retry_after_s (until 00:00 UTC) or buy a pack (packs need a paid plan).

2026-10-21 · Answers API v2 draft

  • POST /v2/answers: send the conversation you already have and get back matched, a plain-text text, a shorter speech, a typed card, sources, follow_ups and actions. Unmatched turns come back with matched: false and are not billed.
  • 16 card types, each with a versioned JSON Schema: quick_answer, translation, definition, weather.forecast, sun_moon, nutrition.facts, recipe, timer, comparison, quiz, gallery, audio, video, snippet, on_this_day and movies.
  • Images in answers are WebKnox media URLs (https://webknox.com/media/v1/…), never third-party addresses. A media URL has no query string; one you add is ignored.
  • Hosted render URLs: ask with render to get an embed URL and a PNG image URL that expire at render.expires_at.

2026-10-21 · @webknox/elements 0.1 preview

  • <webknox-answer> renders every card type in any framework, with five styles (daylight, midnight, editorial, playful, mono) and five named themes (kiosk, dashboard, magazine, kids, status).
  • Layouts per card type, from full to glance, strip, table, chart, headline, label and macros.
  • Events for follow-ups (webknox-follow-up) and actions (webknox-action); focus moves to the card's next control when the one in use disappears.
  • Labels in English, German, French, Spanish, Portuguese and Italian, following the answer's locale.