Content Management API > Search Index
List all search indexes for a site
Returns
Returns an array of resource objects of type search_index
Examples
import { buildClient } from "@datocms/cma-client-node";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const searchIndexs = await client.searchIndexes.list();
for (const searchIndex of searchIndexs) { // Check the 'Returned output' tab for the result ☝️ console.log(searchIndex); }}
run();{ id: "1822", name: "Production Website", enabled: true, frontend_url: "https://www.mywebsite.com/", user_agent_suffix: "v1.0.0", meta: { indexing_status: "success", last_indexing_completed_at: "2025-03-30T09:29:14.872Z", }, build_triggers: [{ type: "build_trigger", id: "1822" }],}