cURL
curl --request GET \
--url https://api.nohead.io/v1/collections/{collection_id}/search-index \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
const result = await nohead.collections.searchIndex.get("posts")
from nohead import Nohead
nohead = Nohead()
result = nohead.collections.search_index.get("posts")
require "nohead"
nohead = Nohead::Client.new
result = nohead.collections.search_index.get("posts")
{
"object": "search_index",
"collection_id": "<string>",
"index": "<string>",
"status": "building",
"documents": 123,
"last_built_at": "2023-11-07T05:31:56Z",
"rebuild_requested_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}Search
Get search index status
Whether the collection’s search index is built and up to date.
GET
/
v1
/
collections
/
{collection_id}
/
search-index
cURL
curl --request GET \
--url https://api.nohead.io/v1/collections/{collection_id}/search-index \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
const result = await nohead.collections.searchIndex.get("posts")
from nohead import Nohead
nohead = Nohead()
result = nohead.collections.search_index.get("posts")
require "nohead"
nohead = Nohead::Client.new
result = nohead.collections.search_index.get("posts")
{
"object": "search_index",
"collection_id": "<string>",
"index": "<string>",
"status": "building",
"documents": 123,
"last_built_at": "2023-11-07T05:31:56Z",
"rebuild_requested_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}Authorizations
Project-scoped API key, e.g. nohead_sk_k7fz0a9c3m2q_<secret>, or
nohead_pk_… for a published-only key. Used by servers, CI, the CLI
and coding agents.
Path Parameters
Collection ID, or the collection slug when authenticating with an API key.
Response
The index status.
The index's name in the search engine, which search tokens search
(indexUid in Meilisearch's search API). Opaque; it never changes.
building until first built; stale from the change that queues a rebuild until it has run; failed if the last rebuild failed (it is retried).
Available options:
building, ready, stale, failed