When you execute an API request, the query runs directly against our Person Dataset without any cleaning or preprocessing. This means that you have a lot of freedom to explore the dataset and return the perfect records for your particular use case. It also means that you will need to understand the available fields to make successful queries.
To help you identify how to best query for specific sub-entities (schools, companies, and locations), we offer a suite of Cleaner APIs.
We also provide a free Query Builder Tool to help write and test Elasticsearch queries for our Search APIs.
query value should align directly with the Elasticsearch DSL.
We accept the following Elasticsearch query types:
We've disabled most specialized options, such as boosting and custom scoring, and we do not allow aggregations.
Any array in a query (such as a
terms array) will have a hard limit of 1000 elements. If a request goes over this limit, it will fail.
|A SQL query of the format: |
We execute SQL queries using Elasticsearch SQL.
We will ignore any use of column selections or the
We limit the number of wildcard terms (using
%) to 20 per request. If a request goes over this limit, it will fail.
You must use subfields rather than top-level fields when making SQL queries. For example,
SELECT * FROM person WHERE experience IS NOT NULL will fail but
SELECT * FROM person WHERE experience.title.name IS NOT NULL will behave as expected.
|The maximum number of matched records to return for this query if they exist. Must be between |
fromparameter is deprecated. Use
|[LEGACY] An offset value for paginating between batches, which must between |
Note: You cannot use
|Each search API response returns a |
Unlike the legacy
Note: You cannot use
scroll_token returns in every Person Search API response and serves as a placeholder or bookmark for the last record received. For queries with more results than can fit in a single API response (see the
size field), use the
scroll_token to get the next batch of results.
For example, if you send a query to the Person Search API that has 10,000 matches, you will need multiple API calls to retrieve all the records. The
scroll_token represents how far along you are in that list of records.
Generally, the way to use
- Send a query to the Person Search API.
- Get a response back containing one batch of records as well as a
scroll_tokenresponse value (if you have already retrieved all the available records in this batch, then the
scroll_tokenvalue will be
- Use the same query from Step 1 and the
scroll_tokenyou just received to make another request to the Person Search API.
- Get another response back with the next batch of records and a new
- Repeat steps 3 and 4 until you have gotten the desired number of records back or until the
For a detailed working example of this process, see the following code example: Bulk Retrieval.
|Specifies which dataset(s) the API should search against.|
You can input multiple datasets by separating each with a comma.
Valid dataset names are:
See Person Stats for details about each dataset.
You can exclude dataset(s) by using
- as the first character. Entering
- will exclude all of the comma-separated datasets following the character and needs to be entered only once. For example,
"all,-phone,consumer_social" will include search results from every dataset except the phone and consumer_social datasets.
|All text in API responses returns as lowercase by default. Setting |
|Whether the output should have human-readable indentation.|
|Your secret API key.|
Your API Key must be included in either the request header or the
api_key parameter. For more information about request authentication, see the Authentication page.
Updated about 1 month ago