Query Companies
query_companiesColumns: id, display_name, domain (normalized bare host), linkedin_company_id, owner_email,
data (JSONB), created_at, updated_at. Sliq's CRM is deals and tasks: to see whether a company
has a deal or a task, use query_deals (status='all') / query_crm_tasks with company_id.
JSONB queries: data->>'some_key' ILIKE '%...%'.
Firmographic columns (captured from company enrichment; blank/NULL until enriched): linkedin_url (bare slug), industry, description, location (HQ), logo_url, employee_count, follower_count, founded_year, company_type, annual_revenue, total_funding, latest_funding_stage.
To list the people you know at a company, take an id from here and call query_people with
where_clause="company_profile_id = <id>".
Pass group_by for per-bucket counts over ALL your companies instead of a row list — a
whole-set aggregate, never capped at the 200-row limit, so it answers "how many companies
per industry/location" without paging. Ignores where_clause.
In row mode (group_by omitted) — a dict with count, truncated, and items array (each row
{id, display_name, domain, linkedin_company_id, owner_email,
linkedin_url, industry, description, location, logo_url, employee_count, follower_count,
founded_year, company_type, annual_revenue, total_funding, latest_funding_stage, data,
created_at, updated_at}).
In aggregate mode (group_by set) — a dict {group_by, groups} where groups is a list of
{key, count} ordered by count descending.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default 50, capped at 200). | |
| offset | No | Rows to skip for paging (default 0). When the result is truncated, re-call with offset += limit for the next page. | |
| group_by | No | Aggregate mode, returned instead of the row list — whole-set per-bucket counts over all your companies (not capped by `limit`), bucketed by "industry" or "location". Omit for the row list. | |
| order_by | No | SQL ORDER BY (default: created_at DESC). | created_at DESC |
| where_clause | No | SQL WHERE condition (default: all your companies). Examples: "domain = 'stripe.com'", "display_name ILIKE '%acme%'". | 1=1 |