By Sagar
Spotlight-style global search for the Strapi v4 admin: every collection type and single type, from a dedicated page or a Ctrl/Cmd + K palette.
released August 21, 2026
npm install strapi-global-searchSpotlight-style global search for the Strapi v5 admin: every collection type and single type, from a dedicated page or a Ctrl/Cmd + K palette.
Install it, enable it, and start Strapi. It introspects your content types at boot and never needs to know your schema ahead of time.
Strapi 4: use strapi-global-search@1.x. This major (2.x) is Strapi 5 only.
api:: collection type and single type, including text fields nested inside components.npm install strapi-global-search
# or
yarn add strapi-global-searchEnable it in config/plugins.js or config/plugins.ts:
module.exports = {
"global-search": {
enabled: true,
},
};Then start your Strapi app (npm run develop). There is no extra build step.
This package has no preinstall / install / postinstall scripts and does not use git or remote URL dependencies. On npm v12 you do not need an allowScripts entry for strapi-global-search.
| Priority | Match |
|---|---|
| 1 | id / documentId exact |
| 2 | id / documentId partial |
| 3 | Name (the Content Manager main field) exact |
| 4 | Name starts with the query |
| 5 | Name contains the query |
| 6 | Any other top-level text field |
| 7 | Any text field inside a component |
Ties break on an exact-case match, then the shortest matching value, then the most recently updated entry.
Everything is optional and can be changed at Settings → Global Search → Configuration, or pinned in config/plugins.js / config/plugins.ts:
module.exports = {
"global-search": {
enabled: true,
config: {
minChars: 2, // minimum query length
debounce: 250, // ms to wait after the last keystroke
perTypeLimit: 20, // rows fetched per content type
maxResults: 100, // cap on the merged, ranked result set
deep: true, // search inside components
maxDepth: 3, // how many component levels to walk
includeDrafts: true, // include unpublished entries
queryTimeout: 4000, // per-content-type timeout in ms
concurrency: 8, // content types queried in parallel
excludedContentTypes: [], // e.g. ['api::log.log']
excludedFields: [], // e.g. ['api::article.article:body']
displayFields: {}, // extra fields in the result row, keyed by UID
},
},
};Two RBAC actions are registered and can be assigned per role:
plugin::global-search.read — use the search page and the palette.plugin::global-search.settings — change the configuration.Search results are additionally filtered by each user's Content Manager read permissions.
Searching runs live database LIKE queries — there is no index to maintain, but a query on a very large table is only as fast as your database makes it. The plugin keeps this bounded with a per-content-type row limit, a bounded column projection, a per-type timeout, a concurrency cap and a client-side debounce. For very large tables, consider a database index on the fields people actually search, or disable those content types in Settings.
Reported result counts reflect the capped set (perTypeLimit rows per type, maxResults overall) — a + in the UI means there were more matches than were fetched.
api:: content types are searched — not plugin content types such as users-permissions users or uploaded files.| Strapi | ^5.0.0 (developed against 5.52.0) |
| Node | 20 – 26 |
| React | 18 |
Public releases are published from GitHub Actions with npm trusted publishing (OIDC). There is no long-lived 2FA-bypass granular access token. See npm install-time security and GAT bypass2fa deprecation.
MIT
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
