Skip to content

Widgets & Badges

You’re making impact — now show it off.

If you’re building custom UI and only need the total tree count, fetch it via the Get total trees planted endpoint.

For ecommerce sites, we provide a drop-in badge that displays your impact without any custom UI work.

<link href="https://app.thegoodapi.com/assets/badges/base.css" rel="stylesheet">

The CSS supports two query parameters:

  • text_color — hex color (e.g. #222222)
  • background_color — hex color (e.g. #ffffff)
<script async src="https://app.thegoodapi.com/assets/badges/product.js?badge_type=per_product&locale=en"></script>

The script supports these query parameters:

ParameterValuesDescription
badge_typeper_product, per_order, genericWhat the badge displays impact per
impact_typetrees, plasticsWhich impact to show
show_modaltrue, falseWhether to show an info icon that opens a details modal
localeen, de, es, it, etc.Display language
<div class="goodapi-product-badge"></div>

You should see a badge like this:

Sample GoodAPI product badge showing tree-planting impact on a product listing