Skip to content

Show your total tree count with the API

If you want to show how many trees your business has planted, the quickest way is one of our website widgets. If you’d rather build your own display, for example on a sustainability page, your system can get the number from the ReviewForest API.

  1. Create an API key. In the app, open Integrations under More in the menu on the left. On the ReviewForest public API card, click View API key, then Create new key. Read-only is enough for this. Click Create key and copy the key from the table.

  2. Find your slug. That’s the last part of your forest address. If your forest is at https://reviewforest.org/your-business, the slug is your-business.

  3. Request the number. Send a GET request with your key in the apikey header:

    Example with curl
    curl -H "apikey: YOUR_API_KEY" https://api.reviewforest.org/v1/smiirl/your-business

    The response contains the number of trees:

    { "number": 1234 }

The number covers all trees in the review forest, including additional trees you planted. For a brand forest it’s the sum of all active review forests in your account.

The key type Website-Widgets doesn’t work for this request. It’s meant for showing widgets on websites and can only read forests and widgets.