-
Notifications
You must be signed in to change notification settings - Fork 11
Brave Ads Advertiser API Guide
1. First acquire an API access token with your Brave Ads account credentials:
curl --request POST \
--url https://ads-serve.brave.com/v1/auth/token \
--header 'Content-Type: application/json' \
--data '{
"email": "<EMAIL>",
"password": "<PASSWORD>"
}'
2. Retrieve list of Campaigns: Your Brave Account Manager can provide you with your Advertiser ID.
curl --request POST \
--url https://ads-serve.brave.com/graphql \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{"query":" query{ advertiser(id: \"<ADVERTISER_ID>\"){\n campaigns{\n name\n id\n }\n}}"}'
3. Download reports for a given campaign id in CSV format
curl --request GET --url https://ads-serve.brave.com/v1/report/campaign/csv/<CAMPAIGN_ID> \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--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
curl --request GET --url https://ads-serve.brave.com/v2/report/campaign/csv/<CAMPAIGN_ID> \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
v2 Reporting Endpoint contains the following fields:
Day/Hour,Advertiser Name,Campaign Name,Campaign ID,Creative Set ID,Creative Instance ID,Creative Title,Creative Body,Creative URL,View Counts,Click Counts,Dismissed Counts,Landed Counts,Conversion Counts,OS