I’m trying to create an android application for personal use to do the following:
- Get ads from the Facebook ad library (commercial ones) not the ones with politics topics etc. and then insert them into a spreadsheet for further processing.
- Get my personal business account’s current billing data by clicking on a simple button that renders in a preferred way and then inserts them to a spreadsheet for further processing other than having to login to the ads manager website and checking the billing tab.
I tried the following approaches for the ads library (first requirement):
- Find an API for the ads library in order to access ads but I could only find API to access political ads.
- Hardcode each competitor’s id into this URL (between curly braces) then parse the HTML page for the data I need which is possible but kind of complicated and will take much time to load the page.
https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=US&view_all_page_id={9465008123}&sort_data[direction]=desc&sort_data[mode]=relevancy_monthly_grouped
I tried the following approaches for the ads manager (second requirement):
- Find an API for the ads manager in order to access my personal billing details but I couldn’t find something similar to this.
- Hard coding like the previous requirement is impossible because if I hardcode my account id into the URL it won’t be visible because I’m not logged in.
https://www.facebook.com/ads/manager/billing/transactions/?act={ACCOUNT_ID}&pid=p1&page=billing&tab=transactions
Are there any different approaches to do the requirements? (All I’m trying to do is create an app for myself which makes it easier than accessing all the links and this stuff and also process some of the data in a spreadsheet)
I’m also not sure if I got my point across so if there’s something unclear let me know.
2