Skip to main content

Search Companies

Endpoint Overview

This endpoint allows for retrieving companies within the profileAPI database, supporting advanced query capabilities to filter and return specific company details.

Endpoint Details

  • URL: https://api.profileapi.com/2024-03-01/companies
  • HTTP Method: GET

Request Parameters

Utilize the following parameters to refine your search and retrieve tailored company information:

ParameterTypeDescriptionExample
expressionobjectAllows for complex filtering with conditions that need to be all satisfied, any satisfied, or excluded.See Expression Structure below
limitintegerDefines the maximum number of results to return. Defaults to 10 with a maximum allowable of 1000.100
fieldsArray of stringSpecifies which fields to return from the company object model. If unspecified, all fields are returned.["websiteTopics", "industries"]

Expression Structure

The expression parameter facilitates flexible, advanced filtering:

  • all: All specified conditions must be met. Optionally, exclude certain conditions.
  • any: At least one of the specified conditions must be met.

Example of Expression Structure:

{
"all": [
{
"categoryKey": "country",
"name": "United States"
},
{
"categoryKey": "usState",
"name": "CA",
"exclude": true
}
],
"any": [
{"categoryKey": "businessModels", "name": "Subscription"},
{"categoryKey": "businessModels", "name": "Freemium"}
]
}

Response Structure

The response encapsulates metadata and a data array displaying companies that match the query. Responses are sorted by relevance, with the most pertinent results appearing first.

Example of Data in Response:

{
"data": {
"items": [
{
"id": "9e6a55b258ef11edb8780242ac120002",
"name": "profileAPI, Inc",
"industry": "Technology",
"businessModels": ["Subscription"],
"industries": ["Technology", "Finance"]
},
{
"id": "9e6a55b258ef11edb8780242ac121233",
"name": "Another Company",
"industry": "Healthcare",
"businessModels": ["Freemium"],
"industries": ["Healthcare"]
}
],
"pagination": {
"nextStart": [{"id": "9e6a55b258ef11edb8780242ac121233", "score": 0.92}]
}
}
}

Example Usage

cURL:

curl '<https://api.profileapi.com/2024-03-01/companies?limit=50&fields=businessModels,industries>'

Node.js (Using Axios):

const axios = require('axios');

axios.get('https://api.profileapi.com/2024-03-01/companies', {
params: {
limit: 50,
fields: ['businessModels', 'industries']
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error fetching data:', error);
});

Python (Using requests):

import requests

params = {
'limit': 50,
'fields': ['businessModels', 'industries']
}
response = requests.get('<https://api.profileapi.com/2024-03-01/companies>', params=params)
if response.status_code == 200:
print(response.json())
else:
print('Failed to fetch data:', response.status_code)