Boolean Search Syntax
Learn how to use boolean operators (AND, OR, NOT) to build precise search queries for the Enrich Layer API.
Several Enrich Layer API parameters accept Boolean Search Syntax for filtering results. This guide covers all supported operators and practical examples.
Operators
AND (&&)
Combines terms so results include all specified keywords.
bananas && applesReturns only results mentioning both "bananas" and "apples".
OR (||)
Retrieves results containing either term (or both).
bananas || applesCaptures results with one or both words.
NOT (-)
Excludes specified terms from results.
bananas -applesReturns results mentioning "bananas" while filtering out any that mention "apples".
Exact Phrase (" ")
Wrapping terms in double quotes matches the exact phrase.
"banana bread"Ensures results contain the precise phrase "banana bread", not just "banana" and "bread" separately.
Grouping (( ))
Parentheses group expressions to control evaluation order, similar to math expressions.
(bananas || apples) && breadFinds results about "bread" paired with either "bananas" or "apples".
Wildcard (*)
The asterisk matches partial words (suffix matching).
star*Matches "star", "stars", "start", "startup", etc.
Constraint: Wildcards cannot lead a query. *apple is invalid; use apple* instead.
Practical Examples
Employee title search
Find engineering managers excluding directors:
"engineering manager" -directorMultiple role variations
Search for any VP-level title:
("vice president" || VP) && (engineering || technology)Broad keyword with exclusion
"data scientist" -intern -juniorCombined logic
(CTO || "chief technology officer") && (startup || "series a")Usage Limits
- Each search expression is limited to 255 characters
- Operators are case-insensitive (
ANDandandboth work) - Nested parentheses are supported for complex queries
API Parameters Using Boolean Search
The following API parameters accept Boolean Search Syntax:
| Endpoint | Parameter | Description |
|---|---|---|
| Person Search | current_role_title | Filter by current job title |
| Person Search | past_role_title | Filter by past job title |
| Company Search | keyword_boolean | Search by job title keyword |
| Employee Search | boolean_role_search | Filter employees by title |
| Job Search | keyword_boolean | Filter jobs by title keyword |