Give Food

API

Beta

Get access to our data over HTTPS in JSON.

  • Do good with the data
  • We only cover the UK
  • Try not to make requests more than a few times a second
  • If you display a food bank and their need also use their URL to link to them
  • Credit us with a link to our homepage if you republish
  • Cache, but don't cache for too long. All this is updated at least hourly

Our API and data has been used by governments, supermarkets, The Times, Reach PLC, Cuvva, Munch & Trussell Trust.

Please contact us at mail@givefood.org.uk if you're going to launch something using our data. We'll be more than happy to help with any technical questions & optimisations, PR and to ensure that we're all helping food banks as effectively as possible.

All Food Banks

Returns a list of all food bank organisations known to us. This is also available as a CSV.

https://www.givefood.org.uk/api/1/foodbanks/
Description Example
name Name of the food bank Bristol East
slug URL-safe slug of the name of the food bank bristol-east
address Address of the food bank 32 Stapleton Road
Easton
Bristol
postcode Postcode of the food bank BS5 0QY
country Country (or British crown dependency) of the food bank England
latt_long Lattitude and longitude of the food bank 51.4597049,-2.577905
closed If the food bank has closed false
phone Phone number of the food bank 07584 625082
email Email address of the food bank ebfoodbank@crisis-centre.org.uk
url URL of the homepage of the food bank https://eastbristol.foodbank.org.uk
shopping_list_url URL of the shopping list for the food bank https://eastbristol.foodbank.org.uk/give-help/donate-food/
charity_number Identifer of the charity the food bank runs under in it's country 298528
charity_register_url URL of the details of the food bank's charity at the charity registrar https://beta.charitycommission.gov.uk/charity-details/?regId=298528
network Name of the network the food banks is a member of Trussell Trust
parliamentary_constituency Name of the parliamentary constituency in which the food bank is in Bristol West
mp_party Name of the political party of the MP representing the parliamentary constituency in which the food bank is in Labour
mp Name of the MP representing the parliamentary constituency in which the food bank is in Thangam Debbonaire
district Name of the district in the food bank is in Bristol, City of
ward Name of the ward in the food bank is in Lawrence Hill
self URL of the JSON representing this food bank https://www.givefood.org.uk/api/1/foodbank/black-country/

When given a place returns list of ten food banks nearby that are not closed. Querying by lattlong is much quicker than address, so use that if possible.

Address can be a full address, but works well with just a postcode too.

https://www.givefood.org.uk/api/1/foodbanks/search/?lattlong=53.42,-2.55
https://www.givefood.org.uk/api/1/foodbanks/search/?address=66 The Headrow Leeds LS1 8EQ
https://www.givefood.org.uk/api/1/foodbanks/search/?address=SW1A 0AA

Returns all of the fields above, plus...

Description Example
distance_mi Distance in miles from the place submitted 7.72
distance_m Distance in metres from the place submitted 4350
latt_long Lattitude and longitude of the food bank 51.4597049,-2.577905
number_needs Number of line items requested by the food bank 4
needs Linebreak separated list of line items requested by the food bank, or "Nothing" or "Unknown" Coffee
Long life Juice
Cooking sauce
Tinned custard
need_id String that uniquely identifies a need requested 57e15d18
updated Date and time the need was updated 2020-02-17 09:04:44.603292+00:00
updated_text Human readable version of date and time the need was updated 1 week, 4 days
self URL of the JSON representing this food bank https://www.givefood.org.uk/api/1/foodbank/black-country/

Food Bank

When given the food bank slug returns the details for an individual food bank organisation.

https://www.givefood.org.uk/api/1/foodbank/black-country/

Returns all of the fields above, plus...

Description Example
locations List of locations we know of for this organisation
{
  latt_long: "51.4324167,-0.1034595",
  postcode: "SE27 0HS",
  name: "Norwood",
  address: "St Luke's Church Knights Hill West Norwood London",
  phone: "07722 121108",
}
parliamentary_constituency Name of the parliamentary constituency in which the food bank is in Bristol West
mp_party Name of the political party of the MP representing the parliamentary constituency in which the food bank is in Labour
mp Name of the MP representing the parliamentary constituency in which the food bank is in Thangam Debbonaire
district Name of the district in the food bank is in Bristol, City of
ward Name of the ward in the food bank is in Lawrence Hill
self URL of the JSON representing this food bank https://www.givefood.org.uk/api/1/foodbank/black-country/

Needs

Reverse chronological list of the last 100 needs published by food banks that we've found. This is usually up to the last 5-10 days worth. You can also append ?limit=1000 to return more, but go easy on this please as it's expensive.

https://www.givefood.org.uk/api/1/needs/
Description Example
id String that uniquely identifies a need requested 57e15d18
created Date and time that the need was found 2020-06-19T17:09:51.852Z
foodbank_name Name of the food bank that published the need Sid Valley
foodbank_slug Unique slug of the food bank sid_valley
foodbank_self URL of the JSON representing this food bank https://www.givefood.org.uk/api/1/foodbank/sid-valley/
needs Linebreak separated list of line items requested by the food bank, or "Nothing" or "Unknown" Coffee
Long life Juice
Cooking sauce
Tinned custard
url URL where we found the need published http://www.sidvalleyfoodbank.org.uk/shopping-list/
self URL of the JSON representing this need https://www.givefood.org.uk/api/1/need/a44f6dd2/