LinkedIn weekly statistics
The report groups LinkedIn outreach statistics by campaign and week, starting from the selected start date. It shows how many prospects are enrolled in each campaign and tracks profile visits, connection requests, direct messages, InMail messages, acceptances, replies, and bounced actions.
Generating a report
Request the report for a date range and save the returned hash.
Request
Endpoint
POST https://api.woodpecker.co/rest/v2/reports/linkedin_weekly_statistics
Headers
x-api-key: {YOUR_API_KEY}
Content-Type: application/json
See the authentication guide.
Body
{
"from": "2026-11-09",
"to": "2026-11-15"
}
Use recent dates when running the samples. The start date can be at most 30 days before the day you make the request.
Body schema
| Field | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Start date in YYYY-MM-DD format |
to | string | Yes | End date in YYYY-MM-DD format |
Request samples
Generate a report hash
- cURL
- Python
- Java
- Node.js
- PHP
curl --request POST \
--url "https://api.woodpecker.co/rest/v2/reports/linkedin_weekly_statistics" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"from": "2026-11-09",
"to": "2026-11-15"
}'
import requests
def generate_linkedin_report():
url = "https://api.woodpecker.co/rest/v2/reports/linkedin_weekly_statistics"
headers = {
"x-api-key": "{YOUR_API_KEY}",
"Content-Type": "application/json"
}
payload = {"from": "2026-11-09", "to": "2026-11-15"}
response = requests.post(url, headers=headers, json=payload)
if response.status_code == 200:
return response.json()
raise Exception(f"POST request failed: {response.status_code}, {response.text}")
if __name__ == "__main__":
try:
print("POST response:", generate_linkedin_report())
except Exception as error:
print("Error:", error)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class WoodpeckerApiClient {
public static void main(String[] args) {
try {
String url = "https://api.woodpecker.co/rest/v2/reports/linkedin_weekly_statistics";
String jsonData = """
{
"from": "2026-11-09",
"to": "2026-11-15"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("x-api-key", "{YOUR_API_KEY}")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonData))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() != 200) {
throw new IllegalStateException("POST request failed: " + response.statusCode() + ", " + response.body());
}
System.out.println("POST response: " + response.body());
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
}
const axios = require('axios');
async function generateLinkedinReport() {
const url = 'https://api.woodpecker.co/rest/v2/reports/linkedin_weekly_statistics';
const headers = {
'x-api-key': '{YOUR_API_KEY}',
'Content-Type': 'application/json'
};
const data = { from: '2026-11-09', to: '2026-11-15' };
try {
const response = await axios.post(url, data, { headers });
console.log('POST response:', response.data);
} catch (error) {
console.error('POST request failed:', error.response ? error.response.status : error.message);
}
}
generateLinkedinReport();
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
$client = new Client([
'base_uri' => 'https://api.woodpecker.co/rest/v2/',
'headers' => [
'x-api-key' => getenv('WOODPECKER_API_KEY'),
'Content-Type' => 'application/json',
],
]);
try {
$response = $client->post('reports/linkedin_weekly_statistics', [
'json' => [
'from' => '2026-11-09',
'to' => '2026-11-15',
],
]);
echo $response->getStatusCode() . PHP_EOL;
echo $response->getBody() . PHP_EOL;
} catch (RequestException $e) {
echo 'Error: ' . $e->getMessage() . PHP_EOL;
if ($e->hasResponse()) {
echo $e->getResponse()->getBody() . PHP_EOL;
}
}
Response
Response examples
- 200
- 400
- 401
- 404
- 405
- 500
Use the returned hash to retrieve the report.
{
"hash": "b12a4779ced8e31a688baeb3bf7137f8432ee31bff70bb390a37ebf18cb29982"
}
Body schema
| Field | Type | Description |
|---|---|---|
hash | string | Identifier of the requested report |
The date fields are missing, invalid, or out of order, or from is more than 30 days in the past.
{
"title": "Bad Request",
"status": 400,
"detail": "Reports can be generated from the last 30 days. Change the from parameter",
"timestamp": "2026-11-14 10:15:00"
}
Body schema
| Field | Type | Description |
|---|---|---|
title | string | HTTP status reason phrase |
status | integer | HTTP status code |
detail | string or null | Message describing the error |
timestamp | string | Time of the error in UTC, formatted as YYYY-MM-DD HH:MM:SS |
The API key is missing or invalid, or the account lacks API access. See the authentication guide.
{
"title": "Unauthorized",
"status": 401,
"detail": "Invalid api key",
"timestamp": "2026-11-14 10:15:00"
}
Body schema
| Field | Type | Description |
|---|---|---|
title | string | HTTP status reason phrase |
status | integer | HTTP status code |
detail | string or null | Message describing the error |
timestamp | string | Time of the error in UTC, formatted as YYYY-MM-DD HH:MM:SS |
Check the request URL.
{
"title": "Not Found",
"status": 404,
"detail": "Requested resource does not exist",
"timestamp": "2026-11-14 10:15:00"
}
Body schema
| Field | Type | Description |
|---|---|---|
title | string | HTTP status reason phrase |
status | integer | HTTP status code |
detail | string or null | Message describing the error |
timestamp | string | Time of the error in UTC, formatted as YYYY-MM-DD HH:MM:SS |
Incorrect report name in the URL. Please review the endpoint URL
Status: 405
Body: None
An unexpected server error occurred. The detail value depends on the error.
{
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error has occurred. Please try again later.",
"timestamp": "2026-11-14 10:15:00"
}
Body schema
| Field | Type | Description |
|---|---|---|
title | string | HTTP status reason phrase |
status | integer | HTTP status code |
detail | string or null | Message describing the error |
timestamp | string | Time of the error in UTC, formatted as YYYY-MM-DD HH:MM:SS |
Retrieving a report
Send a GET request with the hash returned by the generation request. If status is PENDING, WAITING, or IN_PROGRESS, retry the GET with the same hash. The report is available when status is READY. If status is FAILED, stop polling.
Request
Endpoint
GET https://api.woodpecker.co/rest/v2/reports/{hash}
Headers
x-api-key: {YOUR_API_KEY}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hash | string | Yes | Path parameter returned by the generation request |
Rows are ordered by client name, interval start date, and campaign ID.
Request samples
Retrieve a report using the hash
Replace the example hash with the value returned by your generation request.
- cURL
- Python
- Java
- Node.js
- PHP
curl --request GET \
--url "https://api.woodpecker.co/rest/v2/reports/{hash}" \
--header "x-api-key: {YOUR_API_KEY}"
import requests
def get_report_by_hash(report_hash):
url = f"https://api.woodpecker.co/rest/v2/reports/{report_hash}"
headers = {
"x-api-key": "{YOUR_API_KEY}"
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
return response.json()
raise Exception(f"GET request failed: {response.status_code}, {response.text}")
if __name__ == "__main__":
try:
print("GET response:", get_report_by_hash("b12a4779ced8e31a688baeb3bf7137f8432ee31bff70bb390a37ebf18cb29982"))
except Exception as error:
print("Error:", error)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class WoodpeckerApiClient {
public static void main(String[] args) {
try {
String reportHash = "b12a4779ced8e31a688baeb3bf7137f8432ee31bff70bb390a37ebf18cb29982";
String url = "https://api.woodpecker.co/rest/v2/reports/" + reportHash;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("x-api-key", "{YOUR_API_KEY}")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() != 200) {
throw new IllegalStateException("GET request failed: " + response.statusCode() + ", " + response.body());
}
System.out.println("GET response: " + response.body());
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
}
const axios = require('axios');
async function getReportByHash(reportHash) {
const url = `https://api.woodpecker.co/rest/v2/reports/${reportHash}`;
const headers = {
'x-api-key': '{YOUR_API_KEY}'
};
try {
const response = await axios.get(url, { headers });
console.log('GET response:', response.data);
} catch (error) {
console.error('GET request failed:', error.response ? error.response.status : error.message);
}
}
getReportByHash('b12a4779ced8e31a688baeb3bf7137f8432ee31bff70bb390a37ebf18cb29982');
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
$client = new Client([
'base_uri' => 'https://api.woodpecker.co/rest/v2/',
'headers' => [
'x-api-key' => getenv('WOODPECKER_API_KEY'),
],
]);
$reportHash = 'b12a4779ced8e31a688baeb3bf7137f8432ee31bff70bb390a37ebf18cb29982';
try {
$response = $client->get('reports/' . $reportHash);
echo $response->getStatusCode() . PHP_EOL;
echo $response->getBody() . PHP_EOL;
} catch (RequestException $e) {
echo 'Error: ' . $e->getMessage() . PHP_EOL;
if ($e->hasResponse()) {
echo $e->getResponse()->getBody() . PHP_EOL;
}
}
Response
Response examples
- 200
- 401
- 404
- 422
- 500
Each action and outcome metric counts distinct prospects for the campaign and week.
{
"status": "READY",
"report": {
"description": "Linkedin_weekly_statistics_2026-11-09-2026-11-15",
"data": [
{
"week_range": "2026-11-09 - 2026-11-15",
"client_name": "Main account",
"client_id": 71258,
"campaign_id": 3826104,
"campaign_name": "Pied Piper partner outreach",
"prospects_in_campaign": 320,
"visit_profile": 147,
"connection_request": 98,
"direct_message": 34,
"inmail_message": 12,
"accepted_connection_request": 31,
"replied_to_connection_request": 5,
"direct_message_replied": 8,
"inmail_message_replied": 3,
"action_bounced": 4
},
{
"week_range": "2026-11-09 - 2026-11-15",
"client_name": "Main account",
"client_id": 71258,
"campaign_id": 3826159,
"campaign_name": "Bachmanity event follow-up",
"prospects_in_campaign": 175,
"visit_profile": 64,
"connection_request": 43,
"direct_message": 19,
"inmail_message": 7,
"accepted_connection_request": 17,
"replied_to_connection_request": 2,
"direct_message_replied": 5,
"inmail_message_replied": 1,
"action_bounced": 2
}
]
}
}
Until the report reaches READY, report is null.
{
"status": "PENDING",
"report": null
}
Body schema
| Field | Type | Description |
|---|---|---|
status | string | Report generation status. One of PENDING, WAITING, IN_PROGRESS, READY, or FAILED |
report | object or null | Report contents when the status is READY. Otherwise null |
└─ report.description | string | Report name, including the date range it covers |
└─ report.data | array | Campaign statistics by interval, or an empty array when no rows match |
└─ data[].week_range | string | Start and end dates of the interval in YYYY-MM-DD - YYYY-MM-DD format |
└─ data[].client_name | string | Name of the agency client account or Main account for the requesting account |
└─ data[].client_id | integer | ID of the account that owns the campaign |
└─ data[].campaign_id | integer | Campaign ID |
└─ data[].campaign_name | string | Campaign name |
└─ data[].prospects_in_campaign | integer | Total prospects in the campaign, regardless of when they were added |
└─ data[].visit_profile | integer | Distinct prospects whose profiles were visited |
└─ data[].connection_request | integer | Distinct prospects who were sent a connection request |
└─ data[].direct_message | integer | Distinct prospects who were sent a direct message |
└─ data[].inmail_message | integer | Distinct prospects who were sent an InMail message |
└─ data[].accepted_connection_request | integer | Distinct prospects who accepted a connection request |
└─ data[].replied_to_connection_request | integer | Distinct prospects who replied to a connection request |
└─ data[].direct_message_replied | integer | Distinct prospects who replied to a direct message |
└─ data[].inmail_message_replied | integer | Distinct prospects who replied to an InMail message |
└─ data[].action_bounced | integer | Distinct prospects with a bounced LinkedIn action |
The API key is missing or invalid, or the account lacks API access. See the authentication guide.
{
"title": "Unauthorized",
"status": 401,
"detail": "Invalid api key",
"timestamp": "2026-11-14 10:15:00"
}
Body schema
| Field | Type | Description |
|---|---|---|
title | string | HTTP status reason phrase |
status | integer | HTTP status code |
detail | string or null | Message describing the error |
timestamp | string | Time of the error in UTC, formatted as YYYY-MM-DD HH:MM:SS |
The report could not be found for this hash and user. Check the hash and use the same account context as in the generation request.
{
"title": "Not Found",
"status": 404,
"detail": "Requested resource does not exist",
"timestamp": "2026-11-14 10:15:00"
}
Body schema
| Field | Type | Description |
|---|---|---|
title | string | HTTP status reason phrase |
status | integer | HTTP status code |
detail | string or null | Message describing the error |
timestamp | string | Time of the error in UTC, formatted as YYYY-MM-DD HH:MM:SS |
The hash points to a report type that this endpoint cannot return.
{
"title": "Unprocessable Entity",
"status": 422,
"detail": "This report type is not supported.",
"timestamp": "2026-11-14 10:15:00"
}
Body schema
| Field | Type | Description |
|---|---|---|
title | string | HTTP status reason phrase |
status | integer | HTTP status code |
detail | string or null | Message describing the error |
timestamp | string | Time of the error in UTC, formatted as YYYY-MM-DD HH:MM:SS |
An unexpected server error occurred. The detail value depends on the error.
{
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error has occurred. Please try again later.",
"timestamp": "2026-11-14 10:15:00"
}
Body schema
| Field | Type | Description |
|---|---|---|
title | string | HTTP status reason phrase |
status | integer | HTTP status code |
detail | string or null | Message describing the error |
timestamp | string | Time of the error in UTC, formatted as YYYY-MM-DD HH:MM:SS |