How to CURL a Facebook ad report How to CURL a Facebook ad report curl curl

How to CURL a Facebook ad report


Just want to state this is equivalent to scraping in terms of Facebook TOS.

Luckily you don't need to fight the system and play around with cookies.

Facebook Ads API access has been granted to all developers on a tier level.

See https://developers.facebook.com/docs/reference/ads-api/access

You should currently have access to development level

The development access level is designed for development purposes and is ideal for people who are just starting to build out their tool. In this level, you would not yet have customers using your tool. This level is open to all developers, and is intended to build out end-to-end workflows on the API before you get full permissions.

You will be able to use the API on behalf of developers or admins of your app, and you can access up to 5 ad accounts for which those users are admins. To set up the ad account list, refer to the instructions below. Please note that some API calls won't be possible with Development or Basic access because they're potentially associated with multiple accounts, or the affected account can't be identified programmatically.

So using any app you control along with any ad account you own while granting yourself ads_read and/or ads_management permission (depending on what you need) make an API call to

/me/adaccounts and from there you should be able to get ad account info, in your case you can call /act_44309118 or e.g. /act_44309118/stats

See https://developers.facebook.com/docs/reference/ads-api/overview for a full listing of all that is available to you.