The Companies API LogoThe Companies API Logo
APICompaniesUse casesPricing
LoginLogin
Back to use cases
Type a company name
API search endpoint
Company suggestions

Add a company search with autocomplete to your application

Many applications require users to search for companies, whether for lead verification in registration forms or finding business profiles in job boards and CRMs.

yael
7 min read
Product
User Experience
Introduction

Here is an example of an autocomplete field to suggest businesses, which you can create with our API.

This feature can be useful to enhance the user experience on your product by making your form easier to use.

Try the demo

Try with a company name

How it works

We have designed an API endpoint to help you search companies by name.

This feature is rate limited to a specific number of requests per second according to your plan. Make sure to read our pricing to know more about the API limits.

The three important parameters to know are:

  • name: The name of the company to search for.
  • simplified: Whether to return a short version of a company profile. This does not cost credits when set to true.
  • size: The number of results to return.

For all other parameters, refer to

Search companies by name
.

GET
https://api.thecompaniesapi.com/v2/companies/by-name?name=microsoft&simplified=true&size=1
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 various languages to help you implement an autocomplete field. Each demonstrates making API requests to search companies by name and handle responses.

Select your favorite language:
C#

Go

Java

JavaScript
SDK

PHP

Python

Ruby

Rust

async function autocompleteCompanies(name, page = 1) {
  const baseUrl = 'https://api.thecompaniesapi.com/v2/companies/by-name';

  const params = new URLSearchParams({
    name,
    page,
    simplified: 'true',
    size: '25'
  });

  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();
}
To go further

Explore these autocomplete components to quickly implement company search functionality in your preferred web framework. Each component provides robust features like dropdown suggestions, keyboard navigation, and customizable styling.

shadcn.com
Shadcn Combobox

shadcn.com

Versatile React combobox for enhanced user input and selection.

nuxt.com
NuxtUI InputMenu

nuxt.com

Powerful Nuxt component for dynamic input with dropdown options.

svelte.dev
Svelte Autocomplete example

svelte.dev

Interactive Svelte REPL showcasing autocomplete functionality.

angular.io
Angular Autocomplete

angular.io

Comprehensive guide to Angular Material's autocomplete feature.

jqueryui.com
jQuery UI Autocomplete

jqueryui.com

A jQuery UI widget that provides autocomplete functionality on text inputs.

js.org
Vue Multiselect

js.org

Feature-rich select/dropdown/autocomplete component for Vue.js

react-select.com
React Select

react-select.com

Flexible and powerful Select Input control for ReactJS with multiselect and autocomplete.

downshift-js.com
Downshift

downshift-js.com

Primitive to build simple, flexible, WAI-ARIA compliant React autocomplete components

primevue.org
PrimeVue AutoComplete

primevue.org

Advanced autocomplete component for Vue with multiple modes and customization options

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