API to determine whether a postcode is in the expanded ULEZ

Since the TFL website has a page where you can enter a postcode and it tells you whether it’s inside th expanded ULEZ I assume this must use the API, but I can’t find it.

Any pointers?

@Trip Welcome

It’s here…

Thank you @briantist.

I’m not familiar with shapefiles but a quick google seems to indicate that they store the geometry of geographical features. I’ve found a library that makes reading them straightforward.

However, what I’m after is being able to determine whether a postcode is within the boundary. It’s not obvious how that is done, but clearly it can be done because TFL do it on their website. It is possible that their are licensing reasons they can’t make this available as an API.

@Trip I think you can get the rest of the data from the PAF - https://www.poweredbypaf.com/

You can use Postcode to Coords to get a lattitude and longitude value for a given postcode. Then use something like Turf.js to determin if the Postcode point is within a given Polygon. Hope this helps.