Search for contacts by email, name, phone number, or company
curl --request GET \
--url https://api.hubapi.com/contacts/v1/search/queryimport requests
url = "https://api.hubapi.com/contacts/v1/search/query"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/contacts/v1/search/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/contacts/v1/search/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/contacts/v1/search/query"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hubapi.com/contacts/v1/search/query")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/contacts/v1/search/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"{ \"query\": \"testingapis\", \"offset\": 1, \"has-more\": false, \"total\": 1, \"contacts\": [ { \"vid\": 3234574, \"canonical-vid\": 3234574, \"merged-vids\": [ ], \"portal-id\": 62515, \"is-contact\": true, \"properties\": { \"hs_analytics_last_url\": { \"value\": \"\" }, \"lead_source\": { \"value\": \"DiscoverOrg\" }, \"num_unique_conversion_events\": { \"value\": \"0\" }, \"hs_analytics_revenue\": { \"value\": \"0.0\" }, \"createdate\": { \"value\": \"1484026585538\" }, \"hs_analytics_first_referrer\": { \"value\": \"\" }, \"hs_email_optout\": { \"value\": \"true\" }, \"hs_predictivecontactscore\": { \"value\": \"50\" }, \"annualrevenue\": { \"value\": \"181900000\" }, \"hs_analytics_num_page_views\": { \"value\": \"0\" }, \"state\": { \"value\": \"MA\" }, \"zip\": { \"value\": \"02139\" }, \"fortune_rank\": { \"value\": \"\" }, \"hs_predictivecontactscorebucket\": { \"value\": \"bucket_3\" }, \"hubspotscore\": { \"value\": \"0\" }, \"linkedinconnections\": { \"value\": \"0\" }, \"hs_lifecyclestage_subscriber_date\": { \"value\": \"1484026585538\" }, \"hs_analytics_average_page_views\": { \"value\": \"0\" }, \"lastname\": { \"value\": \"Test\" }, \"twitterhandle\": { \"value\": \"ghidinelli\" }, \"phone\": { \"value\": \"555-122-2323\" }, \"num_conversion_events\": { \"value\": \"0\" }, \"currentlyinworkflow\": { \"value\": \"false\" }, \"hs_analytics_num_event_completions\": { \"value\": \"2\" }, \"followercount\": { \"value\": \"582\" }, \"hs_email_optout_2849\": { \"value\": \"\" }, \"associatedcompanyid\": { \"value\": \"184896670\" }, \"firstname\": { \"value\": \"HubSpot\" }, \"city\": { \"value\": \"Cambridge\" }, \"hs_email_optout_354586\": { \"value\": \"\" }, \"hs_social_num_broadcast_clicks\": { \"value\": \"0\" }, \"hs_analytics_last_timestamp\": { \"value\": \"\" }, \"hs_analytics_num_visits\": { \"value\": \"0\" }, \"twitterbio\": { \"value\": \"Racer, entrepreneur, world traveler. Crossfitter, foodie, kitesurfing newbie. If racing is life, I'm building a lifestyle business @MotorsportReg @RaceHeroApp\" }, \"hs_social_linkedin_clicks\": { \"value\": \"0\" }, \"hs_analytics_last_visit_timestamp\": { \"value\": \"\" }, \"hs_social_last_engagement\": { \"value\": \"\" }, \"hs_twitterid\": { \"value\": \"49019793\" }, \"associatedcompanylastupdated\": { \"value\": \"13365279006997343\" }, \"hs_analytics_source\": { \"value\": \"OFFLINE\" }, \"company\": { \"value\": \"HubSpot\" }, \"email\": { \"value\": \"testingapis@hubspot.com\" }, \"linkedinbio\": { \"value\": \"Racecar driver, entrepreneur, world traveler\" }, \"hs_analytics_first_url\": { \"value\": \" }, \"website\": { \"value\": \" }, \"address\": { \"value\": \"25 First Street\" }, \"hs_analytics_first_visit_timestamp\": { \"value\": \"\" }, \"hs_analytics_first_timestamp\": { \"value\": \"1484026585538\" }, \"lastmodifieddate\": { \"value\": \"1484859513090\" }, \"photo\": { \"value\": \" }, \"hs_social_google_plus_clicks\": { \"value\": \"0\" }, \"hs_analytics_last_referrer\": { \"value\": \"\" }, \"kloutscoregeneral\": { \"value\": \"48\" }, \"hs_email_optout_230318\": { \"value\": \"\" }, \"hs_social_facebook_clicks\": { \"value\": \"0\" }, \"twitterprofilephoto\": { \"value\": \" }, \"hs_analytics_source_data_2\": { \"value\": \"\" }, \"hs_social_twitter_clicks\": { \"value\": \"0\" }, \"hs_analytics_source_data_1\": { \"value\": \"API\" }, \"lifecyclestage\": { \"value\": \"subscriber\" }, \"hs_email_sends_since_last_engagement\": { \"value\": \"0\" } }, \"form-submissions\": [ ], \"identity-profiles\": [ { \"vid\": 3234574, \"saved-at-timestamp\": 0, \"deleted-changed-timestamp\": 0, \"identities\": [ { \"type\": \"EMAIL\", \"value\": \"testingapis@hubspot.com\", \"timestamp\": 1484026585538 }, { \"type\": \"LEAD_GUID\", \"value\": \"4b11f8af-50d9-4665-9c43-bb2fc46e3a80\", \"timestamp\": 1484026585610 } ] } ], \"merge-audits\": [ ] } ] }"v1
Search for contacts by email, name, phone number, or company
The search contacts endpoint is used to search for contacts by email, name, phone number, or company. This endpoint returns search results in a paginated format and accepts a query string to search across contact properties.
GET
/
contacts
/
v1
/
search
/
query
Search for contacts by email, name, phone number, or company
curl --request GET \
--url https://api.hubapi.com/contacts/v1/search/queryimport requests
url = "https://api.hubapi.com/contacts/v1/search/query"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/contacts/v1/search/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/contacts/v1/search/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/contacts/v1/search/query"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hubapi.com/contacts/v1/search/query")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/contacts/v1/search/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"{ \"query\": \"testingapis\", \"offset\": 1, \"has-more\": false, \"total\": 1, \"contacts\": [ { \"vid\": 3234574, \"canonical-vid\": 3234574, \"merged-vids\": [ ], \"portal-id\": 62515, \"is-contact\": true, \"properties\": { \"hs_analytics_last_url\": { \"value\": \"\" }, \"lead_source\": { \"value\": \"DiscoverOrg\" }, \"num_unique_conversion_events\": { \"value\": \"0\" }, \"hs_analytics_revenue\": { \"value\": \"0.0\" }, \"createdate\": { \"value\": \"1484026585538\" }, \"hs_analytics_first_referrer\": { \"value\": \"\" }, \"hs_email_optout\": { \"value\": \"true\" }, \"hs_predictivecontactscore\": { \"value\": \"50\" }, \"annualrevenue\": { \"value\": \"181900000\" }, \"hs_analytics_num_page_views\": { \"value\": \"0\" }, \"state\": { \"value\": \"MA\" }, \"zip\": { \"value\": \"02139\" }, \"fortune_rank\": { \"value\": \"\" }, \"hs_predictivecontactscorebucket\": { \"value\": \"bucket_3\" }, \"hubspotscore\": { \"value\": \"0\" }, \"linkedinconnections\": { \"value\": \"0\" }, \"hs_lifecyclestage_subscriber_date\": { \"value\": \"1484026585538\" }, \"hs_analytics_average_page_views\": { \"value\": \"0\" }, \"lastname\": { \"value\": \"Test\" }, \"twitterhandle\": { \"value\": \"ghidinelli\" }, \"phone\": { \"value\": \"555-122-2323\" }, \"num_conversion_events\": { \"value\": \"0\" }, \"currentlyinworkflow\": { \"value\": \"false\" }, \"hs_analytics_num_event_completions\": { \"value\": \"2\" }, \"followercount\": { \"value\": \"582\" }, \"hs_email_optout_2849\": { \"value\": \"\" }, \"associatedcompanyid\": { \"value\": \"184896670\" }, \"firstname\": { \"value\": \"HubSpot\" }, \"city\": { \"value\": \"Cambridge\" }, \"hs_email_optout_354586\": { \"value\": \"\" }, \"hs_social_num_broadcast_clicks\": { \"value\": \"0\" }, \"hs_analytics_last_timestamp\": { \"value\": \"\" }, \"hs_analytics_num_visits\": { \"value\": \"0\" }, \"twitterbio\": { \"value\": \"Racer, entrepreneur, world traveler. Crossfitter, foodie, kitesurfing newbie. If racing is life, I'm building a lifestyle business @MotorsportReg @RaceHeroApp\" }, \"hs_social_linkedin_clicks\": { \"value\": \"0\" }, \"hs_analytics_last_visit_timestamp\": { \"value\": \"\" }, \"hs_social_last_engagement\": { \"value\": \"\" }, \"hs_twitterid\": { \"value\": \"49019793\" }, \"associatedcompanylastupdated\": { \"value\": \"13365279006997343\" }, \"hs_analytics_source\": { \"value\": \"OFFLINE\" }, \"company\": { \"value\": \"HubSpot\" }, \"email\": { \"value\": \"testingapis@hubspot.com\" }, \"linkedinbio\": { \"value\": \"Racecar driver, entrepreneur, world traveler\" }, \"hs_analytics_first_url\": { \"value\": \" }, \"website\": { \"value\": \" }, \"address\": { \"value\": \"25 First Street\" }, \"hs_analytics_first_visit_timestamp\": { \"value\": \"\" }, \"hs_analytics_first_timestamp\": { \"value\": \"1484026585538\" }, \"lastmodifieddate\": { \"value\": \"1484859513090\" }, \"photo\": { \"value\": \" }, \"hs_social_google_plus_clicks\": { \"value\": \"0\" }, \"hs_analytics_last_referrer\": { \"value\": \"\" }, \"kloutscoregeneral\": { \"value\": \"48\" }, \"hs_email_optout_230318\": { \"value\": \"\" }, \"hs_social_facebook_clicks\": { \"value\": \"0\" }, \"twitterprofilephoto\": { \"value\": \" }, \"hs_analytics_source_data_2\": { \"value\": \"\" }, \"hs_social_twitter_clicks\": { \"value\": \"0\" }, \"hs_analytics_source_data_1\": { \"value\": \"API\" }, \"lifecyclestage\": { \"value\": \"subscriber\" }, \"hs_email_sends_since_last_engagement\": { \"value\": \"0\" } }, \"form-submissions\": [ ], \"identity-profiles\": [ { \"vid\": 3234574, \"saved-at-timestamp\": 0, \"deleted-changed-timestamp\": 0, \"identities\": [ { \"type\": \"EMAIL\", \"value\": \"testingapis@hubspot.com\", \"timestamp\": 1484026585538 }, { \"type\": \"LEAD_GUID\", \"value\": \"4b11f8af-50d9-4665-9c43-bb2fc46e3a80\", \"timestamp\": 1484026585610 } ] } ], \"merge-audits\": [ ] } ] }"Scope requirements
Scope requirements
Query Parameters
Response
200 - application/json
Successful response - Search results for contacts matching the query
The response is of type object.
Last modified on March 30, 2026
Was this page helpful?