There is now an official JustGiving API: Justgiving API. Although I will continue to support this for Apps and sites that are still utilizing it.

JustGiving API

About

This is a 3rd party API providing data and alternative widgets for JustGiving.com events.

Data provided via the API include variables such as, Donation amount, Gift Aid amount, Charity logo, Charity info, Donations (including messages, names, dates & amounts from users)... more details in the API section.

For any queries about how to use this, or any other comments/suggestions/feedback please contact me at jo@easyjo.com

Sponsor me?

If you find this API useful, or like the work that's been done, perhaps you may consider sponsoring me on my ~1000 mile cycle over 10 days to Barcelona from the UK.

http://www.justgiving.com/barcelonabike/, Thanks!

Justgiving.com widgets

You can view you automatically generated widget like this:

<img src="http://api.jo.je/justgiving/view/barcelonabike">

And replace barcelonabike with your justgiving.com page name

For events without targets, they will look like this:

<a href="http://justgiving.com/richardstobasecamp"><img border=0 src="http://api.jo.je/justgiving/view/richardstobasecamp"></a>

or for a forum.... [url=http://justgiving.com/richardstobasecamp][img]http://api.jo.je/justgiving/view/richardstobasecamp[/img][/url]

Justgiving.com API

For any developers out there who want a quick way to get data about an event, more than provided by the RSS data, here's a JSON feed you can use (replace 'richardstobasecamp' as needed):

http://api.jo.je/justgiving/data/richardstobasecamp

Which provides the following, in JSON format.

The following example only shows one donation, although the live feeds show the 30 most recent donation messages

{
  "charity": "The Jigsaw CABAS&#174; Trust", 
  "charity_details": "The Jigsaw CABAS(r) School is an.... (live version has full content)", 
  "charity_logo": "http://www.justgiving.com/path/to/the/charity/logo.jpg", 
  "donations": [
    {
      "amount": "\u00a320.00", 
      "date": "16/07/10", 
      "gift_aid": "\u00a35.64", 
      "message": "Good luck :-D -- this is just prep for you&#39;re cycle across the americas right? ;-)", 
      "person": "Matthew"
    }], 
  "donations_offline": "\u00a30.00", 
  "donations_online": "\u00a3170.00", 
  "donations_target": "\u00a31,500.00", 
  "donations_total": "\u00a3170.00", 
  "gift_aid": "\u00a347.95", 
  "has_target": true, 
  "id": "2662659", 
  "page_creator": "Joel Richards", 
  "percentage_complete": 11, 
  "team_members": "Joel Richards, Peter Roome", 
  "title": "London to Barcelona Bike"
}

An indented version of all the data provided for an event is shown here.. JSON Data.

This can be decided in PHP5+ using json_decode()

JSONP - for inline Javascript usage

If you're like to use the code directly with javascript, you'll need to use the JSONP version.

The URL for JSONP data is provided below

http://api.jo.je/justgiving/jsonp.php?d=barcelonabike&callback=?

Simple Demo

This simple demo shows how you can use JQuery and the JSONP feed to display data on your domain

Demo with donation messages

This demo shows how to display the total raised, and the previous 6 donation messages

View the demo online

Advanced Example

To view the advanded example, which displays an updating feed of twitter messages referencing Justgiving and populates the page with twitter & JustGiving.com details, View Advanced Example.

FAQ

What can I use this for?

Anything you want, your own website, another Justgiving service or aggregate... If you use the API for something interesting, please let me know, it's great to see it in use!

Is there a rate limit?

No, although if you think you may be hitting the service more than 10,000 times in a 24 period please let me know to discuss requirements.

Do you cache?

Yes, we have a local cache that lasts for 5 hours, if you would like more up to date data, please drop me an email to discuss requirements.

Is this affliated to JustGiving?

No, this is totally unrelated to JustGiving, although we have checked that the service this is providing is fine to use, and they're happy!

Can you help me with some code?

Sure, drop drop me an email and I'll see if I can help.

Created by jo.je