The Companies API LogoThe Companies API Logo
APIUse casesPricingCompanies
LoginLogin

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.

Companies using this feature
reshark logoreshark logo
tagvenue logotagvenue logo
julien
10 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 with criterias
    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.
British American Tobaccobat.com
tobacco manufacturing
consumer goods rental
retail
wholesale
wholesale alcoholic beverages
wholesale luxury goods and jewelry
consumer services
e commerce
insurance
health and human services
Over 10,000 employees
Over $1 billion
Public Company
Over 1 billion
United Kingdom
Europe
London
England
1902
adobe-experience-manager
amazon-cloudfront
amazon-s3
google-analytics
google-tag-manager
microsoft-365
---
---
High (93)
7 months ago
Viatrisviatris.com
pharmaceutical manufacturing
healthcare
medical equipment manufacturing
medical practices
medical and diagnostic laboratories
research services
manufacturing
it services and it consulting
it system data services
it system design services
Over 10,000 employees
Over $1 billion
Public Company
10M - 50M
Germany
Europe
Bad Homburg vor der Höhe
Hochtaunuskreis, Hesse
1968
backbone-js
google-tag-manager
---
---
High (93)
7 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
--- ---
---
High (93)
4 days ago
Jabiljabil.com
manufacturing
technology information and internet
it services and it consulting
engineering services
supply chain management
global service
services for renewable energy
additive manufacturing
aerospace
aftermarket services
Over 10,000 employees
Over $1 billion
Public Company
Over 1 billion
United States
North America
Farmington Hills
Oakland County, Michigan
1992
amazon-cloudfront
google-tag-manager
microsoft-365
microsoft-asp-net
php
salesforce-account-engagement
vidyard
+1
---
---
High (92)
2 months ago
Trimbletrimble.com
technology information and internet
construction
transportation
geospatial
government
natural resources
agriculture
software development
it services and it consulting
it system design services
5,000 to 10,000 employees
Over $1 billion
Public Company
10M - 50M
United States
North America
Sunnyvale
Santa Clara County, California
1981
contentful
gatsby
google-analytics
google-tag-manager
google-workspace
netlify
php
+3
---
---
High (91)
7 months ago
How it works

Our company search endpoint

Search companies with criterias
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

The query parameter for the

Search companies with criterias
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:
Go
SDK

JavaScript
SDK

PHP
SDK

Python
SDK

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