query when mode is ludicrous. The query uses seven operators. equals, in, range and text each take a field name and a value and produce one condition. and, or and not take conditions and combine them.
This page describes each operator’s value shape, how operators nest, which operators each field type accepts and the validation errors a malformed query returns. Field names are listed on Company search and People search.
Which operators does a structured query accept?
and, or and not take conditions as children. equals, in, range and text take a field name and a value. The text example uses current_title, a people field. The other examples use company fields.
How do you combine conditions?
Logical operators nest. In the request below, anor condition is a child of and. This company request matches software or technology companies in the US or GB, excluding records whose organization type is Educational. The highlighted lines are the query object:
in on one field matches the same records as an or of equals conditions on that field.
How does text matching work?
Atext condition contains a string, as in the company request above, or an object with value and mode. mode: "all" requires every word in value to appear in the field, in any order and position. This people request matches titles containing all of machine, learning and engineer:
mode takes one of these values. No mode matches an exact phrase:
top-k caps how many candidate records the text condition retrieves, 100 by default.
How do you express a numeric bound?
range takes a field name and one or two comparison keys. Two keys give a closed interval. This company request matches 50 to 500 employees on record:
{ "followers": { ">=": 1000 } }.
Which operators does each field type accept?
The operator a field accepts depends on the field type. Sending an operator the type does not support returns HTTP 400 with a message naming the field, the operator and the types the operator supports.
Field names differ by category. The full lists are on Company search and People search. A field that appears in
view output is not necessarily searchable: people connections is returned in summary but cannot be used in a range condition.
Which queries are rejected?
Business Search validates the request before running a search. A rejected request returns HTTP 400 with a message naming the property at fault. The request is not searched and not billed.
Rejections outside the
query object, such as an invalid limit, an unknown view field or a natural-language query longer than 200 characters, are listed under Why was a request rejected? on the Business Search error codes page.
Frequently asked questions
Does the query object change between company and people searches?
The operators are identical. The field names are not. The company category usesindustry, headquarters_country_code and linkedin_followers. The people category uses current_title, country_code and followers. See Company search and People search.
Can I use a structured query with Instant or Smart mode?
No.ludicrous takes a structured object, and instant and smart take a natural-language string. A mismatch is rejected with HTTP 400: an object in Instant returns request: "query" must be a string, and a string in Ludicrous returns request: "query" must be of type object. See What is Business Search?.