Go To Top

How to Find Your Business Unit ID

A guide to finding your business unit id using the Trustpilot API.

top_findbusinessunitid.jpg

Introduction

Many examples in our API guides rely on you knowing the business unit id of the company you want to look up (or manipulate) data for. In this guide we’ll show you how to find your business unit id using our API.

The screenshot in this guide that shows an API call was made using the API client application called Postman.

While the API examples provided are valid, they contain “dummy data” and {{placeholders}}. Remember to fill in the correct values for the placeholders.

We recommend that you follow and read the documentation (links) in this guide to get a better  understanding of the API endpoints and how they work.

What is the business unit id?

The business unit is the collection point for all Trustpilot content for a website. The business unit hosts a company's rating, its reviews, and the company responses.

The business unit id is a unique identifier for that business unit and is the primary key in many of your API calls.

Authentication

The API endpoint we’ll be using to find the business unit id is public, and requires only an API key.

Calling the API endpoint

To find the business unit, we will be using the “Find a business unit” endpoint, which takes a single string parameter, which identifies the name of the business unit. This name is your website’s domain. In the case you want to look up the business unit id of Trustpilot, you’d pass along the string “trustpilot.com”

Try it yourself, just remember to replace the API key.

https://api.trustpilot.com/v1/business-units/find?apikey={{apikey}}&name=trustpilot.com

business_unit.png

The result

As you can see in the screenshot, the JSON response contains several parts of data. We’re interested in the key “id” which contains the business unit id.