Skip to content

Brave Ads Advertiser API Guide

Ian Krieger edited this page Aug 9, 2023 · 11 revisions

Advertiser API Guide

  1. Log on to https://ads.brave.com

  2. Generate an API KEY

    1. Profile -> Generate API Key
    2. Record generated API key, as you will not be able to retrieve it again
  3. Make CURL request to get advertiser details

Example Request

curl --request gET \
  --url https://ads-serve.brave.com/v1/api/campaigns \
  --header 'X-Brave-Api-Key: <API_KEY>' \

Example Response

{
  "id": "f9f88715-db91-421b-9d1d-983742ef14c5", // Advertiser ID
  "name": "My Advertiser Name",
  "state": "active",
  "campaigns": [
    {
      "id": "a3de655d-ae1b-41a5-b6f9-741a40010d00", // Campaign ID
      "name": "My Campaign Name",
      "format": "push_notification",
      "startAt": "2022-08-09T14:49:11.714Z",
      "endAt": "2024-03-22T05:42:49.691Z",
      "adSets": [
        {
          "id": "e161f081-f249-4216-b9ad-64e2ba4c1b65", // Ad Set ID
          "name": "My First Ad Set",
          "ads": [
            {
              "id": "c93d9444-2c59-4cec-9a61-de3e1e3f7552" // Ad ID
            }
          ]
        }
      ]
    }
  ]
}
  1. Download reports for a given campaign id in CSV format

v1 Endpoint

curl --request GET --url https://ads-serve.brave.com/v1/report/campaign/csv/<CAMPAIGN_ID> \
  --header 'X-Brave-Api-Key: <API_KEY>' \
  --header 'Content-Type: application/json'

v1 Reporting Endpoint contains the following fields:

Day/Hour,Advertiser Name,Campaign Name,Campaign ID,Creative Set ID,Creative Set Name,Creative Instance ID,Creative Title,Creative Body,Creative URL,View Counts,Click Counts,Dismissed Counts,Landed Counts,Conversion Counts,OS,Segment,Spend

v2 Endpoint

curl --request GET --url https://ads-serve.brave.com/v2/report/campaign/csv/<CAMPAIGN_ID> \
  --header 'X-Brave-Api-Key: <API_KEY>' \
  --header 'Content-Type: application/json'

v2 Reporting Endpoint contains the following fields:

Day/Hour,Advertiser Name,Campaign Name,Campaign ID,Creative Set ID,Creative Set Name,Creative Instance ID,Creative Title,Creative Body,Creative URL,View Counts,Click Counts,Dismissed Counts,Landed Counts,Conversion Counts,OS, Spend

Clone this wiki locally