Generate suggestions for eleven different fields as soon as users start typing.
Suggestions are ranked using frequency of occurrence across our person dataset.
Directly pass suggestions into queries for our Person and Company Search APIs.
1import requests, json
2
3# Set your API key
4API_KEY = "YOUR API KEY"
5
6# Set the Autocomplete API URL
7PDL_URL = "https://api.peopledatalabs.com/v5/autocomplete"
8
9# Create a parameters JSON object
10PARAMS = {
11 "api_key": API_KEY,
12 "field": "school",
13 "text": "stanf",
14 "size": 10,
15 "pretty": True
16}
17
18# Pass the parameters object to the Autocomplete API
19json_response = requests.get(PDL_URL, params=PARAMS).json()
20
21# Print the API response in JSON format
22print(json_response)
The Autocomplete API is built to power better search experiences.
Specify the type of field you would like to generate an autocomplete suggestion for. Choose from 11 different fields including: job title, company, location, school, industries, roles/subroles, skills, majors, and more.
Send an API call with the text from your input field as you type.
Get up to 100 autocomplete suggestions ranked by frequency with each call. When a search is executed, feed results into the Person or Company Search API as query parameters.