The Companies API LogoThe Companies API Logo
APICompaniesUse casesPricing
LoginLogin
Back to use cases
Your search query
Companies Search API
Matching companies

How to build a company search engine with our API

Learn how to create a powerful company search engine using our API. This guide covers endpoint usage, segmentation, and filtering techniques, complete with code examples and pricing details.

julien
13 min read
Product
Introduction

Want to build a powerful company search engine like the one we offer? Our API makes it simple. In this guide, you'll learn:

  • How to use the
    Search companies
    endpoint for powerful search capabilities.
  • How our segmentation system works to filter our database.
  • What company attributes you can search and filter by.
  • Code examples in multiple languages to get you started.
  • Pricing and usage details.
Cognizantcognizant.com
it services and it consulting
it system custom software development
it system data services
it system design services
it system installation and disposal
it system operations and maintenance
it system testing and evaluation
it system training and support
cloud solutions
cybersecurity
Over 10,000 employees
Over $1 billion
Public Company
Over 1 billion
United States
North America
Teaneck Township
Bergen County, New Jersey
1994
microsoft-365
microsoft-asp-net
php
---
---
High (105)
3 months ago
Ciscocisco.com
technology information and internet
networking
security
collaboration
computing
ai
industrial iot
cloud
technology information and media
communications infrastructure
Over 10,000 employees
Over $1 billion
Public Company
Over 1 billion
United States
North America
San Jose
Santa Clara County, California
1984
adobe-experience-manager
akamai
apache
envoy-proxy
openssl
---
---
High (102)
2 months ago
Jabiljabil.com
manufacturing
technology information and internet
technology information and media
engineering services
supply chain services
product design
supply chain management
global services
cloud
cloud equipment
Over 10,000 employees
Over $1 billion
Public Company
Over 1 billion
United States
North America
Saint Petersburg
Pinellas County, Florida
1992
amazon-cloudfront
google-tag-manager
microsoft-365
microsoft-asp-net
php
salesforce-account-engagement
vidyard
+1
---
---
High (98)
3 months ago
Vestasvestas.com
renewable energy equipment manufacturing
wind electric power generation
renewable energy power generation
renewable energy semiconductor manufacturing
services for renewable energy
technology information and internet
clean energy
energy
environment
environmental engineering
Over 10,000 employees
Over $1 billion
Public Company
10M - 50M
Denmark
Europe
Aarhus
Central Denmark Region
1945
adobe-experience-manager
facebook-social-plugins
google-tag-manager
microsoft-365
---
---
High (98)
3 months ago
Boeingboeing.com
aviation and aerospace component manufacturing
airlines and aviation
defense and space manufacturing
space research and technology
transportation equipment manufacturing
commercial and industrial machinery maintenance
space technology product manufacturing
security systems services
transportation logistics supply chain and storage
military and international affairs
Over 10,000 employees
$50 million - $100 million
Public Company
Over 1 billion
United States
North America
Chicago
Cook County, Illinois
1916
adobe-experience-manager
amazon-cloudfront
apache
google-tag-manager
microsoft-asp-net
---
---
High (97)
3 months ago
How it works

Our company search endpoint

Search companies
provides powerful search capabilities through a simple GET request. It returns a customizable number of matching companies based on your search criteria.

You can also easily navigate between result pages, sort companies by any attribute and combine multiple filters together.

Each company returned in the full response costs 1 credit. You can browse our complete pricing plans to find the best option for your needs

Use the simplified=true parameter to get a lightweight version of company data. Simplified responses are free and don't consume any credits. They are perfect for displaying search result previews or lists.

GET
https://api.thecompaniesapi.com/v2/companies
What you should know

The query parameter for the

Search companies
endpoint is an array of conditions. Each condition is an object with the following properties:

  • attribute: The attribute you want to filter by (e.g., about.industries, about.totalEmployees, finances.revenue). Refer to the API endpoint documentation for a full list of available attributes.
  • operator: Logical operator to combine the values. Use and to require all values to be true, or or to require at least one value to be true.
  • sign: The comparison sign for the condition. Options include:
    • equals: Matches if the specified value is included in the attribute value.
    • exactEquals: Matches if the specified value exactly matches the attribute value.
    • notEquals: Matches if the specified value is not included in the attribute value.
  • values: An array of values to match against the attribute (e.g., ["saas", "software"] for the about.industries attribute).

An example is worth a thousand words:

[
  // Match companies in both SaaS AND software industries
  {
    "attribute": "about.industries",
    "operator": "and",
    "sign": "equals",
    "values": ["saas", "software"]
  },
  // Match companies with revenue NOT in the 50m-100m range
  {
    "attribute": "finances.revenue",
    "operator": "or",
    "sign": "notEquals",
    "values": ["50m-100m"]
  }
]

This query must be converted into a string and URL-encoded before being used in the query parameter of the endpoint.

GET
https://api.thecompaniesapi.com/v2/companies?query=%5B%7B%22attribute%22%3A%22about.industries%22%2C%22operator%22%3A%22or%22%2C%22sign%22%3A%22equals%22%2C%22values%22%3A%5B%22retail%22%2C%22internet%22%2C%22services%22%5D%7D%5D&token=XXXXXX
The endpoint that defines your search criteria.
API tokens

Before using The Companies API, you'll need an API token. Make sure to read our documentation to properly authenticate your requests.

power
It seems you don't have any API tokens yet. You can create one in the following block.

Select or create a token

Code examples

Here are code examples in multiple languages to help you get started with building your own company search engine.

Select your favorite language:
C#

Go

Java

JavaScript
SDK

PHP

Python

Ruby

Rust

async function searchCompanies(query, page = 1, size = 25) {
  const baseUrl = 'https://api.thecompaniesapi.com/v2/companies';

  const params = new URLSearchParams({
    query: JSON.stringify(query),
    page,
    size
  });

  const url = `${baseUrl}?${params.toString()}`;

  const response = await fetch(url, {
    headers: {
      Authorization: `Basic ${process.env.YOUR_API_TOKEN}`,
    },
  });

  if (!response.ok) {
    throw new Error(`API request failed: ${response.status}`);
  }

  return await response.json();
}

// Retrieve SaaS companies with revenue between 50m and 100m
const query = [
  { "attribute": "about.industries", "operator": "and", "sign": "equals", "values": ["saas"] },
  { "attribute": "finances.revenue", "operator": "or", "sign": "notEquals", "values": ["50m-100m"] }
]

await searchCompanies(query)

Need help implementing your use case?

Reach out to us in the chat below, and let's solve it together!

A glowing background image to highlight the titleA glowing background image to highlight the title
© 2025 The Companies API
  • Updates
  • Terms
  • Privacy
  • FAQ
  • Status

Fast-growing SaaS companies with remote teams