Documents
query-engine
query-engine
Type
External
Status
Published
Created
Mar 5, 2026
Updated
Mar 5, 2026

import EntityQueryKnex from '/docs/snippets/entity-query-knex.md'
import BackendIntroCrosslink from '/docs/snippets/backend-custom-intro-crosslink.md'
import ConsiderDocumentService from '/docs/snippets/consider-document-service.md'
import QueryEnginePrereqs from '/docs/snippets/query-engine-prereqs.md'

Query Engine API#

The Strapi backend provides a Query Engine API to interact with the database layer at a lower level.

Basic usage#

The Query Engine is available through strapi.db.query:

strapi.db.query('api::blog.article').findMany({ // uid syntax: 'api::api-name.content-type-name'
  where: {
    title: {
      $startsWith: '2021',
      $endsWith: 'v4',
    },
  },
  populate: {
    category: true,
  },
});

Available operations#

The Query Engine allows the following operations on database entries: