search_companies is how you build and qualify an account list before you go looking for people at those accounts. It shares most of its vocabulary with search_people, so filters you learn here transfer directly.
Probe with limit: 1 before you pull a page
search_companies has no free dry run — count_only exists only on search_linkedin_profile — so run every new search once at limit: 1 before you fetch it at volume.
limit: 25, walked five pages deep, costs 125 — and every filter here is exact-match, so a single wrong string spends all 125 on the wrong list. The usual culprits are all silent: a value that isn’t in the enumeration at all, "TX" instead of "Texas", a linkedin_industry label capitalised differently from the stored one, or a country filter pulling a multinational to the wrong office.
Read two things off the single result before you widen:
total— is the account universe the size you expected? A thin total means a filter value is off, not that the segment is empty. Try the neighbouringindustryvalue or shorten thenaics_code.totalsits at the top level of the response, alongsideresults— not inside it. Over raw HTTP the body nests one level deeper, so the path isresults.total.- The record itself — does this company actually match your intent? Check
domain,industry,employee_range, and location against what you asked for.
limit and start paginating.
Filters are free precision
Search cost is driven by the free-textquery, not by the filters attached to it.
Two rules follow.
Never send a bare
query. Adding industry, employee_range, or revenue_range costs nothing and sharply narrows the result set. A query-only call is the least precise shape available and no cheaper than a filtered one.
Drop query entirely when filters can carry the whole intent. Most account lists are pure firmographics — “software companies with 51–200 employees and 20M revenue” needs no free text at all, and runs much faster without it.
query only when you’re matching a company by name. Everything else belongs in a filter.
This is about execution cost, not billing. Tokens are charged per record returned regardless of query shape — a cheaper query returns faster and puts less load on search capacity, but it doesn’t change what you’re charged.
Use domain when you have one
If you know the website domain, domain is an exact match and always beats a free-text query:
https://www.acme.com/about becomes acme.com. There’s no need to strip the protocol or path first.
Reach for query only when you have a name and no domain. It searches the company name only; domain and industry are keyword fields and aren’t covered by it.
Choose your industry granularity
As with people search, three filters describe industry at different resolutions:
The 22
industry buckets are the complete list — anything outside it matches nothing and returns zero results silently. Several niches have no bucket of their own: insurance carriers, aerospace and defence, mining, electronics, and biotech all fall inside broader buckets. When you need one of those specifically, use linkedin_industry instead — "Insurance", "Aerospace and Defense", "Mining and Metals" and hundreds more exist there as exact labels.
naics_code matches at any hierarchy level. Use a 2-digit sector ("23" = Construction) to cast wide, a 6-digit code ("511210" = Software Publishers) to go narrow. Shortening the code is the cleanest way to widen a search that’s returning too little.Exclude what you don’t want
Four filters remove companies instead of selecting them. Each takes a list, and each mirrors a filter you already know:exclude_domain is your suppression list. Pass the accounts you already have — existing customers, current vendors, your own company — and they never appear:
Exclusions narrow a search — they can’t be the whole search. At least one positive input (
query, domain, or a regular filter) is still required.Understand the location caveat
country and state filter the company’s location — but that location is derived from where the company’s team is based.
Both require exact stored values with standard capitalisation — "Texas", not "TX". Combine state with country for precision.
Every company record comes back with a
city, but there is no city filter on search_companies — country and state are the only location filters. To narrow to a city, filter on state and read city off the results. (search_people does have a city filter.)Watch the size and revenue distributions
Both range filters are exact-match, and both have a heavily skewed distribution.employee_range — "1-10" is the most common value by a wide margin. A search filtered to small bands will return a great deal; one filtered to "5001+" will return very little.
These eight bands are the complete list. Older documentation mentioned
"Small", "Mid-Market", "Enterprise", and "Unknown" — those are retired and now return nothing.
revenue_range — "$500k - $1M" is the most common band.
Identify companies from traffic
ip_to_company resolves an IPv4 address to the domain of the organisation behind it — useful for de-anonymising website visitors and triggering account-based workflows.
This is a B2B tool. Consumer ISP addresses will typically not resolve to a named company, so expect a meaningful miss rate on general web traffic.
Chain company search into people search
The most common workflow is two calls: qualify accounts, then find contacts at them.search_companieswith your firmographic filters → gives you a list of domainssearch_peoplewithcompany_domainset to each domain → gives you contacts
limit: 1 on both calls. A chain that looks right at one company per account is safe to fan out; one that isn’t costs you the whole fan-out to find that out.
search_people can also filter on employee_range and revenue_range directly, applied to the person’s current employer. If firmographics are the only reason you’re calling search_companies, you can often skip it and filter in one call.
Paginate deliberately
Results are ranked by_score, so the first page is the strongest.
Read the top-level
total before walking pages (results.total in the raw HTTP body), then increment offset by your limit. Every page you walk draws from the same search-record pool, so confirm the search is right at limit: 1 before you commit to walking it.
Related
Searching for People
Find contacts at the accounts you’ve qualified.
Rate Limits
Search records are capped separately from enrichment.
