How to get report without download via reporting API?

20 views
Skip to first unread message

ALTELMA

unread,
Nov 24, 2019, 8:31:18 PM11/24/19
to AdWords API and Google Ads API Forum
Hi, I am a newbie for Google Ads API. I do follow steps from the links below for the PHP&Laravel application.


But I saw only download class to get report data via file. So Is it possible to get data and store in JSON instead of a file?

Anyone, please suggest to me?

Google Ads API Forum Advisor Prod

unread,
Nov 25, 2019, 3:46:32 PM11/25/19
to nroht...@gmail.com, adwor...@googlegroups.com

Hi Phongthorn,

Thanks for reaching out. By looking into the code you mentioned I observed that there is actually a JSON object and then it was decoded and saved in a file.

$json = json_encode( simplexml_load_string($reportDownloadResult->getAsString()));
$resultTable = json_decode($json, true)['table'];

You would be able to use this JSON data before it was converted. 

Thanks and regards,
Xiaoming, Google Ads API Team



ref:_00D1U1174p._5001UODASW:ref
Reply all
Reply to author
Forward
0 new messages