Go To Top

Business unit API

This method shows all the reviews written about the business unit, including consumer email and Order ID.

GET
https://api.trustpilot.com/v1/private/business-units/{businessUnitId}/reviews
Parameters
businessUnitId, Required String
The id of the business unit.
Example: …/v1/private/business-units/507f191e810c19729de860ea/reviews

stars, Optional Array
Filter by reviews with a specific number of stars.
Constraints: The allowed range is minimum: 1, maximum: 5
Example: ?stars=5

language, Optional Array
Filter by reviews with only a specific language.
Example: ?language=en

page, Optional Integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Constraints: The allowed range is minimum: 1, maximum: 2147483647
Default value: 1
Example: ?page=1

perPage, Optional Integer
The number of reviews to retrieve per page.
Constraints: The allowed range is minimum: 1, maximum: 100
Default value: 20
Example: ?perPage=3

orderBy, Optional Array
The order in which the results should be sorted.
Default value: [ "createdat.desc" ]
Example: ?orderBy=createdat.asc

tagGroup, Optional String
Filtering reviews on Tag group
Example: ?tagGroup=Group Name

tagValue, Optional String
Filtering reviews on Tag value
Example: ?tagValue=Tag Name

responded, Optional Boolean
Filter reviews by responded state.
Example: ?responded=true

referenceId, Optional String
Filter reviews by reference Id.
Example: ?referenceId=1234

referralEmail, Optional String
Filter reviews by referral email.
Example: ?referralEmail=me@example.com

reported, Optional Boolean
Filter reviews by reported state.
Example: ?reported=true

startDateTime, Optional String
Filter reviews by datetime range. If no time is specified than time is implicit 00:00:00
Example: ?startDateTime=2013-09-07T13:37:00

endDateTime, Optional String
Filter reviews by datetime range. If no time is specified than time is implicit 00:00:00
Example: ?endDateTime=2013-09-07T13:37:00

source, Optional String
Filter reviews by source.
Example: ?source=Trustpilot

username, Optional String
Filter reviews by user name.
Example: ?username=Vlad

Response
{
  "reviews": [
    {
      "status": "active",
      "referenceId": "12345",
      "referralEmail": "my@email.com",
      "language": "da",
      "links": [
        {
          "href": "<Url for the resource>",
          "method": "<Http method for the resource>",
          "rel": "<Description of the relation>"
        }
      ],
      "title": "My review",
      "businessUnit": {
        "identifyingName": "trustpilot.com",
        "displayName": "Trustpilot",
        "id": "507f191e810c19729de860ea",
        "links": [
          {
            "href": "<Url for the resource>",
            "method": "<Http method for the resource>",
            "rel": "<Description of the relation>"
          }
        ]
      },
      "text": "This shop is great.",
      "tags": [
        {
          "group": "Generic",
          "value": "Tag value"
        }
      ],
      "complianceLabels": [
        null
      ],
      "consumer": {
        "displayLocation": "Frederiksberg, DK",
        "numberOfReviews": 1,
        "displayName": "John Doe",
        "id": "507f191e810c19729de860ea",
        "links": [
          {
            "href": "<Url for the resource>",
            "method": "<Http method for the resource>",
            "rel": "<Description of the relation>"
          }
        ]
      },
      "countsTowardsTrustScore": false,
      "source": "Organic",
      "createdAt": "2013-09-07T13:37:00",
      "stars": 5,
      "companyReply": {
        "text": "This is our reply.",
        "createdAt": "2013-09-07T13:37:00"
      },
      "updatedAt": "2013-09-07T13:37:00",
      "reportData": {
        "source": "Trustpilot",
        "publicComment": "This review contains sensitive information.",
        "createdAt": "2013-09-07T13:37:00"
      },
      "numberOfLikes": 10,
      "id": "507f191e810c19729de860ea",
      "isVerified": true
    }
  ],
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

Returns the business unit given by the provided name

GET
Authentication: API Key
https://api.trustpilot.com/v1/business-units/find
Parameters
name, Required String
The name of the business unit to match.
Example: ?name={name}

Response
{
  "displayName": "Trustpilot",
  "id": "507f191e810c19729de860ea",
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ],
  "name": {
    "referring": [
      "trustpilot.com",
      "www.trustpilot.com"
    ],
    "identifying": "trustpilot.com"
  }
}

This method gets all the reviews written about the business unit.

GET
Authentication: API Key
https://api.trustpilot.com/v1/business-units/{businessUnitId}/reviews
Parameters
businessUnitId, Required String
The id of the business unit.
Example: …/v1/business-units/507f191e810c19729de860ea/reviews

stars, Optional Array
Filter by reviews with a specific number of stars.
Constraints: The allowed range is minimum: 1, maximum: 5
Example: ?stars=5

language, Optional Array
Filter by reviews with only a specific language.
Example: ?language=en

page, Optional Integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Constraints: The allowed range is minimum: 1, maximum: 2147483647
Default value: 1
Example: ?page=1

perPage, Optional Integer
The number of reviews to retrieve per page.
Constraints: The allowed range is minimum: 1, maximum: 100
Default value: 20
Example: ?perPage=3

orderBy, Optional Array
The order in which the results should be sorted.
Default value: [ "createdat.desc" ]
Example: ?orderBy=stars.desc

tagGroup, Optional String
Filtering reviews on Tag group
Example: ?tagGroup=Group Name

tagValue, Optional String
Filtering reviews on Tag value
Example: ?tagValue=Tag Name

responded, Optional Boolean
Filter reviews by responded state.
Example: ?responded=true

includeReportedReviews, Optional Boolean
Include reported reviews.
Default value: false
Example: ?includeReportedReviews=true

Response
{
  "reviews": [
    {
      "status": "active",
      "language": "da",
      "title": "My review",
      "text": "This shop is great",
      "isVerified": true,
      "stars": 5,
      "updatedAt": "2013-09-07T13:37:00",
      "numberOfLikes": 10,
      "id": "507f191e810c19729de860ea",
      "createdAt": "2013-09-07T13:37:00"
    }
  ],
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

This method gets links to the business unit's public profile page on Trustpilot.

GET
Authentication: API Key
https://api.trustpilot.com/v1/business-units/{businessUnitId}/web-links
Parameters
businessUnitId, Required String
The id of the business unit.
Example: …/v1/business-units/{businessUnitId}/web-links

locale, Required String
The locale to use when generating web links.
Example: ?locale={locale}

Response
{
  "locale": "da-DK",
  "profileUrl": "http://www.trustpilot.dk/review/www.trustpilot.com",
  "evaluateEmbedUrl": "http://www.trustpilot.dk/evaluate/embed/www.trustpilot.com",
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ],
  "evaluateUrl": "http://www.trustpilot.dk/evaluate/www.trustpilot.com"
}

Page all business units, including the ones without reviews.

GET
Authentication: API Key
https://api.trustpilot.com/v1/business-units/all
Parameters
country, Optional Array
Filter by specific countries using ISO 3166-1-alpha-2.
Example: ?country={country}
* provide multiple values using comma seperation

page, Optional Integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Constraints: The allowed range is minimum: 1, maximum: 2147483647
Default value: 1
Example: ?page=0

perPage, Optional Integer
The number of business units to retrieve per page.
Constraints: The allowed range is minimum: 1, maximum: 1000
Default value: 1000
Example: ?perPage=0

Response
{
  "businessUnits": [
    {
      "displayName": "Trustpilot",
      "id": "507f191e810c19729de860ea",
      "links": [
        {
          "href": "<Url for the resource>",
          "method": "<Http method for the resource>",
          "rel": "<Description of the relation>"
        }
      ],
      "name": {
        "referring": [
          "trustpilot.com",
          "www.trustpilot.com"
        ],
        "identifying": "trustpilot.com"
      }
    }
  ],
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

This method gets a list of all the business units with minimum one review.

GET
Authentication: API Key
https://api.trustpilot.com/v1/business-units
Parameters
country, Optional Array
Filter by specific countries using ISO 3166-1-alpha-2.
Example: ?country={country}
* provide multiple values using comma seperation

page, Optional Integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Constraints: The allowed range is minimum: 1, maximum: 2147483647
Default value: 1
Example: ?page=0

perPage, Optional Integer
The number of business units to retrieve per page.
Constraints: The allowed range is minimum: 1, maximum: 1000
Default value: 1000
Example: ?perPage=0

Response
{
  "businessUnits": [
    {
      "displayName": "Trustpilot",
      "id": "507f191e810c19729de860ea",
      "links": [
        {
          "href": "<Url for the resource>",
          "method": "<Http method for the resource>",
          "rel": "<Description of the relation>"
        }
      ],
      "name": {
        "referring": [
          "trustpilot.com",
          "www.trustpilot.com"
        ],
        "identifying": "trustpilot.com"
      }
    }
  ],
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

This method gets the business unit's basic public information (name, URL, reviews, etc.).

GET
Authentication: API Key
https://api.trustpilot.com/v1/business-units/{businessUnitId}
Parameters
businessUnitId, Required String
The id of the business unit.
Example: …/v1/business-units/{businessUnitId}

Response
{
  "status": "active",
  "displayName": "Trustpilot",
  "name": {
    "referring": [
      "trustpilot.com",
      "www.trustpilot.com"
    ],
    "identifying": "trustpilot.com"
  },
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ],
  "country": "DK",
  "websiteUrl": "http://www.trustpilot.com",
  "numberOfReviews": {
    "threeStars": 2,
    "oneStar": 2,
    "twoStars": 3,
    "fiveStars": 2,
    "total": 14,
    "fourStars": 5,
    "usedForTrustScoreCalculation": 12
  },
  "stars": 5,
  "trustScore": 10.0,
  "id": "507f191e810c19729de860ea"
}

Get a list of categories for a business unit.

GET
Authentication: API Key
https://api.trustpilot.com/v1/business-units/{businessUnitId}/categories
Parameters
businessUnitId, Required String
The id of the business unit to list categories for.
Example: …/v1/business-units/507f191e810c19729de860ea/categories

locale, Optional String
The locale to get translated category names for.
Default value: en-US
Example: ?locale=da-DK

Response
{
  "categories": [
    {
      "ranking": {
        "position": 3,
        "cardinality": 12
      },
      "isPrimary": false,
      "displayName": "Art supplies",
      "categoryId": "507f191e810c19729de860ea",
      "name": "art-supplies"
    }
  ]
}

This method searches for business units, even if you only know part of the name. For example, search results for "Trustpilot" would show "trustpilot.com", among others.

GET
Authentication: API Key
https://api.trustpilot.com/v1/business-units/search
Parameters
query, Required String
The search term to use. This will be used to search for identifying name and referring names.
Example: ?query={query}

country, Optional String
The 2 letter country code for the preferred country code
Example: ?country={country}

page, Optional Integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Constraints: The allowed range is minimum: 1, maximum: 2147483647
Default value: 1
Example: ?page=0

perpage, Optional Integer
The number of results to display per page.
Constraints: The allowed range is minimum: 1, maximum: 100
Default value: 20
Example: ?perpage=0

Response
{
  "businessUnits": [
    {
      "link": [
        {
          "href": null,
          "method": null,
          "rel": null
        }
      ],
      "displayName": null,
      "id": null,
      "name": {
        "referring": [
          null
        ],
        "identifying": null
      }
    }
  ],
  "links": [
    {
      "href": null,
      "method": null,
      "rel": null
    }
  ]
}