Company API
This page provides detailed information on how to retrieve company information through our 2 main API's the search: /api/company/search and export: /api/company/export endpoints. These endpoints allow you to retrieve, search, and export information about companies, with a variety of filtering options such as country, city, industry etc.
Company Search
Endpoint: /api/company/search
The /api/company/search endpoint allows users to search for companies based on various criteria. This endpoint returns a standard set of fields, including the company name and address.
Returned Fields
- ID: A unique identifier of the company, can be used to retrieve a full record.
- Company Name: The main name of the company.
- Country Name: The country of the company.
Note: it's possible to receive more fields on search, this can be requested via support.
Important Notes
- Purpose: This endpoint is primarily used to retrieve basic information such as the company name and address based on a search query. For instance in an autocomplete search.
- Filtering branches: In most cases, you'll want to add
statusCode=0,1to your query. This filters for single locations (0) and headquarters (1) only. Large companies often have many branches/subsidiaries in the database, which are typically not relevant for most use cases like lead generation or company lookup.
Example Request
curl -G https://app.companydata.com/api/company/search \
-H "x-api-key: {ApiKey}" \
-d "search=Example Company"
Additional Examples
1. Search for companies named Bolddata
curl -G https://app.companydata.com/api/company/search?page=1&pageSize=25&search=BoldData \
-H "x-api-key: {ApiKey}"
2. Search for companies named Bolddata in The NETHERLANDS
curl -G https://app.companydata.com/api/company/search?page=1&pageSize=25&search=BoldData&countryCode=NL \
-H "x-api-key: {ApiKey}"
3. Search by street address in Amsterdam
curl -G "https://app.companydata.com/api/company/search?page=1&pageSize=25&countryCode=NL&cityName=AMSTERDAM&streetName=Keizersgracht" \
-H "x-api-key: {ApiKey}"
4. Search by city name
curl -G "https://app.companydata.com/api/company/search?page=1&pageSize=25&countryCode=NL&cityName=ROTTERDAM&statusCode=0,1" \
-H "x-api-key: {ApiKey}"
5. Search by postal code and street
curl -G "https://app.companydata.com/api/company/search?page=1&pageSize=25&countryCode=NL&postalCode=1012AB&streetName=Dam" \
-H "x-api-key: {ApiKey}"
Company Export
Endpoint: /api/company/export
The /api/company/export endpoint allows users to request a specific set of fields related to company data. The fields returned by this endpoint depend on the type of package purchased by the client.
Returned Fields
- The set of fields returned is determined by the client's subscription package. This could include detailed company information such as financial data, employee count, or contact information.
Important Notes
- Package-Dependent Fields: The fields returned by this endpoint are customized based on the client's purchased package. For more information contact support.
- Use Case: This endpoint is used for getting a full company profile, often used in CRM's or for purposing of contacting or researching a company.
Pagination
The /api/company/export endpoint supports two pagination methods to retrieve company data:
1. Standard Pagination
Standard pagination uses page and pageSize parameters and is suitable for most use cases.
Characteristics:
- Maximum of 10,000 records retrievable
- Simple page-based navigation
- Best for small to medium datasets
- Backwards compatible with existing implementations
Example:
curl -G https://app.companydata.com/api/company/export?page=1&pageSize=100&countryCode=NL \
-H "x-api-key: {ApiKey}" \
-d "export=true"
2. Scroll Pagination
Scroll pagination is designed for retrieving large datasets without record limits. It uses a cursor-based approach with a scrollId that tracks your position in the result set.
Characteristics:
- Unlimited records: No maximum record limit
- Cursor-based: Uses
scrollIdto track position - Time-limited context: Scroll context expires after 8 minutes
- Efficient for large exports: Ideal for bulk data retrieval
How it works:
- Initial Request: Set
useScroll=trueto start a scroll session - Subsequent Requests: Use the
scrollIdfrom the previous response to get the next batch - Continue until complete: Keep requesting with the latest
scrollIduntilhasMoreRecordsisfalse - Expiration: If more than 8 minutes pass between requests, the scroll context expires and you'll need to start a new scroll session
Important Notes:
- Always use the latest
scrollId: Each response includes a newscrollIdthat must be used for the next request - Scroll context expires after 8 minutes: If you don't make a request within 8 minutes, the scroll session expires
- Don't mix pagination methods: Once you start with scroll pagination, continue using
scrollIduntil completion - Backwards compatible: Standard pagination continues to work unchanged
Example - Initial Scroll Request:
curl -G https://app.companydata.com/api/company/export?useScroll=true&pageSize=1000&countryCode=NL \
-H "x-api-key: {ApiKey}" \
-d "export=true"
Example - Subsequent Scroll Requests:
curl -G https://app.companydata.com/api/company/export?useScroll=true&scrollId=abc123xyz&pageSize=1000 \
-H "x-api-key: {ApiKey}" \
-d "export=true"
Example - Complete Scroll Pagination Flow:
const axios = require('axios');
const apiKey = 'YOUR_API_KEY';
const url = 'https://app.companydata.com/api/company/export';
async function exportAllCompanies(filters) {
let scrollId = null;
let hasMoreRecords = true;
let allRecords = [];
let pageCount = 0;
try {
// Initial request
let response = await axios.get(url, {
headers: { 'x-api-key': apiKey },
params: {
useScroll: true,
pageSize: 1000,
...filters,
export: true
}
});
while (hasMoreRecords) {
const { data, scrollId: newScrollId, hasMoreRecords: more } = response.data;
allRecords = allRecords.concat(data);
pageCount++;
console.log(`Page ${pageCount}: Retrieved ${data.length} records (Total: ${allRecords.length})`);
hasMoreRecords = more;
scrollId = newScrollId;
if (hasMoreRecords) {
// Wait a bit to avoid rate limiting
await new Promise(resolve => setTimeout(resolve, 100));
// Fetch next page with latest scrollId
response = await axios.get(url, {
headers: { 'x-api-key': apiKey },
params: {
useScroll: true,
scrollId: scrollId, // Use latest scrollId
pageSize: 1000,
...filters,
export: true
}
});
}
}
console.log(`Export complete! Total records: ${allRecords.length}`);
return allRecords;
} catch (error) {
console.error('Export error:', error);
throw error;
}
}
// Usage
exportAllCompanies({ countryCode: 'NL' })
.then(records => {
console.log(`Successfully exported ${records.length} companies`);
});
Response Structure for Scroll Pagination:
When using scroll pagination, the response includes additional fields:
{
"data": [
{
"ID": "12345",
"Company Name": "Example Company",
// ... other fields
}
],
"scrollId": "abc123xyz456",
"hasMoreRecords": true,
"pageSize": 1000,
"totalRecords": null // Not available in scroll mode
}
Response Fields:
data: Array of company recordsscrollId: Unique identifier for the scroll session. Always use the latest scrollId from the most recent responsehasMoreRecords: Boolean indicating if more records are availablepageSize: Number of records in the current response
Example Request
Export the first 25 companies from Rotterdam, the Netherlands with the Sic Code 3221, for glassware.
curl -G https://app.companydata.com/api/company/export?page=1&pageSize=25&sic4Digits=3221&countryCode=NL&cityName=Rotterdam? \
-H "x-api-key: {ApiKey}" \
-d "export=true"
Query Parameters
Below is a list of query parameters that can be used to filter the results returned by this endpoint. Export and search support the same parameters.
Pagination Parameters
| Parameter | Description | Type | Options | Example |
|---|---|---|---|---|
page | Page number for standard pagination (starting from 1). Maximum 10,000 records retrievable with standard pagination. | Integer | Positive integer | page=1 |
pageSize | Number of records per page. Recommended: 100-1000 for standard pagination, 1000+ for scroll pagination. | Integer | Positive integer | pageSize=100 |
useScroll | Enable scroll pagination mode. When true, enables unlimited record retrieval using scrollId. Must be used with scrollId for subsequent requests. | Boolean | true, false | useScroll=true |
scrollId | Scroll session identifier from previous response. Required for subsequent requests in scroll pagination mode. Scroll context expires after 8 minutes. | String | Scroll ID from previous response | scrollId=abc123xyz456 |
Filter Parameters
| Parameter | Description | Type | Options | Example |
|---|---|---|---|---|
ID | Company ID | String | Company ID | ID=01111 |
search | Search for company name | String | Company Name | search=Bolddata |
sic4Digits | 4-digit SIC Code. | String | A valid 4 number SIC Code | sic4Digits=0111,0115 |
importExportCode | Import/Export Code. | Enum | A: Import/Export/Agent, B: Imports & Exports, C: Imports, D: Imports & Agents, E: Exports & Agents, F: Agent (no inventory), G: Not available, H: Exports | importExportCode=B,C |
legalStatus | Legal Status of the company. | Enum | 0: Not available, 1: Proprietorship, 2: Partnership, 3: Corporation, 7: Partnership, 8: Joint venture, 9: Master limited partnership, etc. | legalStatus=1,2 |
statusCode | Status Code representing the company's location type. | Enum | 0: Single Location, 1: Headquarter/Parent, 2: Branch | statusCode=0,2 |
subsidiaryCode | Indicates if the company is a subsidiary. | Enum | 0: Not a subsidiary, 3: Is a subsidiary | subsidiaryCode=3,0 |
countryCode | Country Code where the company is located. | String | See countries page for code format | countryCode=AL,BY,NL |
provinceName | State/Province Name where the company is located. | AutoComplete | N/A | provinceName=NOORD-HOLLAND |
cityName | City Name where the company is located. | AutoComplete | N/A | cityName=AMSTERDAM |
streetName | Street address. Supports prefix (partial) matching. | String | Street name or partial street name | streetName=Keizersgracht |
regionName | Region or state where the company is located. | AutoComplete | N/A | regionName=BAVARIA |
countryName | Country name where the company is located. | AutoComplete | N/A | countryName=NETHERLANDS |
postalCode | Postal code of the company. Exact match. | String | Postal code | postalCode=1012AB |
postalCodeInteger | Postal code as number. Supports range filtering. | Integer | Numeric postal code | postalCodeInteger[min]=1000&postalCodeInteger[max]=1099 |
employeesHere | Number of employees at the company's location. | Integer | Example: 10 | employeesHere[min]=2&employeesHere[max]=10 |
employeesTotal | Total number of employees in the company. | Integer | Example: 100 | employeesTotal[min]=2&employeesTotal[max]=10 |
annualSales | Annual sales in U.S. dollars. | Integer | Example: 100000 | annualSales[min]=10000&annualSales[max]=500000 |
foundingYears | Range of years the company was founded. | Integer | Example: 2022 | foundingYears[min]=2000&foundingYears[max]=2010 |
phoneNumber | Search by full Company's Phone number, internationally formatted with + sign, 00 or local not supported | String | Company Phone Number | phoneNumber=+31621700000 |
email | Search by email or email patterns such as domain or names | String | Company Email | search=bolddata.nl search=info@bolddata.nl |
worldwideHeadquarterID | Filter by Worldwide Headquarter ID | String | Worldwide Headquarter ID | worldwideHeadquarterID=1234 |
nationalId | Search by National Company Registration Number, recommended to add countryCode | String | National Company Registration Number | nationalId=123456 |
hasEmail | Indicates if an email address is available for the company. | Boolean | true, false | hasEmail=true |
hasMarketability | Indicates if the company is marked as marketable. | Boolean | true, false | hasMarketability=true |
hasPhone | Indicates if a telephone number is available for the company. | Boolean | true, false | hasPhone=true |
hasFax | Indicates if a fax number is available for the company. | Boolean | true, false | hasFax=true |
hasContactPerson | Indicates if a contact person is available for the company. | Boolean | true, false | hasContactPerson=true |
hasWebsite | Indicates if a website is available for the company. | Boolean | true, false | hasWebsite=true |
hasNationalID | Indicates if a national ID is available for the company. | Boolean | true, false | hasNationalID=true |
hasBusinessName | Indicates if a business name is available for the company | Boolean | true, false | hasBusinessName=true |
hasStreetAddress | Indicates if a street address is available for the company. | Boolean | true, false | hasStreetAddress=true |
hasPostalCode | Indicates if a postal code is available for the company. | Boolean | true, false | hasPostalCode=true |
hasCEOName | Indicates if a CEO name is available in the database for the company record. | Boolean | true, false | hasCEOName=true |
Address Search
The streetName parameter allows searching companies by street address. It supports partial matching, so you don't need to type the full street name.
Address Parameters
| Parameter | Description | Match Type |
|---|---|---|
streetName | Street address | Prefix (partial match) |
cityName | City name | Exact |
provinceName | Province or district | Exact |
regionName | Region or state | Exact |
countryName | Country name | Exact |
postalCode | Postal code | Exact |
postalCodeInteger | Postal code as number | Range |
countryCode | ISO country code | Exact |
How streetName works
- Matches from the beginning of words in the address
- Case insensitive
- You can type a partial street name and it will match
| Search value | Matches | Why |
|---|---|---|
Sumatra | "Sumatrastraat 109" | Prefix match on street name |
Keizersgracht 1 | "Keizersgracht 100", "Keizersgracht 12" | Prefix match on number |
Dam | "Damrak 1", "Damstraat 5" | Prefix match |
Location names require exact values
Unlike streetName, the parameters cityName, provinceName, regionName, and countryName require exact values. City names, provinces, and regions do not have international standards or ISO codes, so spelling and formatting can vary between countries and languages (e.g. "Den Haag" vs "'s-Gravenhage", "Munich" vs "Munchen").
To get the correct value, use the lookup endpoints to search for the exact name as it exists in our database.
Lookup Endpoints
| Endpoint | Description |
|---|---|
/api/cities | Look up city names |
/api/provinces | Look up province or district names |
/api/regions | Look up region or state names |
/api/countries | Look up country names |
All lookup endpoints accept the same parameters:
| Parameter | Required | Description |
|---|---|---|
search | Yes | Your search term (partial input is fine) |
countries | No | ISO country code to filter results within a country |
limit | No | Maximum number of results to return (default: 100) |
The API returns a data array of matching values. Use these exact values in your search or export requests.
Lookup Examples
Look up a city name:
GET /api/cities?search=ams&countries=NL&limit=100
→ {"data": [{"cityName": "AMSTELVEEN", "countryCode": "NL"}, {"cityName": "AMSTERDAM", "countryCode": "NL"}, ...], "total": 9, "limit": 100}
Look up a province:
GET /api/provinces?search=Noord&countries=NL
→ {"data": [{"provinceName": "NOORD-BRABANT", "countryCode": "NL"}, {"provinceName": "NOORD-HOLLAND", "countryCode": "NL"}], ...}
Look up a region:
GET /api/regions?search=Bava&countries=DE
→ {"data": [{"regionName": "BAVARIA", "countryCode": "DE"}], ...}
These lookup endpoints can also be used for building autocomplete inputs in your own UI integration.
Recommended usage
For best results, first look up the exact city name via the lookup endpoint, then combine it with streetName.
Step 1 — Find the city name:
GET /api/cities?search=Amster&countries=NL
→ {"data": [{"cityName": "AMSTERDAM", "countryCode": "NL"}, ...], ...}
Step 2 — Search with exact city + partial street:
GET /api/company/search?countryCode=NL&cityName=AMSTERDAM&streetName=Keizersgracht
More address search examples
Country + postal code + street:
GET /api/company/search?countryCode=NL&postalCode=1012AB&streetName=Dam
Country + postal code range + street (numeric range):
GET /api/company/search?countryCode=NL&postalCodeInteger[min]=1000&postalCodeInteger[max]=1099&streetName=Dam
Country + street only (broader search):
GET /api/company/search?countryCode=NL&streetName=Sumatra
Province + street + additional filters:
GET /api/company/search?countryCode=DE&provinceName=BAVARIA&streetName=Friedrich&hasEmail=true
Available on
GET /api/company/searchGET /api/company/export