Fetch the details of your actions
Retrieve your most recent actions requests.
GET
https://api.thecompaniesapi.com/v2/actions
Free
You can use this feature to retrieve a list of your most recent actions, such as enrichment requests.
Each response contains useful properties, including the cost of the action, its status or the date it was performed.
You can use query parameters like page
and size
to navigate through your history.
Signup to access all our API features
Get your 500 free credits and start enriching and searching companies.
No credit card required
Parameters
fullboolean (optional)
Whether to fetch the full action details.
false
idsarray (optional)
The IDs of the actions to fetch.
[1,2]
listIdnumber (optional)
The ID of the list to fetch actions for.
1
pagenumber (optional)
The page to fetch (default to 1).
1
sizenumber (optional)
The number of actions to be returned (between 1 and 25). Default to 10.
10
statusstring (optional)
The status of the actions to retrieve.
Possible values
pending
completed
active
failed
Response schema
actionsarray
The list of actions.
metaobject
The metas information.
API response
{actions :[{cost :10,createdAt : "2024-08-23T17:02:47.296+02:00" ,data :{…},id :42,status : "pending" ,type : "jobs:request" ,updatedAt : "2024-08-23T17:02:47.296+02:00" ,},{cost :10,createdAt : "2024-08-23T17:02:40.000+02:00" ,data :{…},id :40,status : "completed" ,type : "jobs:request" ,updatedAt : "2024-08-23T17:02:40.000+02:00" ,},],meta :{currentPage :1,firstPage :1,lastPage :1,perPage :10,total :2,},}
import createClient from '@thecompaniesapi/sdk'
const tca = createClient({ apiToken: 'YOUR_API_TOKEN' })
const response = await tca.fetchActions({
status: 'completed',
page: 1,
size: 5
})
const actions = response.data.actions // Actions that match the query
const meta = response.data.meta // Meta information