facebookresearch / Ad-Library-API-Script-Repository

GitHub repository of commonly used python scripts that allows everyone to pull data via the Ad Library API
Other
213 stars 84 forks source link

How can i use Meta Ad Library API with African countries #27

Open CodeWizard9 opened 1 year ago

CodeWizard9 commented 1 year ago

Hello,

I would like to inquire about conducting research on ads in African countries like Ivory Coast, Nigeria, Niger, Senegal, South Africa, Cameroon, and others. Upon my observation, it appears that these countries are not currently supported. I'm curious to know if this limitation is due to an outdated version of the platform or if there is a possibility for me to manually add the necessary code for these countries.

Thank you for your assistance.

Best regards,

ashlinnn commented 1 year ago

Hi~

Regarding the Ad Library API's country coverage, the API is available in any country where the Ad Library has been launched, which includes over 100 countries (refer to FAQ). For the countries you listed, you can search for all of them given the appropriate country 2 letter enum via the ad_reached_countries term.

Here is a sample query available on v11.0 to v16.0 if it helps! ads_archive?search_terms=''&ad_reached_countries=CI&ad_active_status=ALL&fields=id,ad_creative_bodies,rea&limit=5

CodeWizard9 commented 1 year ago

Hello @ashlinnn , Thank you very much for your answer. I am conducting some research on the African customer behaviour towards Ecom. I noticed that i can only access to social issues, election or politics ads. Is there any way to access all ads without filtering on type ? Thank you.

ashlinnn commented 1 year ago

Hi @CodeWizard9, currently the Ad Library API by design has a limitation to only surface ads related to social issues, election or political ads. As such other ad types and special ad categories are not available for querying from the API. Hope this helps clarify!