Filter Operators
Complete reference for all filter operators available in Bounty Lab search APIs.
Filters use the {field, op, value} pattern to narrow search results. This page documents all available operators and their usage.
Filter Structure
Section titled “Filter Structure”Every filter follows this structure:
{ "field": "fieldName", "op": "OperatorName", "value": "value"}Equality Operators
Section titled “Equality Operators”Match exact values or check membership in a set.
Eq (Equal)
Section titled “Eq (Equal)”Exact match for a single value.
{ "field": "language", "op": "Eq", "value": "TypeScript" }NotEq (Not Equal)
Section titled “NotEq (Not Equal)”Exclude a single value.
{ "field": "language", "op": "NotEq", "value": "HTML" }Match any value in a list.
{ "field": "language", "op": "In", "value": ["Python", "JavaScript", "Go"] }Exclude all values in a list.
{ "field": "language", "op": "NotIn", "value": ["HTML", "CSS", "Markdown"] }Comparison Operators
Section titled “Comparison Operators”Compare numeric or datetime values.
Gte (Greater Than or Equal)
Section titled “Gte (Greater Than or Equal)”Value must be greater than or equal to the specified amount.
{ "field": "stargazerCount", "op": "Gte", "value": 1000 }Lte (Less Than or Equal)
Section titled “Lte (Less Than or Equal)”Value must be less than or equal to the specified amount.
{ "field": "stargazerCount", "op": "Lte", "value": 50000 }Gt (Greater Than)
Section titled “Gt (Greater Than)”Value must be strictly greater than the specified amount.
{ "field": "totalIssuesOpen", "op": "Gt", "value": 10 }Lt (Less Than)
Section titled “Lt (Less Than)”Value must be strictly less than the specified amount.
{ "field": "totalIssuesOpen", "op": "Lt", "value": 100 }Pattern Matching Operators
Section titled “Pattern Matching Operators”Match strings using patterns or regular expressions.
Case-sensitive glob pattern matching with wildcards (*, ?).
{ "field": "ownerLogin", "op": "Glob", "value": "google*" }NotGlob
Section titled “NotGlob”Exclude matches for a case-sensitive glob pattern.
{ "field": "ownerLogin", "op": "NotGlob", "value": "test*" }Case-insensitive glob pattern matching.
{ "field": "ownerLogin", "op": "IGlob", "value": "Google*" }NotIGlob
Section titled “NotIGlob”Exclude matches for a case-insensitive glob pattern.
{ "field": "name", "op": "NotIGlob", "value": "*deprecated*" }Full regular expression matching.
{ "field": "name", "op": "Regex", "value": "^react-.*-components?$" }Array Operators
Section titled “Array Operators”Operate on array fields.
Contains
Section titled “Contains”Array must contain the specified value.
{ "field": "lastContributorLocations", "op": "Contains", "value": "San Francisco"}NotContains
Section titled “NotContains”Array must not contain the specified value.
{ "field": "lastContributorLocations", "op": "NotContains", "value": "Unknown" }ContainsAny
Section titled “ContainsAny”Array must contain at least one value from the list.
{ "field": "lastContributorLocations", "op": "ContainsAny", "value": ["San Francisco", "New York", "Seattle"]}NotContainsAny
Section titled “NotContainsAny”Array must not contain any values from the list.
{ "field": "lastContributorLocations", "op": "NotContainsAny", "value": ["Unknown", "N/A"]}Full-Text Search Operator
Section titled “Full-Text Search Operator”ContainsAllTokens
Section titled “ContainsAllTokens”Tokenized text search that handles formatting variations automatically. Use this for location fields, bios, descriptions, and other free-text fields.
{ "field": "resolvedCity", "op": "ContainsAllTokens", "value": "San Francisco" }Why use ContainsAllTokens?
- Handles case variations: “san francisco” matches “San Francisco”
- Handles formatting: “SF, California” matches “San Francisco”
- Tokenizes input: searches for all words in the value
Best for these fields:
location,resolvedCity,resolvedState,resolvedCountrybio,companydescription,readmePreviewlastContributorLocations
Example - Location search:
{ "field": "resolvedCity", "op": "ContainsAllTokens", "value": "San Francisco"}This matches users with locations like:
- “San Francisco, CA”
- “san francisco”
- “SF, San Francisco Bay Area”
Composite Operators
Section titled “Composite Operators”Combine multiple filters with boolean logic.
All conditions must match.
{ "op": "And", "filters": [ { "field": "language", "op": "Eq", "value": "Python" }, { "field": "stargazerCount", "op": "Gte", "value": 1000 } ]}Any condition can match.
{ "op": "Or", "filters": [ { "field": "resolvedCity", "op": "ContainsAllTokens", "value": "San Francisco" }, { "field": "resolvedCity", "op": "ContainsAllTokens", "value": "New York" } ]}Negate a filter condition.
{ "op": "Not", "filter": { "field": "language", "op": "Eq", "value": "HTML" }}Complex Filter Examples
Section titled “Complex Filter Examples”Find TypeScript repos with 1000+ stars in specific locations
Section titled “Find TypeScript repos with 1000+ stars in specific locations”{ "op": "And", "filters": [ { "field": "language", "op": "Eq", "value": "TypeScript" }, { "field": "stargazerCount", "op": "Gte", "value": 1000 }, { "op": "Or", "filters": [ { "field": "lastContributorLocations", "op": "ContainsAllTokens", "value": "San Francisco" }, { "field": "lastContributorLocations", "op": "ContainsAllTokens", "value": "Seattle" } ] } ]}Find users at specific companies in the US
Section titled “Find users at specific companies in the US”{ "op": "And", "filters": [ { "field": "company", "op": "In", "value": ["Google", "Meta", "Apple"] }, { "field": "resolvedCountry", "op": "ContainsAllTokens", "value": "United States" } ]}Exclude certain languages and require quality threshold
Section titled “Exclude certain languages and require quality threshold”{ "op": "And", "filters": [ { "field": "language", "op": "NotIn", "value": ["HTML", "CSS", "Markdown"] }, { "field": "stargazerCount", "op": "Gte", "value": 100 }, { "field": "totalIssuesClosed", "op": "Gte", "value": 10 } ]}Operator Summary Table
Section titled “Operator Summary Table”| Operator | Value Type | Description |
|---|---|---|
Eq | string/number | Exact match |
NotEq | string/number | Not equal |
In | array | Match any in list |
NotIn | array | Match none in list |
Lt | number | Less than |
Lte | number | Less than or equal |
Gt | number | Greater than |
Gte | number | Greater than or equal |
Glob | string | Case-sensitive wildcard |
NotGlob | string | Exclude case-sensitive wildcard |
IGlob | string | Case-insensitive wildcard |
NotIGlob | string | Exclude case-insensitive wildcard |
Regex | string | Regular expression |
Contains | any | Array contains value |
NotContains | any | Array doesn’t contain value |
ContainsAny | array | Array contains any value |
NotContainsAny | array | Array contains no values |
ContainsAllTokens | string | Full-text tokenized search |
And | filters[] | All must match |
Or | filters[] | Any can match |
Not | filter | Negate condition |