Safe Postcode is a demonstration of an API integration designed by @pedsm and @jonathanballs with the intention of making teaching the concept of APIs to programming students.
Safe postcode uses 2 publicaly avaliable APIs in order to fetch crimes reported around a certain area.
- Postcodes.io a postcode api for the UK
- UK Police API the UK police open api
Safe postcode uses postcodes.io
in order to fetch the latitude and longitude of a particular postcode
http https://postcodes.io/postcodes/SW1A%201AA
Then uses the result to create a query to the UK police api
http https://data.police.uk/api/crimes-at-location\?lat\=51.501009\&lng\=-0.141588
This is an intresting way of teaching begginers about what APIs can do in a way that generates something relatable.