Checking API usage statistics
This page explains how to check Linked API usage statistics. You can use this information to stay within LinkedIn limits for your account.
In the Node SDK this is linkedapi.getApiUsage() – the call is below.
In the Python SDK this is linkedapi.get_api_usage() – the call is below.
In the CLI this is linkedin stats usage – the command is below.
In addition to monitoring usage, you can configure action limits for each account on the platform. When a limit is reached, actions will automatically return a
limitExceedederror instead of executing.
We provide statistics as an array of all actions executed during a specific period. To access it, make a GET request to the following endpoint with 2 parameters:
GET https://api.linkedapi.io/stats/actions?start={}&end={}Parameters
In the SDK this is the getApiUsage method; it takes start and end and returns the array below in data.
In the CLI this is linkedin stats usage:
linkedin stats usage --start <timestamp> --end <timestamp> [flags]| Flag | Type | Required | Description |
|---|---|---|---|
--start | string | yes | Start date in ISO timestamp |
--end | string | yes | End date in ISO timestamp |
start– timestamp from which the statistics will be retrieved.end– timestamp up to which the statistics will be retrieved.
The difference between
startandendmust not exceed 30 days.
Result
In response, you receive an array of actions executed during the specified period:
Result – data is the result array below, one item per action executed during the period:
Output – with --json or into a pipe, the CLI prints this result array as data:
{
"success": true,
"result": [
{
"actionType": "st.openCompanyPage",
"success": true,
"time": "2023-01-02T12:30:00Z"
},
{
"actionType": "st.sendMessage",
"success": false,
"time": "2023-01-03T12:30:00Z"
},
{
"actionType": "nv.retrieveCompanyEmployees",
"success": true,
"time": "2023-01-04T12:30:00Z"
},
{
"actionType": "st.sendConnectionRequest",
"success": true,
"time": "2023-01-07T12:30:00Z"
}
...
]
}In case of an unsuccessful request, you'll receive one of the common errors.