Skip to content

Ads Pixel Segments

Updated: May 18, 2019

Reading

Example

Select language

HTTPPHP SDKJavaScript SDKAndroid SDKiOS SDK


GET /v25.0/{ads-pixel-id}/segments HTTP/1.1
Host: graph.facebook.com

Try it in Graph API Explorer

If you want to learn how to use the Graph API, read our Using Graph API guide

Parameters

ParameterDescription
date_preset stringfriendly range such as last_7_days, instead of start/end date
end_date datetimeend date (exclusive) of traffic to analyze
site_cpm int64CPM expected for site-wide ads. Used to project segment-level CPM and revenue.
sort stringField to sort the result, and direction of sorting. You can specify sorting direction by appending "_ascending" or "_descending" to the sort field. By default, the sorting direction is ascending.
start_date datetimefirst date of traffic to analyze

Fields

Reading from this edge will return a JSON formatted result:

{
"data": [],
"paging": {}
}
data

A list of AdsSegments nodes.

paging

For more details about pagination, see the Graph API guide.

Error Codes

Error CodeDescription
100Invalid parameter

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.

Unofficial mirror for reference/search purposes. All content originates from developers.facebook.com — see the source link at the top of each page. Machine-readable indexes: llms.txt · llms-full.txt · About