post /v2/autocomplete/companies

Autocomplete companies

Auto complete the name search
Endpoint POST /v2/autocomplete/companies
Credit cost 0.1 credits / call
Response Synchronous — up to 15 results
When to use Power a type-ahead input for selecting seed companies in a lookalike search

Quickstart#

Pass the beginning of a company name or domain. Results are ranked by relevance.

curl -X POST "https://api.ocean.io/v2/autocomplete/companies" \
  -H "X-Api-Token: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "stripe"
  }'
import requests

response = requests.post(
    'https://api.ocean.io/v2/autocomplete/companies',
    headers={'X-Api-Token': 'YOUR_API_TOKEN'},
    json={'name': 'stripe'},
)
data = response.json()
const response = await fetch('https://api.ocean.io/v2/autocomplete/companies', {
  method: 'POST',
  headers: { 'X-Api-Token': 'YOUR_API_TOKEN', 'Content-Type': 'application/json' },
  body: JSON.stringify({ name: 'stripe' }),
});
const data = await response.json();

Example response:

{
  "companies": [
    { "domain": "stripe.com", "name": "Stripe", "logo": "https://cdn2.ocean.io/companies-logos-v1/stripe.com/..." },
    { "domain": "stripedhorse.com", "name": "Striped Horse Brewery", "logo": null }
  ]
}

Use the domain from the selected result as a lookalikeDomains seed in Search Companies or Search People.


Parameters#

Parameter Type Description
name string Required. Beginning of the company name or domain.
countryFilters string[] Optional. Narrow results to specific countries (ISO alpha-2 codes, e.g. ["us", "gb"]).
excludeDomains string[] Optional. Domains to omit from results.
forLookalikeSearch boolean Default true. When true, filters out domains unsuitable as lookalike seeds (bad content, crawl failures, etc.). Set to false only if you're not using results as lookalike seeds.

Authorizations

apiToken string
x-api-token string

Body application/json

name string Required
Beginning of the name or the domain of a company
List of countries to filter for the autocompletion
Array of string
List of domains to exclude from the results
Array of string
forLookalikeSearch boolean
When `false`, returns all matching companies without domain validation or status filters. WARNING: Do not set this parameter to `false` if the autocomplete results will be used as input for a lookalike search.

Responses

200 Successful Response
Array of found companies. Returns empty array if no results
Array of AutoCompletionCompany
domain string Required
Domain of the company, used as a unique identifier
logo string
Logo of the company (URL)
name string
Name of the company
400 Bad Request
detail enum Required
"Conflicting API tokens provided in query parameters and headers"
402 Payment Required
detail enum Required
"Insufficient credits"
403 Forbidden
detail enum Required
"API token should be provided in headers or query parameters""Current API token is not registered in our database"
404 Not found
422 Validation Error
Array of ValidationError
Array of string | integer
string | integer
msg string Required
type string Required
input any
object