Fundraiser API

Get a live stream widget or JSON feed of your fundraiser's total. Works with fundraiser, team and campaign pages on iRaiser (e.g. WWF, Punainen Risti, Unicef, Syöpäsäätiö, Pelastakaa Lapset), Securycast (e.g. Lastenklinikoiden Kummit, HelsinkiMissio), Nenäpäivä and MIELI ry's Mielipotti.

How to use

  1. Open your fundraiser page (for example on oma.wwf.fi, lahjoita.punainenristi.fi, oma.kummit.fi, nenapaiva.fi or mielipotti.fi) and copy its address from the browser.
  2. Paste the address above and press Get URL.
  3. For a stream overlay, use the widget:
    1. Under Widget, pick the color, size and font, and tick Show goal to show the target too. The preview and widget URL update as you go.
    2. Copy the widget URL.
    3. In OBS, add a source with + → Browser, paste the URL and set the width and height, for example 800 × 200. Streamlabs and other streaming apps have the same kind of browser source.
    The widget has a transparent background and updates every 10 seconds. To change its look later, come back here or edit the URL: color=ffffff, size=64, font=Bebas+Neue, goal=1.
  4. To build your own display, use the API URL. It returns:
    {
      "target_amount": 5000,      // goal in euros, 0 if none
      "total_amount": "4159.02"   // raised so far, as a string
    }
  5. Poll it as often as you like; results refresh every 5 seconds. For example:
    const res = await fetch(API_URL);
    const { total_amount } = await res.json();

The fundraiser page must be public. Private or removed fundraisers can't be looked up.

Source on GitHub · Made by glukoo.si