The Companies API LogoThe Companies API Logo
APIUse casesCompanies
LoginLogin
Get started
Authentication
Errors
Rate limits
Webhooks
Datapoints
Companies
Enrich from domain
Enrich from email
Enrich from social network
Count companies
Search companies
Search by name
Search by prompt
Search similar
Ask company
Fetch context
Find email patterns
Fetch analytics
Export analytics
Industries
Search industries
Find similar industries
Lists
Fetch lists
Create list
Fetch companies
Toggle companies
Locations
Search cities
Search counties
Search countries
Search states
Search continents
Actions
Request action
Fetch actions
Teams
Fetch team
Technologies
Search technologies
Utilities
API health
OpenAPI spec
Get started
Authentication
Errors
Rate limits
Webhooks
Datapoints
Companies
Enrich from domain
Enrich from email
Enrich from social network
Count companies
Search companies
Search by name
Search by prompt
Search similar
Ask company
Fetch context
Find email patterns
Fetch analytics
Export analytics
Industries
Search industries
Find similar industries
Lists
Fetch lists
Create list
Fetch companies
Toggle companies
Locations
Search cities
Search counties
Search countries
Search states
Search continents
Actions
Request action
Fetch actions
Teams
Fetch team
Technologies
Search technologies
Utilities
API health
OpenAPI spec

Ask questions about a company using our AI model

Ask any question about a company and get answers based on real-time web analysis.
GET
https://api.thecompaniesapi.com/v2/companies/:domain/ask
1 credit per request

You can specify the model to use (small or large) and optionally provide fields to structure the response.

The large model is more expensive but provides more detailed answers.

Signup to access all the features

Get your API token and start implementing the API in your product with 500 free credits.

No credit card required

Query parameters
domainstring (required)

The domain name of the company you want to inquire about.

…/companies/microsoft.com/ask

questionstring (required)

The specific question you want to ask about the company.

What products does this company offer?

fieldsobject

An array defining the simplified field structure for the response.

If not provided, the structure will be automatically generated based on your question.

Available values for each field:

- `description`: A description explaining the field's purpose (optional)

- `key`: A unique identifier string, typically in camelCase format (required)

- `type`: The data type of the field (required)

[{"description":"The products that the company offers","key":"products","type":"array|string"}]

modelstring

The AI model to be used for processing the question.

large

Possible values

large
small
Response schema
answerobject

The answer to the question in a structured way.

metaobject

The meta information about the response.

API response
{meta :{cost :10,credits :9089,},prompt :{context : "company" ,feature : "ask" ,id :1,model : "small" ,prompt : "What products does this company offer?" ,promptKey : "what-products-does-this-company-offer" ,response :{answer :{…},cost :10,count :1,domain : "microsoft.com" ,},updatedAt : "2025-07-03T14:06:41.865+02:00" ,},}
Code examples
Select your favorite language:
C#

Go

Java

JavaScript
SDK

PHP

Python

Ruby

Rust

import createClient from '@thecompaniesapi/sdk'

const tca = createClient({ apiToken: 'YOUR_API_TOKEN' })

const response = await tca.askCompany({
  domain: 'microsoft.com',
  question: 'What products does this company offer?',
  model: 'large', // 'small' is also available
  fields: [
    {
      key: 'products',
      type: 'array|string',
      description: 'The products that the company offers'
    }
  ]
})

const answer = response.data.answer // Structured AI response
const meta = response.data.meta // Meta information

Search for similar companies (competitors, your customers, etc.)

Send us one or more domains and we will return a list of similar companies.

Fetch the context of a company

Retrieve AI-generated insights about a company.

A glowing background image to highlight the titleA glowing background image to highlight the title
© 2025 The Companies API
  • Updates
  • Terms
  • Privacy
  • FAQ
  • Status

Fast-growing SaaS companies with remote teams