Fetch companies in your list
Companies inside your lists can be retrieved page by page with page
and size
.
You can also sort them with sortKey
and sortOrder
.
To filter your companies, you can use the query
parameter.
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 page to fetch (default to 1).
/lists/:listId/companies?page=1
The number of companies to be returned (between 1 and 100). Default to 10.
/lists/:listId/companies?size=10
The query to filter the companies inside your list.
Make sure this parameter is stringified and encoded.
An array of multiple fields combined to sort the results.
…/lists/:listId/companies?sortFields=%5B%7B%22key%22%3A%22meta.score%22%2C%22order%22%3A%22desc%22%7D%5D
Make sure this parameter is stringified and encoded.
The field to sort the results.
…/lists/:listId/companies?sortKey=meta.score
Possible values
The order to sort the results.
…/lists/:listId/companies?sortOrder=asc
Possible values
The metas information.
import createClient from '@thecompaniesapi/sdk'
const tca = createClient({ apiToken: 'YOUR_API_TOKEN' })
const response = await tca.fetchCompaniesInList({
listId: 1234
})
const companies = response.data.companies // Companies that match the list
const meta = response.data.meta // Meta information