Ads API GET query: 200 response, no data


#1

Hi there,

My app ID is 14740327. I have been granted access.
I can GET all accounts without issue.

However, this query does not work for me. Here are my headers

https://ads-api.twitter.com/2/stats/accounts/18ce54jzpqd?entity=PROMOTED_TWEET&entity_ids=1j2n90,1j2n91,1j2n92,1j2n93,1krx2o,1krx2p,1krx2q,1krx2r,1kxz4k,1kxz4l,1kxz4q,1kxz4r,1kxz4s,1kxzo4,1l91d3,1l91d4,1l91d7,1l91d8,1l91d9,1l91da&start_time=2018-01-21&end_time=2018-01-28&granularity=DAY&placement=ALL_ON_TWITTER&metric_groups=WEB_CONVERSION

I get a 200 response, but no data. Help please!

{
    "data_type": "stats",
    "time_series_length": 7,
    "data": [],
    "request": {
        "params": {
            "start_time": "2018-01-21T00:00:00Z",
            "segmentation_type": null,
            "entity_ids": [
                "1j2n90",
                "1j2n91",
                "1j2n92",
                "1j2n93",
                "1krx2o",
                "1krx2p",
                "1krx2q",
                "1krx2r",
                "1kxz4k",
                "1kxz4l",
                "1kxz4q",
                "1kxz4r",
                "1kxz4s",
                "1kxzo4",
                "1l91d3",
                "1l91d4",
                "1l91d7",
                "1l91d8",
                "1l91d9",
                "1l91da"
            ],
            "end_time": "2018-01-28T00:00:00Z",
            "country": null,
            "placement": "ALL_ON_TWITTER",
            "granularity": "DAY",
            "entity": "PROMOTED_TWEET",
            "platform": null,
            "metric_groups": [
                "WEB_CONVERSION"
            ]
        }
    }
}

#2

Hi @Metia! Are you sure there were any web conversions for those promoted tweets during that period of time?


#3

@majoritasdev, thanks for getting back to me.
Yes. I can verify by looking in my ads manager for the ad account.
See this screenshot.


#4

@majoritasdev do you have any additional ideas?


#5

Hi @Metia! In the screenshot, I can see that you have selected the metrics group “Web Conversions” , but in the table below I see there are no columns with conversions. So from the screenshot I understand the same thing - there are no conversions in that period of time for those ads.

Are you sure you have added the conversion tracking code on your website? Without it, you can have no conversions reported.


#7

@Metia
I can confirm @majoritasdev is correct, you do not have any conversion tracking setup on that account, therefore “web_conversions” will not return any data.


#8

@majoritasdev and @goforbrent,

Thanks for getting back to me. It means a lot! I’ve been struggling on my own for a few weeks now.

I changed the metric_groups parameter to "ENGAGEMENT" but I still get no data.

I discovered that I was looking up stats on a promoted tweets from old/inactive campaigns. Once I looked up an active campaign’s tweet, the numbers came in without issue.

Really grateful for your help on this!


#9

@Metia - In order for me to debug can you please post the full twurl command like the following example. Note, please use your own account information to recreate.

twurl -H ads-api.twitter.com "/3/stats/accounts/18ce54d4x5t?entity=LINE_ITEM&entity_ids=8u94t&start_time=2017-05-19&end_time=2017-05-26&granularity=TOTAL&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT" | jq

#10

@Metia, happy to help! I’m glad you’ve got this figured out ! :slight_smile: :+1: