Report API

The Report API provided exposes a set of endpoints that allow you to retrieve detailed information about your completed measurements. With the Report API, you can access a wide range of data and insights, including metrics, benchmarks, statistics, and survey responses, all of which can be used to gain a deeper understanding of the brand's performance and survey feedback.

To get started with our Report API, simply visit the link below and explore our visually rendered documentation. You'll find detailed descriptions of each endpoint, as well as examples of how to use them in your own applications. Our documentation makes it easy to get up and running with the Report API in no time.

Explore the Report API

Authentication

All API calls to the Report API require a valid API key. You can create a new API key in the Brand Metrics Web Portal and include it in the Authorization HTTP header of each API request.

Bash:

curl "<https://api.brandmetrics.com/api/v1/report>" -H "X-API-KEY: {api_key}"

PowerShell:

Invoke-WebRequest -Uri <https://api.brandmetrics.com/api/v1/report> -Method 'GET' -Headers @{'X-API-KEY' = '{api_key}'}

Working with the API

Brand Metrics's OpenAPI 3.0 specification allows you to explore the API e.g. by using Swagger Inspector and then use Swagger Codegen to generate server stubs and client SDKs in various programming languages.

Below is an example on how to connect to the API using Python.

# Import the generated client
import swagger_client

# Set the API key to use
api_key = ""

# configure the client
configuration = swagger_client.Configuration()
configuration.host = '<https://api.brandmetrics.com/report>'

# Create an instance of the API
report_api = swagger_client.ReportApi(
api_client=swagger_client.ApiClient(
    configuration,
    header_name="X-API-KEY",
    header_value=api_key))

# Get all reports from the api
reports = report_api.api_v1_report_all_get()

# print number of reports
print("number of reports " + str(len(reports)))