Struggle to Get Started

Hi everyone,

Hope you are well. I’m looking at the APIs with an intention to build a visualisation tool with same real-time data. But before that, I’ve been struggling to get my head around with how to use these APIs. Would appreciate your help. My two questions are:

  1. Is there any good documentation for the APIs where endpoints are well defined? I’ve found many places where the definition or examples of the parameters are missing.

  1. Is the unified API still being actively maintained? The wording is a big confusing.

  2. Can’t find App ID. I’ve tried to use Postman to play with the exported examples but couldn’t find an App ID in my User Profile. Is that still relevant?

Thanks a lot for your help in advance.

@uxandre

Welcome.

1 Like

only 3 years @briantist !

2 Likes

Hello! To explain your screenshot:

Where the request URL includes {braces}, this is a placeholder for the parameter of the same name. In this case, replace {ids} with the value you wish to use for the ids parameter.

For example, if you wish to get arrivals for the vehicle with ID LC71KWL, you can make a request to:
https://api.tfl.gov.uk/Vehicle/LC71KWL/Arrivals?app_key=YOUR_APP_KEY

Alternatively, you can provide a comma-separated list of vehicle IDs:
https://api.tfl.gov.uk/Vehicle/LC71KWL,LC71KWM,LC71KWN,LC71KWO,LC71KWP/Arrivals?app_key=YOUR_APP_KEY

If you need further assistance, please let us know what data you require and any issues you are having, and we’ll try to help.

1 Like

Thanks for the links @briantist!

@LeonByford thanks for the explanation! A quick follow up question is, where do I find the list of corresponding parameters (e.g. LC71KWL, etc). Without knowing where to find the actual IDs (and other parameters), I’m struggling to navigate myself across the site and make the APIs of our use.

Thanks again!

This particular API method is only useful if you already have one or more vehicle IDs. However, it sounds like you don’t already have this data, so I think this would not be suitable for you.

If you can tell us what data you already have and what data you need, then we can advise you how to query it from the Unified API.

For example, if you tell us that you have a list of bus routes, and you want to get live arrival data for those bus routes, then we would advise you to make a request like:
https://api.tfl.gov.uk/Line/15,24,63/Arrivals?app_key=YOUR_APP_KEY

Are you able to provide us with more information about what you’re trying to accomplish?