Skip to main content

Engage Reports API - Header Bidding

Overview​

The Engage Reports API provides RESTful interfaces for interacting with the Header Bidding Reports product. The API is structured around core entities:

  • Publisher: A publisher account
  • Report: A variety of analytics entities to retrieve metrics

Contact: For questions, issues, or feature requests, contact hb@outbrain.com

API URL​

The base URL for all API endpoints is:

https://api.outbrain.com/engage/v2/

Authentication​

Obtaining a token is the first step toward using the Engage API. The token must be included in all further requests using the HTTP header OB-TOKEN-V1.

Token Validity​

  • Tokens are valid for 30 days
  • Expired tokens cannot access the Engage API
  • Generating a new token does not invalidate older tokens
  • When a user password or email is changed, all previously generated tokens are revoked and a new token must be generated

How to Obtain a Token​

Tokens are obtained by making a request to the login endpoint using Basic Authentication.

Endpoint: https://api.outbrain.com/engage/v1/login

Authentication Header Format:

Authorization: BASIC BASE64(YOUR_OUTBRAIN_USERNAME:YOUR_OUTBRAIN_PASSWORD)

All communication with the Engage API uses HTTPS, ensuring credentials are secure.

Example using curl:

curl -u YOUR_OUTBRAIN_USERNAME:YOUR_OUTBRAIN_PASSWORD https://api.outbrain.com/engage/v1/login

Use the -v flag to view the Authorization HTTP header in the response.

Token Management Recommendation​

Store an active token for use in all requests and periodically update it. Since tokens are valid for 30 days, update the token at least every 30 days.

Rate Limits​

The following rate limits are enforced:

Endpoint/LevelLimitUnit
Authentication requests (/login)2 requestsPer hour per user
Reporting API30 requestsPer minute per publisher

When rate limits are exceeded, the API returns HTTP status code 429 (Too Many Requests).

Users​

Users represent a single person's access to Teads services and to the site my.outbrain.com. Users have permissions to one or more Publisher accounts.

Note: Users cannot be managed via this API and must be created with the help of your Teads contact.

Reports​

Report endpoints allow you to retrieve metrics at various levels of granularity.

Note: Performance reports have a 2–4 hours delay. Performance metrics for the current day are partial.

Response Structure​

All reporting endpoints share a common response structure:

PropertyTypeSemanticComments
itemsArrayMetrics of the entities returnedReportItems for the specific report type
totalItemsNumberCount of total results after filtering
metricsSumsMetricsAggregated metrics for the set of data returned after filteringStructure varies per report type

Filter Parameters​

The following table describes the basic filter operators:

OperatorDescriptionExample
:eq:Equal/reports/headerBidding?filter=revenue:eq:2000
:gt:Greater than/reports/headerBidding?filter=revenue:gt:300
:lt:Less than/reports/headerBidding?filter=revenue:lt:890
:between:Between/reports/headerBidding?filter=revenue:between:20,900
:in:In (list)/reports/headerBidding?filter=placement:in:2089,84984,38984
:not_in:Not in (list)/reports/headerBidding?filter=placement:not_in:2089,8466
:contains:Contains (string)/reports/headerBidding?filter=placement:contains:ar
:not_contains:Not contains (string)/reports/headerBidding?filter=placement:not_contains:ar

Chaining filters: Use semicolon (;) to chain multiple filters

filter=revenue:gt:2000;placement:in:234,657

Note: Nesting of Boolean operators is not currently supported.

ReportItems Fields​

ReportItems contain aggregation entities and traffic metric fields:

PropertyTypeSemanticComments
dayStringDate in format "yyyyMMdd"Optional breakdown
revenueNumberPublisher revenue
impressionsNumberTotal number of impressions served
clicksNumberTotal number of clicks
ctrNumberAverage Click Through Rate (clicks / impressions served)
rpmNumberRevenue per thousand impressions: (revenue / impressions) * 1000
countryStringCountryOptional breakdown
deviceStringUser deviceOptional breakdown
tagIdStringTagID as provided by the publisherOptional breakdown (placement entity)
environmentStringApp or WebOptional breakdown
domainStringPage domainOptional breakdown
channelStringMedia typeOptional breakdown

Request Structure / Parameters​

ParameterTypeSemanticDetails
entityIdStringExternal ID of the entity (publisher/group)Required. Contact your Teads account manager for your external ID.
entityTypeStringEntity typeThis API supports only PUBLISHER entity type
fromDateStringStart date of resultsFormat: "yyyyMMdd". Required.
toDateStringEnd date of resultsFormat: "yyyyMMdd". Required.
limitNumberMaximal number of results to returnOptional. Default: 500
offsetNumberOrdinal number of first result to retrieveOptional. Default: 0
sortStringSorting field (metric or entity name)Optional. Default: revenue
orderStringSorting order of resultsOptional. Default: descending. Allowed values: asc or desc
filterStringFiltering based on filter guidelinesOptional.
breakdownsArray of StringsAggregation entities for resultsOptional. Default: day. Maximum 4 breakdowns supported.
currencyCodeStringRevenue currency codeOptional. Default: USD

Pagination​

Use the offset and limit query parameters to create an iterative pagination process:

  • First page (1000 results): Set offset=0 (or use default) and limit=1000
  • Second page: Set offset=1000 and limit=1000
  • Third page: Set offset=2000 and limit=1000
  • Continue as needed

Maximum results: The Teads API allows a maximum of 10,000 results to be requested. For large result sets, pagination should always be used.

Breakdowns​

The following table describes the aggregation options (report breakdowns):

OperatorDescriptionExample
dayDay entity/reports/headerBidding?breakdowns=day
deviceDevice entity/reports/headerBidding?breakdowns=device
tagIdTagId / placement entity/reports/headerBidding?breakdowns=tagId
environmentEnvironment entity/reports/headerBidding?breakdowns=environment
domainDomain entity/reports/headerBidding?breakdowns=domain
channelChannel entity/reports/headerBidding?breakdowns=channel
countryCountry entity/reports/headerBidding?breakdowns=country

Chaining breakdowns: Use comma (,) to chain multiple breakdowns

breakdowns=day,brandName

Maximum: A maximum of 4 breakdowns are supported.

Error Handling​

The API follows RESTful conventions for HTTP status codes:

HTTP Status CodeMeaningDescription
200OKThe request was successful.
400Bad RequestThe request could not be understood or was missing required parameters.
401UnauthorizedAuthentication failed or user doesn't have permissions for the requested operation.
403ForbiddenAccess denied.
404Not FoundResource was not found.
429Too Many RequestsRequest exceeded rate limits.
504Gateway TimeoutRequest timeout.

When the API returns an error status code (400, 401, 403, 404, 429), it includes a JSON response describing the error:

{
"moreInfo": "getReport",
"errorMessage": "access denied"
}

Troubleshooting​

If you experience any issues or difficulties:

  1. Post to Google Group: https://groups.google.com/forum/#!forum/outbrain-engageapi
  2. Include the AMPLIFY-REQUEST-ID header from the returned response in your post. This unique request ID allows support to identify your request and reply more quickly and efficiently.