Ask questions about a company using our AI model
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
The domain name of the company you want to inquire about.
…/companies/microsoft.com/ask
The specific question you want to ask about the company.
What products does this company offer?
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"}]
The AI model to be used for processing the question.
large
Possible values
The answer to the question in a structured way.
The meta information about the response.
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