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
selectorJSON object describing criteria used to select documents; requiredlimitmaximum number of results returned; default is 25skipskip the first n resultsfieldsJSON array specifying which fields of each object should be returned
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
- id: C1 claim: _find is a POST that selects documents with a required JSON selector. source: S1 evidence: "Find documents using a declarative JSON querying syntax."
- id: C2 claim: The default limit is 25, and skip, sort, and fields are optional. source: S1 evidence: "Maximum number of results returned. Default is 25"
- id: C3 claim: Mango's find action takes a selector plus optional limit and skip, with the same default limit of 25. source: S2 evidence: "limit (optional) (default: 25) - integer >= 0, Limit the number of rows returned"
Sources
- [S1] /{db}/_find. Apache CouchDB. https://docs.couchdb.org/en/stable/api/database/find.html . License: Apache-2.0. Accessed 2026-11-20.
- [S2] Mango README. Apache CouchDB. https://raw.githubusercontent.com/apache/couchdb/main/src/mango/README.md . License: Apache-2.0. Accessed 2026-11-20.
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
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.},
}
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.
- couchdb-mango-queries.table.json (table; CC-BY-4.0)
- couchdb-mango-queries.schema.json (schema; CC-BY-4.0)
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.