Appearance
Fresh 2026
Post Insights
Reading
New Page Experience
This endpoint is supported for New Page Experience.
Example
HTTPPHP SDKJavaScript SDKAndroid SDKiOS SDK Graph API Explorer
GET /v25.0/{post-id}/insights HTTP/1.1
Host: graph.facebook.com/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/{post-id}/insights',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result *//* make the API call */
FB.api(
"/{post-id}/insights",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{post-id}/insights",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]\
initWithGraphPath:@"/{post-id}/insights"\
parameters:params\
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,\
id result,\
NSError *error) {\
// Handle the result\
}];If you want to learn how to use the Graph API, read our Using Graph API guide.
Parameters
| Parameter | Description |
|---|---|
date_preset<br>enum{today, yesterday, this_month, last_month, this_quarter, maximum, data_maximum, last_3d, last_7d, last_14d, last_28d, last_30d, last_90d, last_week_mon_sun, last_week_sun_sat, last_quarter, last_year, this_week_mon_today, this_week_sun_today, this_year} | Preset a date range, like lastweek, yesterday. If since or until presents, it does not work. |
metric<br>list<A valid metric for an insights endpoint> | The list of metrics that needs to be fetched |
period<br>enum{day, week, days_28, month, lifetime, total_over_range} | The aggregation period |
since<br>datetime | Lower bound of the time range to consider |
until<br>datetime | Upper bound of the time range to consider |
Fields
Reading from this edge will return a JSON formatted result:
{
"data": [],
"paging": {}
}data
A list of InsightsResult nodes.
paging
For more details about pagination, see the Graph API guide.
Error Codes
| Error | Description |
|---|---|
| 100 | Invalid parameter |
| 3001 | Invalid query |
| 200 | Permissions error |
| 190 | Invalid OAuth 2.0 Access Token |
Creating
You can't perform this operation on this endpoint.
Updating
You can't perform this operation on this endpoint.
Deleting
You can't perform this operation on this endpoint.
``
``