Skip to main content
To find companies in a place, filter the Company Search API by country, state, city, or region. Countries take two-letter codes such as US. States and cities take CompanyEnrich IDs, which you look up by name with the free geo endpoints. A filter search costs 1 credit per company returned. Every geo endpoint is free. An array of values matches companies in any of the places.

Find companies in a country

This search returns companies with 51 to 500 employees in Germany, Austria, or Switzerland.
The response is a page of company records, each with the company’s headquarters in location. The later examples on this page reuse the client created here.

Find companies in a city

The city filter takes an ID, so look up the city first. The lookup matches any city whose name contains your text, and countryCodes keeps it to one country.
Check the name and stateId of each result before you pick one, because several cities can share a name. This response is shortened.
Then send the ID in filter.city. Replace 125634 with the ID from your own lookup.
Each item is a full company record. This example is shortened and shows a fictional company.
The state and city IDs in a record are the same IDs the filters accept.

Find companies in a state or province

States work the same way: look up the ID, then send it in filter.state.
Each state in the lookup has an id, a name, a countryCode, and its ISO 3166-2 code when one exists. The SDK examples take the first match, so check its name before you rely on it.

Find companies in a region

A region groups several countries. List the regions to get their IDs, then send one in filter.region.
Each region has an id, a name, the countryCodes it covers, and a parentId when it is part of a larger region. In a search, send the ID as a string, as in "region": "REGION_ID", or --region REGION_ID in the CLI.

Exclude a place

Use notIn to leave a place out. This filter returns SaaS companies outside the United States:
In the CLI, this is --category saas --exclude-country US.

Common questions

Why do the state and city filters take IDs?

Place names are not unique, so the filters take IDs that identify one state or one city. The geo endpoints turn a name into an ID for free, and the same IDs work in people search.

Which location does the filter match?

The location in the company record, which holds the company’s headquarters. The response returns it in location, down to the city, address, and postal code when known.

Can I search by postal code or radius?

No. The location filters are country, region, state, and city.

Can I combine several locations?

Yes. An array matches any of its values, so "country": ["DE", "AT", "CH"] returns companies in all three countries. Different location filters must all match, so a country and a city in the same request both apply.

How do I make sure every result has a city?

Add "require": "city" to the filter. It keeps only companies that have a city on record. country and state work the same way.

Company Search API filters

Every filter, with matching rules and accepted values.

Company schema

Every field in the location object.

Build a list of companies that match your ICP

Combine location with industry, size, and other criteria.

People Search API examples

Use the same IDs to find people in a city or state.