Using the LaunchPanda badge API
The badge API lets you pull your featured-on badges as data, render them on your own server, and get updates pushed to your site the moment they change.
The LaunchPanda badge API lets you pull your "featured on" badges as data, render them on your own server, and get updates pushed to your site the instant they change. It is an optional, more advanced alternative to the one-line badge widget, made for sites that render on a server.
You only need it if you want your badges in the raw HTML for crawlers, or you want updates to appear instantly instead of on the widget's normal refresh.
Your token and your API key
The API uses two separate credentials. They are not interchangeable, so keep them straight.
You find both on the Snippet tab of your Auto Launch product. The token sits in the install snippet, and you create the API key under "Step 1: API key".
The badge endpoint
Send a GET request with your public token:
GET https://www.launchpanda.dev/api/embed/badges?token=lp_pub_...
It returns JSON with your current badge set. The fields you care about:
enabled, whether your badges are live.badges, an array of badges, each with aname,href,img, andalt.final, false while your launch is running, true once it is complete and the set is locked.
The endpoint is open for cross-origin requests and cached for a few minutes, so it is cheap to call on every page render.
Render the badges on your site
Fetch the endpoint on your server, then output each badge as a real link. Rendering in the raw HTML matters, because directory crawlers do not run JavaScript, and a badge they cannot see can cost you the dofollow link.
- Fetch the endpoint in your server code, at request time or with a short cache.
- Wrap each badge in an anchor: link to its
href, show itsimg, and setrel="noopener". Never addnofollow. - Cache the result for about five minutes, so a slow response never blocks your page.
The fastest way to set this up is the "Let AI install it" prompt on the Snippet tab. It writes the server-rendered version for you, correct for your framework.
Turn on instant updates
By default your site checks for new badges on its own every few minutes. If you want new badges to appear the moment they change, add a small refresh route and let us call it.
- Create the API key under "Step 1: API key" on the Snippet tab.
- Store it in your site as a secret, for example
LAUNCHPANDA_PUSH_SECRET. Do not hardcode it. - Add a route at
/api/launchpanda-revalidatethat checks theAuthorizationheader matchesBearerplus your secret, then clears your badge cache and returns 200.
From then on, whenever your badge set changes, we send a request to that route and your site refreshes right away. The regular timer stays on as a fallback. The "Let AI install it" prompt adds this route for you once a key exists.
How often badges refresh
Common issues
- Badges do not update. Check you installed the API version or the widget, not a static copy of the badges pasted by hand. Static badges only change when you redeploy.
- The refresh route returns 401. The secret we send does not match the one on your site. Regenerate the key and update your stored value.
- Crawlers cannot see the badges. They are being rendered by JavaScript in the browser. Move the rendering to your server, so the badges sit in the raw HTML.