Ads API - Pulling Device, location, etc Info




From the API it doesn’t seem like it’s possible to get device, location, gender, etc data from clicks or impressions of a campaign run.

But this info is available on the Ad Manager ‘Audience’ screen in the Web app.

Is it possible to get from the API?

Thanks and regards,


@EaglePtPartners: Please see this documentation for information on how to do this using the Ads API. Note that you must use the POST /1/stats/jobs/accounts/:account_id for this. Thanks.


Thanks so much for this!

I’m running the ‘POST jobs’ API against a campaign that ran in the past but it’s returning an empty response - for both the request & response data. But I’m getting a 200 response code. Any ideas?

I’m using twurl for this

  "request": {
    "params": {}
  "data_type": "job",
  "next_cursor": null,
  "data": []


FYI - twurl command we’re using:

twurl -t -H “/1/stats/jobs/accounts/18ce54h6gph?entity=LINE_ITEM&entity_ids=89jlk&start_time=2017-03-28T00:00:00Z&end_time=2017-03-30T00:00:00Z&granularity=TOTAL&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT” | jq

The same details work fine when getting engagement data:

twurl -t -H “/1/stats/accounts/18ce54h6gph?start_time=2017-03-28T00:00:00Z&end_time=2017-03-30T00:00:00Z&granularity=TOTAL&entity=LINE_ITEM&entity_ids=89jlk&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER” | jq


Thanks for providing these example requests, @EaglePtPartners. We’ll take a look and get back to you.


@EaglePtPartners: We’ve taken a closer look at these requests and they’re actually the identical—they use the same param values. Could you please clarify which request is causing problems?

In any case, looking at the response output, we can tell this came from a request to the GET /1/stats/jobs/accounts/:account_id endpoint—see "data_type": "job".

An example POST /1/stats/jobs/accounts/:account_id response (after going through the async flow, including downloading .gz file) looks like this (see "data_type": "stats"):

$ twurl -X POST -H "/1/stats/jobs/accounts/18ce54h6gph?entity=LINE_ITEM&entity_ids=89jlk&start_time=2017-03-28T00:00:00Z&end_time=2017-03-30T00:00:00Z&granularity=TOTAL&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT"
  "data_type": "stats",
  "time_series_length": 1,
  "data": [
      "id": "89jlk",
      "id_data": [
          "segment": null,
          "metrics": {
            "impressions": [
            "tweets_send": null,
            "qualified_impressions": null,
            "follows": null,
            "app_clicks": null,
            "retweets": null,
            "likes": null,
            "engagements": [
            "clicks": [
            "card_engagements": null,
            "replies": null,
            "url_clicks": [
            "carousel_swipes": null
  "request": {
    "params": {
      "start_time": "2017-03-28T00:00:00Z",
      "segmentation_type": null,
      "entity_ids": [
      "end_time": "2017-03-30T00:00:00Z",
      "country": null,
      "placement": "ALL_ON_TWITTER",
      "granularity": "TOTAL",
      "entity": "LINE_ITEM",
      "platform": null,
      "metric_groups": [

Hope this helps!


Thanks @juanshishido!

It was the missing POST that was causing the problem as you said.

Got it all working now. Thanks!

One question - when pulling device data, we need to pass in a ‘platform’ parameter. Is there a list of values documented we can have here? I’ve tried with a few but getting nothing back (iOS, Android).



Glad to hear it worked out, @EaglePtPartners!

Please take a look at our Metrics and Segmentation documentation for more information on how to pull PLATFORMS or DEVICES data. Thanks!


Thanks - but the info on that page doesn’t give values to pass in as the ‘platform’ parameter, unfortunately.

Any other page documenting possible values here?


@EaglePtPartners: Please see this post.