{"templateId":"markdown","sharedDataIds":{},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"filter expressions","siteUrl":"https://documentation.mailgun.com","llmstxt":{"title":"Mailgun Documentation","description":"LLMS.txt containing a map of all the documentation files for Mailgun.","sections":[{"title":"Mailgun Send Documentation","description":"All of the Mailgun Send documentation.","includeFiles":["docs/mailgun/**/*.md"],"excludeFiles":["docs/mailgun/index.md"]},{"title":"Mailgun Send OAS","description":"All of the Mailgun Send API specifications.","includeFiles":["docs/mailgun/**/mailgun.yaml"]},{"title":"Mailgun Optimize Documentation","description":"All of the Mailgun Optimize documentation.","includeFiles":["docs/inboxready/**/*.md"],"excludeFiles":["docs/inboxready/index.md"]},{"title":"Mailgun Optimize OAS","description":"All of the Mailgun Optimize API specifications","includeFiles":["docs/inboxready/**/inboxready.yaml"]},{"title":"Mailgun Validate Documentation","description":"All of the Mailgun Validate documentation.","includeFiles":["docs/validate/**/*.md"],"excludeFiles":["docs/validate/index.md"]},{"title":"Mailgun Validate OAS","description":"All of the Mailgun Validate API specifications.","includeFiles":["docs/validate/**/*.yaml"]},{"title":"Mailgun Inspect Documentation","description":"All of the Mailgun Inspect documentation.","includeFiles":["docs/inspect/**/overview.md"]},{"title":"Mailgun Inspect OAS","description":"All of the Mailgun Inspect API specifications.","includeFiles":["docs/inspect/**/*.yaml"]}]},"description":"Email filter expressions help you quickly find and analyze specific email data."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"filter-expression","__idx":0},"children":["Filter Expression"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Possible filtering expressions are listed below:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Expression"},"children":["Expression"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["foo bar"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matches field values that contain both term ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["foo"]}," and term ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bar"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["foo AND bar"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Same as above."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["foo OR bar"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matches field values that contain either term ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["foo"]}," or term ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bar"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"foo bar\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matches field values that literally contain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["foo bar"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NOT foo"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matches field values that do not contain term ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["foo"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[">10000"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matches values that greater than 10000. This filter can be applied to numeric fields only."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[">10000 <20000"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matches values that are greater than 10000 and less than 20000. This filter can be applied to numeric fields only."]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note that more than one expression can be used as a filter value and parentheses can be used to specify grouping. E.g.: (Hello AND NOT Rachel) OR (Farewell AND Monica)."]}]}]},"headings":[{"value":"Filter Expression","id":"filter-expression","depth":1}],"frontmatter":{"seo":{"title":"filter expressions","description":"Email filter expressions help you quickly find and analyze specific email data."}},"lastModified":"2026-10-28T19:46:32.475Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/mailgun/user-manual/events/filter-expressions","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}