API integration

Sonar API allows you to retrieve data directly from Sonar database. The API currently provides two end points that return infographics, technographics as well as extra data for:

  • Domains

  • Emails

You need to retrieve the API key of your organisation to make calls with the API. The key can be found on the integrations page of your account.

Enrichment methods

get
Enrich a domain

https://api-public.purplesonar.com/api/v1/enrich/domain/:domain
This endpoint returns infographic data for any domain you input.
Request
Response
Request
Path Parameters
domain
required
string
Domain name of the company you would like to get data for.
Headers
Authentication
required
string
Authentication token in the form of: 'Bearer api_key'
Query Parameters
extra_fields
optional
string
Comma separated list of additional fields you want to be returned by Sonar. The only extra field we return for now is pricing.
Response
200: OK
Domain data found
{
"domain": "hellobonsai.com",
"technologies": [
"google cdn",
"firstpromoter",
"google analytics",
"facebook",
"intercom chat",
"mixpanel",
"customer.io",
"google tag manager",
"google apis",
"jquery",
"embed js",
"headway",
"stripe",
"typeform",
"google maps",
"inspectlet",
"segment",
"highcharts",
"google plus",
"ably",
"fontawesome cdn"
],
"alexa_rank": 22117,
"name": "Bonsai",
"social_linkedin_url": "linkedin.com/company/bonsai",
"social_facebook_url": null,
"social_twitter_url": "/bonsaiinc",
"year_founded": 2015,
"employees_range": "11-50",
"country": "United States",
"location": "San Francisco, California, United States",
"industry": "Information Technology And Services"
}
404: Not Found
Could not find a cake matching this query.
{
"message": "This domain hasn't been scanned yet"
}

get
Enrich an email

https://api-public.purplesonar.com/api/v1/enrich/email/:email
Similarly to the domain endpoint, you can enrich an email to get the associated company's infographics and technographic
Request
Response
Request
Path Parameters
email
required
string
Email of the company you would like to get data for.
Headers
Authentication
required
string
Authentication token in the form of: 'Bearer api_key'
Query Parameters
extra_fields
optional
string
Comma separated list of additional fields you want to be returned by Sonar. The only extra field we return for now is pricing.
Response
200: OK
Domain data found
{
"domain": "hellobonsai.com",
"technologies": [
"google cdn",
"firstpromoter",
"google analytics",
"facebook",
"intercom chat",
"mixpanel",
"customer.io",
"google tag manager",
"google apis",
"jquery",
"embed js",
"headway",
"stripe",
"typeform",
"google maps",
"inspectlet",
"segment",
"highcharts",
"google plus",
"ably",
"fontawesome cdn"
],
"alexa_rank": 22117,
"name": "Bonsai",
"social_linkedin_url": "linkedin.com/company/bonsai",
"social_facebook_url": null,
"social_twitter_url": "/bonsaiinc",
"year_founded": 2015,
"employees_range": "11-50",
"country": "United States",
"location": "San Francisco, California, United States",
"industry": "Information Technology And Services"
}
404: Not Found
Could not find a cake matching this query.
{
"message": "This domain hasn't been scanned yet"
}

Extra fields

We return extra optional fields on demand if the extra_fields parameter exists in the url.

We only return the extra pricing field for now. For example, if you add the pricing extra_field below:

https://api-public.purplesonar.com/api/v1/domains/:domain?extra_fields=pricing

Sonar will append the returned response with a pricing object as follow:

"pricing": {
"pricing_page": "https://www.acme.com/pricing/",
"subscription": {
"has_trial": true,
"has_annual_plan": null,
"has_monthly_plan": true
}
}

Note that every key in the pricing object can be null (like 'subscription').

New keys might also be added overtime.