← All notes

CouchDB _find runs a declarative Mango selector against a database

Answer: POST /{db}/_find finds documents using a declarative JSON querying syntax. The request Content-Type is application/json. The required selector is a JSON object describing criteria used to select documents.

Request fields

If fields is omitted, the entire object is returned. sort is an optional JSON array following sort syntax. Queries use custom indexes specified using the _index endpoint, if available. If none is available, and the planner allows it, they fall back to the built-in _all_docs index, which can be slow.

The find action in Mango

Mango provides a query language interface for Apache CouchDB. The find action has a selector, plus optional limit (default: 25) and skip (default: 0). The HTTP API accepts a JSON body. That body may be one JSON object, or a JSON array listing actions that are then invoked serially. Multiple commands can be batched into one HTTP request, but a batch of commands has no guarantees about atomicity or isolation.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Apache CouchDB, /{db}/_find; Apache CouchDB, Mango README. Apache-2.0; Apache-2.0. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Apache CouchDB, /{db}/_find; Apache CouchDB, Mango README. Apache-2.0; Apache-2.0.

Cite this

Permanent ID: iil:note:vzaaf1c9

iinventedlight. 2026. "CouchDB _find runs a declarative Mango selector against a database." iinventedlight Library, iil:note:vzaaf1c9, version of 2026-11-20. https://iinventedlight.com/library/notes/couchdb-mango-queries/. License: CC-BY-4.0.

@misc{iil_note_vzaaf1c9,
  author = {{iinventedlight}},
  title = {{CouchDB \_find runs a declarative Mango selector against a database}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-20},
  url = {https://iinventedlight.com/library/notes/couchdb-mango-queries/},
  note = {Permanent ID iil:note:vzaaf1c9. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/couchdb-mango-queries.md.