The Companies API LogoThe Companies API Logo
APIUse casesPricingCompanies
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

Export analytics data

Export analytics data about companies in various formats.
GET
https://api.thecompaniesapi.com/v2/companies/analytics/export
Free

You can choose specific attributes to export or get a full export of all analytics attributes.

The endpoint returns a file download in your chosen format.

Signup to access all our API features

Get your 500 free credits and start enriching and searching companies.

No credit card required

Parameters
actionIdnumber (optional)

The action ID to filter analytics.

attributesarray (optional)

An array of analytics attributes to export. Required if full is not true.

Possible values

about.businessType
about.industries
about.industry
about.totalEmployees
about.yearFounded
analytics.monthlyVisitors
apps
codes.naics
codes.sic
contacts
Show 13 more
formatstring (optional)

The format of the exported file (defaults to json).

Possible values

csv
json
txt
xls
xml
fullboolean (optional)

Whether to export all analytics attributes.

listIdnumber (optional)

Filter analytics to a specific list.

queryarray (optional)

An array of conditions to filter the companies.

Make sure this parameter is stringified and encoded.

GET
https://api.thecompaniesapi.com/v2/companies/analytics/export?query=%5B%7B%22attribute%22%3A%22about.industries%22%2C%22operator%22%3A%22or%22%2C%22sign%22%3A%22equals%22%2C%22values%22%3A%5B%22retail%22%2C%22internet%22%2C%22services%22%5D%7D%2C%7B%22attribute%22%3A%22locations.headquarters.country.code%22%2C%22operator%22%3A%22or%22%2C%22sign%22%3A%22equals%22%2C%22values%22%3A%5B%22us%22%2C%22fr%22%2C%22gb%22%5D%7D%5D&token=XXXXXX
The endpoint that defines your search criteria.
sizenumber (optional)

The number of results to return.

sortstring (optional)

The sort order of the results.

Possible values

asc
desc
Response schema
dataobject

An array of analytics data points containing counts and percentages for each value

metaobject

Additional metadata about the results.

Code examples
Select your favorite language:
Go
SDK

JavaScript
SDK

PHP
SDK

Python
SDK

import createClient from '@thecompaniesapi/sdk'

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

const response = await tca.exportCompaniesAnalytics({
  format: 'csv',
  attributes: ['about.industries', 'about.totalEmployees'],
  query: [
    {
      attribute: 'technologies.active',
      operator: 'or',
      sign: 'equals',
      values: ['shopify']
    }
  ]
})

const analytics = response.data.data // Aggregated values
const meta = response.data.meta // Meta information

Fetch analytics data for a query or your lists

Analyze and gain insights into companies that match your specified criteria.

Request an action on one or more companies

Request an action for a single company, multiple companies, or an entire list of companies.

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