Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.thehog.ai/llms.txt

Use this file to discover all available pages before exploring further.

The company search endpoint lets you query The Hog’s company database using any combination of firmographic filters (employee count, revenue, founding year, location), technographic filters (required tech stack, keyword category), and intent signals (hiring activity, recent funding, growth band). When you include a project ID, each result is annotated with brand voice, matched personas, and competitive intelligence specific to that project. Credits are charged after the search completes, based on the number of unique domains that required third-party provider lookups — not on the total rows returned.

Request

POST https://api.thehog.ai/api/companies/search

Authentication

All requests require a Bearer token in the Authorization header. Your token is scoped to your organization and must have sufficient credits before a search is executed.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <your-api-key>
X-Project-IdNoProject context. Overridden by projectId in the request body if both are provided.

Body Parameters

query
string
Free-text search applied to company name and domain. Must be at least 1 character when provided. Example: "Acme".
industry
string
Filter by industry. Accepts an exact match or a partial (case-insensitive) match. Example: "Software".
employee_count_min
number
Minimum employee count (inclusive). Must be 0 or greater.
employee_count_max
number
Maximum employee count (inclusive). Must be 0 or greater.
domain
string
Filter by company domain. Accepts an exact match or partial match. Example: "acme.com".
location
string
Filter by country or city. Example: "United States".
founding_year_min
number
Minimum founding year (inclusive). Accepted range: 1800–2100.
founding_year_max
number
Maximum founding year (inclusive). Accepted range: 1800–2100.
revenue_min
number
Minimum annual revenue in USD (inclusive). Must be 0 or greater. Example: 1000000.
revenue_max
number
Maximum annual revenue in USD (inclusive). Must be 0 or greater. Example: 50000000.
tech_stack
string[]
Array of required technologies. Only companies using all listed tools are returned. Example: ["Salesforce", "HubSpot"].
keyword_category
string
Keyword advertising category filter. Example: "PPC - CRM".
hiring
boolean
When true, returns only companies with an active hiring signal. When false, excludes companies that are hiring.
funding
boolean
When true, returns only companies with a recent funding signal. When false, excludes recently funded companies.
growth
string
Growth band filter. Accepted values: "low", "medium", "high".
limit
number
default:"20"
Number of results per page. Minimum 1, maximum 100. Defaults to 20.
offset
number
default:"0"
Zero-based pagination offset. Defaults to 0.
projectId
string
Project context override. When set, this value takes precedence over the X-Project-Id header. Adds brand voice, persona matching, and competitive intelligence to each result.

Response

companies
CompanyCard[]
Paginated list of matching company cards.
total
number
Total number of companies matching your filters, regardless of page size.
hasMore
boolean
true when additional pages of results exist beyond the current offset.
projectContext
object
Present only when a projectId is provided. Contains project-specific enrichment for each result.
metering
object
Billing and usage data for this request.

Status Codes

CodeMeaning
200Success. Results returned.
401Missing or invalid Bearer token.
402Insufficient credits. Your balance is below the worst-case estimate for this query.
403Organization context missing or forbidden.

Examples

curl -X POST https://api.thehog.ai/api/companies/search \
  -H "Authorization: Bearer <your-api-key>" \
  -H "X-Project-Id: proj_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "industry": "Software",
    "employee_count_min": 50,
    "employee_count_max": 500,
    "tech_stack": ["Salesforce", "HubSpot"],
    "hiring": true,
    "growth": "high",
    "limit": 10,
    "offset": 0
  }'