Skip to main content
POST
/
company
/
discover
Discover companies using natural language
curl --request POST \
  --url https://api.example.com/company/discover \
  --header 'API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "AI companies with 100+ employees founded after 2015",
  "limit": 10
}
'
{
  "matches": [
    {
      "company": {
        "legion_id": "e9f2a4b6-8c3d-4e7f-a1b2-5d6e8f9a0c3b",
        "name": {
          "cleaned": "openai inc",
          "raw": [
            "OpenAI, Inc."
          ]
        },
        "domain": "openai.com",
        "industry": "technology, information and internet",
        "type": "private",
        "size": "1001-5000",
        "founded": 2015,
        "linkedin_url": "https://www.linkedin.com/company/openai",
        "linkedin_id": "17876832",
        "legion_employee_count": 3200,
        "legion_average_tenure": 18.6,
        "legion_employee_growth_rate": {
          "1m": 0.028,
          "3m": 0.085,
          "6m": 0.18,
          "12m": 0.42
        },
        "last_seen": "2026-01",
        "num_sources": 4
      }
    }
  ],
  "total": 1
}

How It Works

Describe what companies you’re looking for in plain English. The API translates your description into a SQL query and returns matching companies. The generated SQL query is returned in the Generated-Query response header so you can see exactly how your description was interpreted.

Example Queries

AI startups in San Francisco with over 50 employees
public companies in the healthcare industry
fast-growing tech companies hiring aggressively
enterprise SaaS companies founded after 2015
companies with high employee turnover in the last year
For precise control over filtering, use Company Search with SQL syntax instead.

Authorizations

API-Key
string
header
required

Body

application/json

Request model for natural language company discovery.

query
string
required

Natural language description of companies you're looking for

Required string length: 3 - 1000
limit
integer
Required range: 1 <= x <= 100
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 - companies found matching natural language query. Returns Generated-Query header with the SQL query.

matches
CompanyMatchResponse · object[]
required
total
integer
required