Reference - Autocomplete API
Endpoint
The endpoint for the Autocomplete API is: https://api.peopledatalabs.com/v5/autocomplete
.
Autocomplete API Access and Billing
By default, all active API keys have free access to the Autocomplete API.
When monitoring usage, each call to the Autocomplete API counts against the daily rate limit, regardless of the records available.
Rate Limiting
Our default limit for self-serve customers is 60 requests per minute and 1,000 requests per day. For enterprise customers, we offer rate limits of up to 1,200 requests per minute. If you are interested in higher rate limits, please reach out to us.
Input Parameters
For More Details, See Input Parameters - Autocomplete API.
You can also click on the individual parameter names in the table below to view more information on them.
Parameter Name | Required | Description | Default | Example |
---|---|---|---|---|
field | Yes | The field that the API will perform autocompletion upon. | None | title |
text | No | The text that the API will use as the seed for autocompletion. | "" | tesl |
size | No | The number of results that the API should return, which must be between 1 and 100 . | 10 | 100 |
titlecase | No | All text in API responses returns as lowercase by default. Setting titlecase to true will titlecase any records returned instead. | false | true |
pretty | No | Whether the output should have human-readable indentation. | false | true |
api_key | No* | Your secret API key. While we do not require this as part of the request parameters, if you do not provide it here, then you must provide it using an alternative means, such as in the headers using the x-api-key field. For more information, see the Authentication page. | None |
Output Response
For More Details, See Output Response - Autocomplete API
You can also click the field names in the table below to view more information on them.
Field Name | Type | Description |
---|---|---|
fields | Array (String) | The list of fields in the Person Schema that the Autocomplete API has returned suggestions for. It determines these based on the value that you used for the field input parameter. |
data | Array (Object) | The list of suggestions that the Autocomplete API has returned. It sorts results in descending order based on the data.count subfield (with the highest counts first.) The size input parameter determines the size of the list. |
data.count | Int | The number of records in our Person Dataset (resume slice) for this Autocomplete API suggestion. The API uses this field for sorting elements in the data array. |
data.name | String | The plain text name of the Autocomplete API suggestion. For example, company name, school name, location name, title and so forth. The prefix of this field will match the value of the text input parameter. |
data.meta | Object | A set of additional fields that the API returns for each result in the data array. The metadata fields depend on the field input parameter. See the mapping between field values (input parameter) and meta (output fields) here. |
status | Int | The API response code. |
Abridged Response Data Structure
Here is an example response from the Autocomplete API when querying for field = "company"
and text = "goog"
(See a full example response in the next section.)
{
"data": [
{
"name": "Google",
"count": 197302,
"meta": {
"id": "aKCIYBNF9ey6o5CjHCCO4goHYKlf",
"website": "google.com",
"industry": "Internet",
"location_name": "Mountain View, California, United States",
"display_name": "Google",
"display_name_history": [
"Google"
],
"alternative_names": [
"\u8c37\u6b4c",
"Google, Social Marketing Tools",
"\uad6c\uae00",
"Google Inc.",
"Google Pay",
"Google, Inc.",
"Google Deepmind",
"Google Inc",
"Google Digital Skills for Africa",
"Google, Inc"
]
}
},
...
],
"fields": [
"job_company_name",
"experience.company.name"
],
"status": 200
}
Full Example Response (Autocomplete API - School Index)
Input Query (click to toggle)
import json
# See https://github.com/peopledatalabs/peopledatalabs-python
from peopledatalabs import PDLPY
# Create a client, specifying an API key
client = PDLPY(
api_key="YOUR API KEY",
)
params = {
"field": "school",
"text": "harv",
"size": 10,
"pretty": True
}
json_response = client.autocomplete(**params).json()
print(json_response)
Output Response (full):
{
"data": [
{
"name": "harvard university",
"count": 1927529,
"meta": {
"id": "3533/1_nmK6OO9uG-7wiyTDSIrDiA_0",
"website": "harvard.edu",
"location_name": "cambridge, massachusetts, united states"
}
},
{
"name": "harvard business school",
"count": 220817,
"meta": {
"id": "3533/1_qBjTBJNpBK2gzteZ59vd8A_0",
"website": "hbs.edu",
"location_name": "boston, massachusetts, united states"
}
},
{
"name": "harvard - westlake school",
"count": 124263,
"meta": {
"id": "3533/1_NH1qPhIlKjFKZ1nf2Qgt3g_0",
"website": "hw.com",
"location_name": "studio city, california, united states"
}
},
{
"name": "harvard law school",
"count": 96958,
"meta": {
"id": "3533/1_teCnNBZuJ7ec9lfQzEOvyg_0",
"website": "hls.harvard.edu",
"location_name": "cambridge, massachusetts, united states"
}
},
{
"name": "harvard business school online",
"count": 70877,
"meta": {
"id": "3533/1_UB212jNfQFFVng4KfGkYlQ_0",
"website": "online.hbs.edu",
"location_name": "boston, massachusetts, united states"
}
},
{
"name": "harvard medical school",
"count": 61403,
"meta": {
"id": "3533/1_YNnwi4r2jhgVlAvd7O400Q_0",
"website": "hms.harvard.edu",
"location_name": "boston, massachusetts, united states"
}
},
{
"name": "harvard extension school",
"count": 38259,
"meta": {
"id": "3861/1_hJfk3w2iEDrBWBdwlSOyzg_0"
}
},
{
"name": "harvard graduate school of education",
"count": 31485,
"meta": {
"id": "3533/1_R-t9DblDP5zWHDnIlJjY9g_0",
"website": "gse.harvard.edu",
"location_name": "cambridge, massachusetts, united states"
}
},
{
"name": "harvard kennedy school",
"count": 30697,
"meta": {
"id": "3533/1_nTJjAd36aI1cfDBojvtlHA_0",
"website": "hks.harvard.edu",
"location_name": "cambridge, massachusetts, united states"
}
},
{
"name": "harvard business school executive education",
"count": 27768,
"meta": {
"id": "3533/1_HTv2bAJvLvwEEeG0ai63BQ_0",
"website": "hbs.me",
"location_name": "boston, massachusetts, united states"
}
}
],
"fields": [
"education.school.name"
],
"status": 200
}
Errors
If the request encounters an error, it will instead return an Error Response in the format described in Errors.
Updated 3 months ago