Bus stops search

Hi All,

I am just developing a small app which searches for the bus stops based on the given search query. I have few issues with the bus-stops.csv.
Is there any way to achieve through any api calls and retrieve the bus stops with directions. For example the bus stop ‘Jutsums Lane’ have 2 stops in the same name with different directions.
Can you please help me out.

Absolutely - we would consider bus-stops.csv a legacy feed because all of the information in that file, and more, is available in the Unified API. To search for a bus stop you would use StopPoint search filtered to bus mode e.g.

curl -s "https://api.tfl.gov.uk/StopPoint/Search?query=Jutsums&mode=bus" | jq .
{
  "query": "Jutsums",
  "total": 2,
  "matches": [
    {
      "icsId": "1008599",
      "topMostParentId": "490G00008599",
      "modes": [
        "bus"
      ],
      "id": "490G00008599",
      "name": "Jutsums Lane",
      "lat": 51.574578,
      "lon": 0.160365
    },
    {
      "icsId": "1008600",
      "topMostParentId": "490G00008600",
      "modes": [
        "bus"
      ],
      "id": "490G00008600",
      "name": "Jutsums Lane  Crow Lane",
      "lat": 51.5684,
      "lon": 0.161328
    }
  ]
}

To get the details about direction, child stops, etc. you could then get details for that StopPoint Id

curl -s "https://api.tfl.gov.uk/StopPoint/490G00008599" | jq .
{
  "naptanId": "490G00008599",
  "modes": [
    "bus"
  ],
  "icsCode": "1008599",
  "stopType": "NaptanOnstreetBusCoachStopPair",
  "stationNaptan": "490G00008599",
  "lines": [
    {
      "id": "686",
      "name": "686",

// etc. and in the children list for the pair

     "id": "490008599E",
      "commonName": "Jutsums Lane",
      "placeType": "StopPoint",
      "additionalProperties": [
        {
          "$type": "Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities",
          "category": "Direction",
          "key": "CompassPoint",
          "sourceSystemKey": "Naptan490",
          "value": "E"
        },
        {
          "$type": "Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities",
          "category": "Direction",
          "key": "Towards",
          "sourceSystemKey": "CountDown",
          "value": "Romford"
        }

We also support geo searches, or you can drive on line identifier and mode instead (e.g. all the stops on a route). There’s more information in this blog article about finding the Location of Things in the API.