Search for Prospects by various criteria.
Note the (search type) in the URL. This must be specified, and it must be one of "city", "region", or "country".
| Required Parameters | How to use | Description |
|---|---|---|
| HubSpot OAuth Access Token | access_token=X - Used in the request URL | The HubSpot API key for the portal that you're making the call for. |
| Search Type | Used in the request URL | The search type. Must be one of: "city", "region" or "country" |
| Search Query | &q=X - Used in the request URL | Your search query, based on the search type parameter above. |
| Optional Parameters | How to use | Description |
|---|---|---|
| Time Offset | &timeOffset=X - Used in the request URL | If specified, start the prospect timeline at the given point in time, meaning only prospects from the time you specify to the current time will be returned. This timestamp, as with all HubSpot timestamps is milliseconds since the Unix epoch, UTC, so you can use a web site like http://epochconverter.com when testing. |
| Organization Offset | &orgOffset=X - Used in the request URL | If specified, start the prospect timeline at the given organization. The organization name should match one of the organizations returned in previous called to this method, the typeahead or search methods. |
Example URL: https://api.hubapi.com/prospects/v1/search/city?access_token=demooooo-oooo-oooo-oooo-oooooooooooo&q=Cambridge
Example JSON response. It's displaying 4 prospects from organizations that are located in Cambridge:
{
"prospects": [
{
"slug": "massachusetts-institute-of-technology",
"organization": "MASSACHUSETTS INSTITUTE OF TECHNOLOGY",
"page-views": 1,
"visitors": 1,
"timestamp": 1323019070,
"city": "CAMBRIDGE",
"region": "MASSACHUSETTS",
"country": "UNITED STATES",
"url": "MIT.EDU",
"leads": 0,
"longitude": -71.10965,
"latitude": 42.37264,
"ip-address": "18.111.22.242",
"touches": [
{
"domain": "docs.hubapi.com",
"child-id": "167755"
}
]
},
{
"slug": "hubspot-inc",
"organization": "HUBSPOT INC",
"page-views": 97,
"visitors": 38,
"timestamp": 1322673279,
"city": "CAMBRIDGE",
"region": "MASSACHUSETTS",
"country": "UNITED STATES",
"url": "HUBSPOT.COM",
"leads": 3,
"longitude": -71.10965,
"latitude": 42.37264,
"ip-address": "63.139.127.6",
"touches": []
},
{
"slug": "bit-group",
"organization": "BIT GROUP",
"page-views": 1,
"visitors": 1,
"timestamp": 1321564220,
"city": "CAMBRIDGE",
"region": "MASSACHUSETTS",
"country": "UNITED STATES",
"url": "COMCASTBUSINESS.NET",
"leads": 0,
"longitude": -71.10965,
"latitude": 42.37264,
"ip-address": "74.94.128.241",
"touches": [
{
"domain": "docs.hubapi.com",
"child-id": "167755"
}
]
},
{
"slug": "microsoft",
"organization": "MICROSOFT",
"page-views": 1,
"visitors": 1,
"timestamp": 1311275888,
"city": "CAMBRIDGE",
"region": "MASSACHUSETTS",
"country": "UNITED STATES",
"url": "MICROSOFT.COM",
"leads": 0,
"longitude": -71.10965,
"latitude": 42.37264,
"ip-address": "64.119.130.114",
"touches": [
{
"domain": "docs.hubapi.com"
}
]
}
],
"has-more": false,
"org-offset": "microsoft",
"time-offset": 1311275888
}
HTTP Methods:
GET
Response Format:
json
Requires Authentication?
Yes
Rate Limited?
Headers