Documentation API: search and feedback

HTTP routes used by the Communik reader: parameters, JavaScript and cURL examples, responses and errors.
Published on 10/1/2026

Search articles

Search published articles the reader is allowed to access. The site's domain identifies the project. Drafts are excluded, and private content follows the reader's session permissions.

Query parameters

Parameter Type Details
q string Search text, limited to 120 characters. Empty text returns no results.
lang string Documentation language, such as en.
version string Documentation version, such as current.

Response

Field Type Details
data.term string Normalized search term.
data.results array Up to 30 articles ranked by relevance.
id string Article identifier.
title string Published title.
summary string Published summary.
sectionSlug string Section URL segment.
slug string Article URL segment.
snippet string Text excerpt.
score number Internal relevance score.
GET/api/modules/documentation/search

Request examples

curl --get "https://www.communik.io/api/modules/documentation/search" \
  --data-urlencode "q=MCP" \
  --data-urlencode "lang=en" \
  --data-urlencode "version=current"

Response examples

json
{
  "data": {
    "term": "unknown-term",
    "results": []
  }
}

Rate a page

Record whether a published page was helpful. Call this route from the site hosting the documentation: requests from another origin are rejected.

JSON body

Field Type Details
articleId string Required. Numeric identifier of a published article accessible to the reader.
locale string Required. Article language, such as en.
helpful boolean Required. true if helpful, otherwise false.

Responses

Case Result
Vote recorded data.recorded: true
Preview on a staging subdomain data.recorded: false, data.preview: true
Invalid body Error 400
Different origin Error 403
Missing, unpublished or inaccessible article Error 404
POST/api/modules/documentation/feedback

Request examples

async function vote(articleId, helpful) {
  const response = await fetch("/api/modules/documentation/feedback", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ articleId, locale: "en", helpful })
  });
  if (!response.ok) throw new Error("Vote not recorded");
  return response.json();
}

Response examples

json
{
  "data": { "recorded": true }
}