Skip to main content

The Nanga Ad Library developed by the ⭐️ Spark Tech team

Project description

Nanga Ad Library

With Nanga, stay ahead of the competition, maximize your ROI, and build a more credible, effective advertising strategy !

Ad libraries are game-changer for advertisers, offering a wealth of strategic advantages:

  1. It allows you to track competitor campaigns in real-time, helping you understand which creatives, targeting strategies, and ad formats are driving results in your industry.
  2. By seeing detailed performance data like budgets, reach, and demographics, you can optimize your own ads with proven data-backed insights.

And today, Nanga Ad Library is gathering for you all Ad Libraries from the main social media platforms in one place !

Table of Contents

  1. Introduction
  2. Roadmap
  3. Installation
  4. Usage
  5. Contributing
  6. License
  7. Acknowledgements

Introduction

The European regulation that requires social media platforms to make their advertising libraries publicly available is part of the Digital Services Act (DSA), which entered into force on August 25, 2023. This regulation is designed to enhance transparency and accountability across digital platforms. The DSA mandates that large platforms, such as social media networks and search engines, disclose their advertising practices, including providing access to data on the targeting of ads and the related algorithms.

The purpose of the DSA is to combat harmful content, enhance user safety, and ensure that platforms disclose details about how ads are shown, particularly those based on user profiles. These transparency requirements also aim to give researchers and the public access to this information, facilitating better oversight. Platforms such as Facebook, Google, and others with over 45 million active users are expected to follow these new rules, including publishing details about political ads, the algorithms used for targeting, and the effectiveness of these ads.

The regulations are enforced by the European Commission, and platforms that fail to comply face significant penalties, including fines of up to 6% of their global revenue.

Learn more about the Digital Services Act (DSA).

The DSA regulation forced the main social advertising platforms to provide public access to their ad library and the Nanga Ad Library is gathering them all for you.

Roadmap

New advertising platforms will soon be available in the Nanga Ad Library:

Installation

You can install this package directly from PyPI using pip:

pip install nanga-ad-library

This command will automatically download and install all required dependencies.

Usage

Once the Nanga Ad Library package is installed, you'll only need to set it up and use it as you wish.

Prepare Ad Library for each platform

How to set up your Ad Library app ?

Initiate and use the API

Try to extract some results from the Nanga Ad Library API:

from nanga_ad_library import NangaAdLibraryApi

# Prepare the arguments to send to initiate the API
init_hash = {}

# Prepare connection hash depending on the platform to use (here is an example for Meta):
platform = "Meta"
if platform == "Meta":
    connection_hash = {
        "access_token": "{meta_access_token}"
    }
else:
    connection_hash = {}
init_hash.update(connection_hash)

# Prepare query hash (here is an example for Meta):
query_hash = {
    "payload": {
        "search_terms": "Facebook",
        "ad_reached_countries": ["FR"]
    },
    "fields": []
}
init_hash.update(query_hash)

# Choose if ads elements will be downloaded (Title, Body, Description, Image or Video, Call to action)
download_hash = {
    "download_ads": True
}
init_hash.update(download_hash)

# Initiating api
api = NangaAdLibraryApi.init(platform=platform, **init_hash)

# Extract the first results from the Ad Library API
results = api.get_results()

Note: please replace the {access_token} tag with valid tokens:

Contributing

Contributions are not yet available for members outside the Nanga project.

License

This project is licensed under the GNU general public License - see the LICENSE file for details.

Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanga_ad_library-1.0.3.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanga_ad_library-1.0.3-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file nanga_ad_library-1.0.3.tar.gz.

File metadata

  • Download URL: nanga_ad_library-1.0.3.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for nanga_ad_library-1.0.3.tar.gz
Algorithm Hash digest
SHA256 f41aba337427512c9a3c30f2ab472a2050fce3adffb0dc8c7df6975c53a36ccf
MD5 74c851d79e786d1cccbf139d88ca0909
BLAKE2b-256 9e9ef2da922a0c21e434146b28df70d9f7ca04980b6414352531a90342d20067

See more details on using hashes here.

File details

Details for the file nanga_ad_library-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nanga_ad_library-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 02f11ac2aa89c6fb82f500855b70fd1d5fc1d699acf2b2cd74dcdb3dead14738
MD5 6c93f4dd2504523131c0f8305948b570
BLAKE2b-256 6c5f591112e6d641ad8023b54fdd1ce2ca75b6779ca217f6208805456bbc936c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page