Skip to main content
POST
Search companies using SQL query

Query Format

Write a SELECT * 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’s limit (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” with limit: 1 and total tells you how many accounts exist. The companion Total-Count-Status response header tells you how total was derived: exact (the true count — selective queries like the one above), estimate (on broad, low-selectivity queries the exact count exceeds its time budget, so total becomes the query planner’s row estimate — treat it as a magnitude, not a precise number), or page (neither available; total is just the returned page size). Search responses do not include match_metadata (that field is only populated by /company/enrich). A broad query returns the same response shape with an approximate total, flagged by the header:

Pagination

To page through results beyond the first 100, set offset to the number of rows to skip. Maximum offset is 10,000.
Ordering is deterministic within a build — the same request returns the same rows in the same order, so paged requests don’t overlap or skip rows. Builds run on a periodic cadence; ordering may change across builds, so paginate within a single client session, not across days.

Available Columns

Text Columns

Numeric Columns

Enum Columns

Workforce Analytics Columns

Cross-Table Columns

These columns search across related tables and are automatically rewritten to subqueries:

Example Queries

Authorizations

API-Key
string
header
required

Body

application/json

Request model for SQL query-based company search.

query
string
required

SQL query against company data (must not contain LIMIT)

Required string length: 1 - 10000
limit
integer
required

Maximum results to return

Required range: 1 <= x <= 100
offset
integer
default:0

Number of results to skip for pagination (0-10000). Stable within a build; ordering may change across builds.

Required range: 0 <= x <= 10000
titlecase
boolean
default:false

If true, format text fields in title case (names, company names, locations). Raw fields, IDs, URLs, codes, and confidence fields are excluded.

include_fields
string | null

Comma-separated list of fields to include in response. If omitted, all fields are returned.

exclude_fields
string | null

Comma-separated list of fields to exclude from response. Applied after include_fields filter.

pretty_print
boolean
default:false

If true, pretty-print JSON response with indentation.

Response

Success - query executed and results returned

matches
CompanyMatchResponse · object[]
required

List of matches sorted by confidence (descending). Capped at the request's limit.

total
integer
required

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 exact count exceeds its time budget (broad, low-selectivity queries) it falls back to the query planner's row estimate, and if that is unavailable, to the size of the returned page; the response header Total-Count-Status reports which (exact, estimate, or page).