Search mail by meaning and by words
Searches the mailboxes you may read, or one mailbox with mailbox. Hybrid by default: the message embedding (pgvector, cosine) and the weighted words index are fused by reciprocal rank with a small recency boost, in one statement; why tells which branch matched. Gmail operators in q: from: to: cc: subject: label: filename: mailbox: is:unread|read|starred|unstarred has:attachment in:inbox|archive|sent|spam|trash|anywhere after:2026/08/01 before: newer_than:7d older_than:2w (h/d/w/m/y), "a phrase", -word or -from: to exclude, a OR b. A query made of operators alone lists the matching messages newest first (why: filter). Sign-in codes and links, spam and system mail are never indexed; mailboxes listed in the assistant's search_opt_out_mailbox_ids are searched by words only. A token bound to an agent identity searches only the mailboxes its agent operates. Requires email:read. Without email:auth_secrets, inbound authentication mail is left out before ranking: no word, operator or filter matches it, so a search for a sign-in code finds nothing.
Request
- Base URL: https://domani.run
- URL: https://domani.run/api/emails/search
- Auth: HTTP bearer
Query parameters
Restrict to one mailbox address (slug@domain).
What you are looking for, in any language: a name, a reference, or a description of the mail, plus Gmail operators (from:dave is:unread newer_than:7d -invoice "exact phrase").
hybrid fuses the embedding and the words by rank; semantic uses the meaning only; keyword the words only.
Results to return.
Only mail received after this ISO timestamp.
Only mail received before this ISO timestamp.
One folder. Trash is excluded unless named or anywhere.
Sender address contains.
Comma-separated labels: only messages carrying any of them
Response
Ranked results
Changes
No recorded changes to this operation across all 2 revisions of this API.