Skip to content
An API that returns items needed by foodbanks near a given location
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Include link to blog post in readme Dec 18, 2019

Foodbank API

A script to iterate through Trussell Trust foodbanks and find out what items they need, and a simple web server to let people query this and find out what items are needed by nearby foodbanks.

Read this blog post on the background to this API

Getting Started

Start by installing the dependencies:

pip install beautifulsoup4
pip install lxml
pip install requests
pip install geopy
pip install

For a fresh file of foodbank information you should run:


That will create a new, current version of foodbank_data_storage.txt

That'll take a couple of hours, so you might prefer to just use the foodbank_data_storage.txt that comes in this repo when you're getting started. It'll become increasingly out-of-date, but you can use it to make sure you've set things up correctly.

Then run the server:


API Endpoints

The API accepts GET requests. There are two endpoints, shown below with an example request.

Running the tests

There aren't any unit or integration tests yet. Pull requests will be reviewed!

You can’t perform that action at this time.