The Companies API LogoThe Companies API Logo
APIUse casesCompanies
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
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 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.
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)
4 months ago
Lockheed Martinlockheedmartin.com
defense and space manufacturing
aerospace
defense
technology
military and international affairs
space research and technology
cyber security
security systems services
space exploration
engineering services
Over 10,000 employees
Over $1 billion
Public Company
Over 1 billion
United States
North America
Irvine
Orange County, California
1912
adobe-experience-manager
amazon-cloudfront
facebook-social-plugins
google-analytics
google-tag-manager
hotjar
---
---
High (96)
4 months ago
Whole Foods Marketwholefoodsmarket.com
retail
retail groceries
online and mail order retail
food and beverage retail
food and beverage services
caterers
e commerce
amazon
animal welfare
aws
Over 10,000 employees
Over $1 billion
Public Company
10M - 50M
United States
North America
Austin
Travis County, Texas
1980
amazon-s3
google-tag-manager
next-js
---
---
High (95)
4 months ago
Nutriennutrien.com
agriculture construction mining machinery manufacturing
adjuvants
agricultural distribution
agricultural nutrients
chemicals
crop protection products
fertilizer
manufacturing
plant nutritional products
retail
Over 10,000 employees
Over $1 billion
Public Company
10M - 50M
Canada
North America
Saskatoon
Saskatchewan
2018
facebook-social-plugins
google-analytics
google-tag-manager
microsoft-365
netlify
next-js
next-js-app-router
---
---
High (95)
6 months ago
RR Donnelleyrrd.com
marketing services
packaging solutions
print services
supply chain solutions
retail
consumer services
cannabis and cbd
grocery
quick serve restaurants
education
Over 10,000 employees
Over $1 billion
Public Company
10M - 50M
United States
North America
Chicago
Cook County, Illinois
1864
google-analytics
google-tag-manager
google-workspace
microsoft-asp-net
---
---
High (94)
4 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:
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