Autocomplete

Autocomplete companies

Auto complete the name search.

Cost: 1 credit per request if a result is returned.

POST
/v2/autocomplete/companies

Query Parameters

apiToken?string | null

Header Parameters

x-api-token?string | null
namestring

Beginning of the name or the domain of a company

Example"ocea"
countryFilters?array<string>

List of countries to filter for the autocompletion

Example["dk","se"]
excludeDomains?array<string>

List of domains to exclude from the results

Example["ocean.com"]

Response Body

curl -X POST "https://api.ocean.io/v2/autocomplete/companies?apiToken=string" \
  -H "x-api-token: string" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ocea"
  }'
{
  "companies": [
    {
      "domain": "ocean.io",
      "logo": "https://cdn2.ocean.io/companies-logos-v1/domain.com/020539e284d9318e805301b672ad23047c30818a.png",
      "name": "Ocean"
    }
  ]
}
{
  "detail": "Conflicting API tokens provided in query parameters and headers"
}
{
  "detail": "Insufficient credits"
}
{
  "detail": "API token should be provided in headers or query parameters"
}
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}