2

I'm trying to create an android application for personal use to do the following:

  1. 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.
  2. 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):

  1. Find an API for the ads library in order to access ads but I could only find API to access political ads.
  2. 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):

  1. Find an API for the ads manager in order to access my personal billing details but I couldn't find something similar to this.
  2. 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.

asked Sep 18, 2020 at 13:35
2
  • If you can't find a suitable API, then yes, scraping is the alternative. Note that scraping is expressly prohibited by Facebook, in part to protect your "competitors." See cpomagazine.com/data-privacy/… Commented Sep 18, 2020 at 13:55
  • @RobertHarvey Do you think there aren't any suitable APIs, maybe I'm not searching in the right direction because I'm kind of inexperienced with APIs. Also, I'm not trying to extract data that I'm not allowed to view. I can view the data by logging in and navigating to what I need. However, I'm trying to do that through a personal application in a user-friendly way and perform certain processing that I can do using a calculator when viewing the data on a browser. Commented Sep 18, 2020 at 14:06

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.