Skip to content
Dashboard

Instagram automation numbers over a period

GET
/instagram/stats
curl --request GET \
--url 'https://app.whatsetter.com/api/v1/instagram/stats?days=7&tz=Europe%2FParis' \
--header 'Authorization: Bearer <token>'

What the account’s automations did over 7, 30 or 90 days, and the same for the period just before (to compare): comments received, first private messages sent, people who replied to them, links sent and opened, e-mail addresses captured, qualified leads. In totals, by_day (in tz), by_automation and by_post (media_id), each split by network: instagram, and facebook for the copy of the automations on the linked Facebook Page. Read from the account’s own journal, like the dashboard’s « Statistiques »; capped: true means the account is so busy the numbers are a floor. Requires scope instagram:read.

account_id
string

Required when the workspace has several Instagram accounts.

days
integer
default: 30
Allowed values: 7 30 90
tz
string
Example
Europe/Paris

IANA time zone the days are read in (default the account’s agent’s).

The numbers

Media typeapplication/json
object
data
object
account
object
id
string
username
string | null
period
object
days
integer
Allowed values: 7 30 90
from
string format: date-time
to
string format: date-time
previous_from

The start of the period before (it ends at from).

string format: date-time
tz
string
totals
object
instagram
object
comments
integer
messages_sent

First private messages of an automation.

integer
replied

People who answered that message.

integer
links_sent
integer
link_clicks
integer
emails

E-mail addresses captured.

integer
qualified

People the agent qualified (once each).

integer
facebook
object
comments
integer
messages_sent

First private messages of an automation.

integer
replied

People who answered that message.

integer
links_sent
integer
link_clicks
integer
emails

E-mail addresses captured.

integer
qualified

People the agent qualified (once each).

integer
previous

The same numbers over the period before.

object
instagram
object
comments
integer
messages_sent

First private messages of an automation.

integer
replied

People who answered that message.

integer
links_sent
integer
link_clicks
integer
emails

E-mail addresses captured.

integer
qualified

People the agent qualified (once each).

integer
facebook
object
comments
integer
messages_sent

First private messages of an automation.

integer
replied

People who answered that message.

integer
links_sent
integer
link_clicks
integer
emails

E-mail addresses captured.

integer
qualified

People the agent qualified (once each).

integer
by_day
Array<object>
object
date

YYYY-MM-DD in tz; the first day is partial.

string
instagram
object
comments
integer
messages_sent
integer
replied
integer
qualified
integer
facebook
object
comments
integer
messages_sent
integer
replied
integer
qualified
integer
by_automation
Array<object>
object
automation_id
string
name

Null for an automation deleted since.

string | null
instagram
object
comments
integer
messages_sent

First private messages of an automation.

integer
replied

People who answered that message.

integer
links_sent
integer
link_clicks
integer
emails

E-mail addresses captured.

integer
qualified

People the agent qualified (once each).

integer
facebook
object
comments
integer
messages_sent

First private messages of an automation.

integer
replied

People who answered that message.

integer
links_sent
integer
link_clicks
integer
emails

E-mail addresses captured.

integer
qualified

People the agent qualified (once each).

integer
by_post
Array
object
media_id

The Instagram media id

string
network
string
Allowed values: instagram facebook
comments
integer
messages_sent

First private messages of an automation.

integer
replied

People who answered that message.

integer
links_sent
integer
link_clicks
integer
emails

E-mail addresses captured.

integer
qualified

People the agent qualified (once each).

integer
capped

The journal was read up to a ceiling; the numbers are a floor.

boolean
Example
{
"data": {
"account": {
"id": "68f1c2d3e4f5a6b7c8d9e0f1",
"username": "acme.studio"
},
"period": {
"days": 7,
"from": "2026-10-23T18:00:00.000Z",
"to": "2026-10-30T18:00:00.000Z",
"previous_from": "2026-10-16T18:00:00.000Z",
"tz": "Europe/Paris"
},
"totals": {
"instagram": {
"comments": 214,
"messages_sent": 188,
"replied": 61,
"links_sent": 54,
"link_clicks": 39,
"emails": 12,
"qualified": 9
},
"facebook": {
"comments": 12,
"messages_sent": 10,
"replied": 3,
"links_sent": 3,
"link_clicks": 2,
"emails": 0,
"qualified": 1
}
},
"previous": {
"instagram": {
"comments": 150,
"messages_sent": 131,
"replied": 40,
"links_sent": 37,
"link_clicks": 25,
"emails": 8,
"qualified": 5
},
"facebook": {
"comments": 0,
"messages_sent": 0,
"replied": 0,
"links_sent": 0,
"link_clicks": 0,
"emails": 0,
"qualified": 0
}
},
"by_day": [
{
"date": "2026-10-30",
"instagram": {
"comments": 31,
"messages_sent": 27,
"replied": 9,
"qualified": 2
},
"facebook": {
"comments": 2,
"messages_sent": 2,
"replied": 1,
"qualified": 0
}
}
],
"by_automation": [
{
"automation_id": "6900a1b2c3d4e5f6a7b8c9d0",
"name": "Buyer's guide",
"instagram": {
"comments": 0,
"messages_sent": 188,
"replied": 61,
"links_sent": 54,
"link_clicks": 39,
"emails": 12,
"qualified": 9
},
"facebook": {
"comments": 0,
"messages_sent": 10,
"replied": 3,
"links_sent": 3,
"link_clicks": 2,
"emails": 0,
"qualified": 1
}
}
],
"by_post": [
{
"media_id": "18034567890123456",
"network": "instagram",
"comments": 214,
"messages_sent": 188,
"replied": 61,
"links_sent": 54,
"link_clicks": 39,
"emails": 12,
"qualified": 9
}
],
"capped": false
}
}

Missing, unknown or revoked API key

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

The key lacks the required scope (insufficient_scope), the plan does not have this part of the API (not_in_plan), or Instagram is not enabled on the workspace (instagram_not_enabled, Instagram routes)

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Resource not found in this workspace

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Invalid parameter or body (also an invalid or expired cursor)

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}