Company Search (Beta)
Company Search API endpoint: query company profiles using SQL-like syntax with flexible filtering across 50+ data fields.
Query Format
Write aSELECT * FROM companies WHERE ... query. Do not include LIMIT or OFFSET clauses in the SQL — use the limit and offset parameters instead.
Response Shape
matches— capped at the request’slimit(max 100).total— the full row count matching your WHERE clause across the database, not just the returned page. Useful for account-sizing: query for “fintech companies founded after 2018” withlimit: 1andtotaltells you how many accounts exist. The companionTotal-Count-Statusresponse header isexactwhen the count succeeded; on extremely broad WHERE clauses the count subquery may time out, in which case the header ispageandtotalis just the size of the returned page. Search responses do not includematch_metadata(that field is only populated by/company/enrich).
Pagination
To page through results beyond the first 100, setoffset to the number of rows to skip. Maximum offset is 10,000.
Available Columns
Text Columns
| Column | Description |
|---|---|
name_cleaned | Normalized company name (lowercased) |
name_display | Display-ready company name (original casing preserved) |
domain | Primary website domain |
industry | Industry classification |
headline_cleaned | LinkedIn headline |
description_cleaned | Company description |
Numeric Columns
| Column | Description |
|---|---|
founded | Year founded |
linkedin_followers | LinkedIn follower count |
linkedin_employee_count | Employee count from LinkedIn |
legion_employee_count | Employee count from Data Legion |
legion_average_tenure | Average employee tenure (months) |
Enum Columns
| Column | Values |
|---|---|
type | private, public, nonprofit, government_agency, educational |
size | 1-10, 11-50, 51-200, 201-500, 501-1000, 1001-5000, 5001-10000, 10001+ |
Workforce Analytics Columns
| Column | Description |
|---|---|
legion_new_hire_count_1m / 3m / 6m / 12m | New hires in last 1/3/6/12 months |
legion_attrition_count_1m / 3m / 6m / 12m | Departures in last 1/3/6/12 months |
legion_employee_growth_rate_1m / 3m / 6m / 12m | Growth rate (%) |
legion_turnover_rate_1m / 3m / 6m / 12m | Turnover rate (%) |
Cross-Table Columns
These columns search across related tables and are automatically rewritten to subqueries:| Column | Description |
|---|---|
ticker_symbol / ticker | Stock ticker symbol |
exchange | Stock exchange |
social_url | Social media URLs |
alt_domain | Alternative domains |
Example Queries
Authorizations
Body
Request model for SQL query-based company search.
SQL query against company data (must not contain LIMIT)
1 - 10000Maximum results to return
1 <= x <= 100Number of results to skip for pagination (0-10000). Stable within a build; ordering may change across builds.
0 <= x <= 10000If true, format text fields in title case (names, company names, locations). Raw fields, IDs, URLs, codes, and confidence fields are excluded.
Comma-separated list of fields to include in response. If omitted, all fields are returned.
Comma-separated list of fields to exclude from response. Applied after include_fields filter.
If true, pretty-print JSON response with indentation.
Response
Success - query executed and results returned
List of matches sorted by confidence (descending). Capped at the request's limit.
For /company/search and /company/discover, the total number of rows matching the query's WHERE clause across the database (not just this page). For /company/enrich, the number of matches found for the input identifier. On search/discover, if the count subquery fails or times out, this falls back to the size of the returned page; the response header Total-Count-Status distinguishes the two cases.