Use Cases

Explore practical examples showing how to use the BoldData API for common business scenarios. Each guide includes interactive demos and ready-to-use code.

Quick Start

All examples use native fetch and work in both Node.js 18+ and browsers. Here's the basic pattern:

const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://app.companydata.com/api/company';

async function fetchApi<T>(endpoint: string, params: Record<string, string | number>): Promise<T> {
  const url = new URL(`${BASE_URL}/${endpoint}`);
  Object.entries(params).forEach(([key, value]) => {
    if (value) url.searchParams.append(key, String(value));
  });

  const response = await fetch(url.toString(), {
    headers: { 'x-api-key': API_KEY },
  });

  if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  }

  return response.json();
}

// Search for companies
const searchResults = await fetchApi('search', { search: 'Philips', countryCode: 'NL' });

// Get full company details
const companyDetails = await fetchApi('export', { ID: '407809109' });

Need Help?

Was this page helpful?