Search companies
Search companies with a structured filter AST, sorting, and cursor pagination.
Structured query AST
Each clause has the shape { field, operator, value }. You can pass a single clause or wrap up to 15 in a top-level AND group:
{
"query": {
"operator": "AND",
"value": [
{ "field": "plan", "operator": "IN", "value": ["enterprise", "pro"] },
{ "field": "monthlySpend", "operator": ">", "value": 1000 }
]
},
"sort": "monthlySpend:desc",
"limit": 20
}
Top-level OR groups and nested groups are not supported in this version.
Supported fields and operators
Field names are camelCase, matching the rest of the v2 public API. Snake_case names that this endpoint originally shipped with (external_id, monthly_spend, company_size, linked_users, last_activity, created_at) are still accepted for back-compat but are deprecated — please migrate to camelCase in new code.
| Field | Type | Operators |
|---|---|---|
externalId | string (caller-provided company id) | =, !=, IN, NIN |
name | string | =, !=, IN, NIN, ~ |
monthlySpend | number | =, !=, >, < |
plan | string | =, !=, IN, NIN |
industry | string | =, !=, IN, NIN |
website | string | =, !=, IN, NIN |
companySize | number | =, !=, >, < |
linkedUsers | number | =, !=, >, < |
lastActivity | unix seconds | =, !=, >, < |
createdAt | unix seconds | =, !=, >, < |
The name ~ "..." operator runs a word-aware substring search via the underlying text index. Other string operators (!~, ^, $) are reserved for future use and currently return 400.
A query consisting only of != or NIN clauses is rejected with query_too_broad to prevent full-org scans. Combine the negation with at least one positive clause (=, IN, >, <) instead.
Sort
Allowed values:
createdAt:desc(default),createdAt:ascmonthlySpend:desc,monthlySpend:asclastActivity:desc,lastActivity:asc
Snake_case sort axes (created_at:desc, monthly_spend:asc, last_activity:desc) are accepted for back-compat — the cursor encodes the canonical camelCase identity, so a caller can switch naming conventions mid-pagination without restarting.
The chosen sort axis is encoded in the cursor; switching sort mid-pagination returns 400 invalid_cursor. Restart pagination without a cursor when changing sort.
Pagination
Cursor-based, limit between 1 and 100 (default 10). totalCount is approximate and capped at 5000; totalCountCapped is true when the real count may be higher.
Response
Returns a standard list envelope with company rows identical to GET /v2/companies/{id}.
Version Availability
This endpoint is only available in API version 2026-01-01.nova and newer.
Search companies
curl https://do.featurebase.app/v2/companies/search \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $FEATUREBASE_API_KEY" \
-d '{
"cursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9",
"limit": 10,
"sort": "createdAt:desc"
}'{
"data": [
{
"id": "507f1f77bcf86cd799439011",
"companyId": "comp_12345",
"companySize": 250,
"createdAt": "2025-01-01T12:00:00.000Z",
"industry": "Technology",
"lastActivity": "2025-01-15T00:00:00.000Z",
"linkedUsers": 15,
"monthlySpend": 5000,
"name": "Acme Inc",
"object": "company",
"plan": "enterprise",
"updatedAt": "2025-01-10T15:30:00.000Z",
"website": "https://acme.com",
"customFields": {
"location": "bar",
"priority": "bar"
}
}
],
"nextCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9",
"object": "list",
"totalCount": 42,
"totalCountCapped": false
}Returns Examples
{
"data": [
{
"id": "507f1f77bcf86cd799439011",
"companyId": "comp_12345",
"companySize": 250,
"createdAt": "2025-01-01T12:00:00.000Z",
"industry": "Technology",
"lastActivity": "2025-01-15T00:00:00.000Z",
"linkedUsers": 15,
"monthlySpend": 5000,
"name": "Acme Inc",
"object": "company",
"plan": "enterprise",
"updatedAt": "2025-01-10T15:30:00.000Z",
"website": "https://acme.com",
"customFields": {
"location": "bar",
"priority": "bar"
}
}
],
"nextCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9",
"object": "list",
"totalCount": 42,
"totalCountCapped": false
}