# Companies Search

Find companies that match structured filters and write them to a table: market sizing, territory planning,
or a fresh list of target accounts. You choose the filters; there is no free-text or AI search.

**Credits:** 1 search credit per 50 companies returned (companies come in pages of 50). See
[Pricing and limits](../pricing-and-limits).

## Build a table of companies

```sql
CALL TOMBA.core.search_companies(
    {'location_country': ['DE', 'AT'],
     'industry': 'Financial Services',
     'size': ['51-200', '201-500'],
     'keywords': {'include': ['payments'], 'exclude': ['crypto']}},
    'DACH_FINTECH', 500);

SELECT NAME, WEBSITE_URL, INDUSTRY, COMPANY_SIZE, REVENUE, CITY, COUNTRY
  FROM TOMBA.results.DACH_FINTECH;
```

Signature: `search_companies(filters VARIANT, output_table STRING, max_results INT DEFAULT 500)`. At most
5,000 companies per call. For large searches, use `search_companies_async` (same arguments) to run it in the
[background](../background-runs).

## Filters

A filter is a single value, a list of values, or `{'include': [...], 'exclude': [...]}`, with up to 50 values
each. Filters are combined with AND.

| Filter                                  | Values                                                                                           |
| --------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `location_country` (alias `country`)    | two-letter ISO codes: `DE`, `US`, …                                                              |
| `location_city` (alias `city`)          | city names: `Berlin`                                                                             |
| `location_state` (alias `state`)        | US state codes (`CA`) or state/region names                                                      |
| `industry` (alias `industries`)         | LinkedIn industry labels: `Financial Services`, `Software Development`, …                        |
| `size`                                  | employees: `1-10`, `11-50`, `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000`, `10001+` |
| `type`                                  | `education`, `government`, `nonprofit`, `private`, `public`, `personal`                          |
| `revenue`                               | `0-1m`, `1m-10m`, `10m-50m`, `50m-100m`, `100m+`                                                 |
| `founded`                               | a year (`2015`) or `before 1990`, `1990-1999`, `2000-2009`, `2010-2019`, `2020+`                 |
| `keywords` (alias `keyword`)            | words that describe the business: `payments`                                                     |
| `technologies` (alias `technology`)     | technologies the company uses: `AWS`, `React`                                                    |
| `company` (alias `domain`)              | company domains: `stripe.com`                                                                    |
| `similar`, `suggestion`, `sic`, `naics` | passed to Tomba as given                                                                         |

## More examples

```sql
-- SaaS companies in the US using Snowflake, founded since 2010
CALL TOMBA.core.search_companies(
    {'country': 'US', 'industry': 'Software Development', 'technologies': 'Snowflake',
     'founded': ['2010-2019', '2020+']}, 'US_SAAS_ON_SNOWFLAKE', 1000);

-- one page (50 companies) as a result, without a table
CALL TOMBA.core.lookup('companies_search', {'filters': {'country': 'FR', 'size': '11-50'}, 'page': 1});
```

## Output columns

`INPUT_FILTERS` (the filters, as JSON), `NAME`, `WEBSITE_URL`, `INDUSTRY`, `COMPANY_SIZE`, `COMPANY_TYPE`,
`FOUNDED`, `REVENUE`, `COUNTRY`, `STATE`, `CITY`, `TOTAL_EMAILS`, `LINKEDIN_URL`, `DESCRIPTION`, followed by the
[common columns](../reference/output-columns).

## Tips

- Use the Streamlit app's **Find companies** page to build filters without writing JSON.
- `TOTAL_EMAILS` shows how many emails Tomba knows at each company: sort by it to prioritize.
- Chain it: run [Domain Search](./domain-search) on `WEBSITE_URL` to find people, or
  [Company Enrichment](./company-enrichment) for more firmographics.

## Related

- [Similar Domains](./similar-domains)
- [Company Enrichment](./company-enrichment)
- [Domain Search](./domain-search)
