NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum


I'm building a mobile application. One of the features shows bus stops on a map. When the user zooms in far enough, bus stops should load for the area they are looking at.

I have found part of the API that should help me do this:


This should be called every time the user pans around the map so that it loads a fresh set of bus stops for that area. My problem is, when I do this I'm receiving way too much data that is not related to the bus stops. I need to see nodes only by user: NaPTAN (104459). Is there a way I can filter down the results like this? Essentially I need to be loading the bus stops every time the user pans across the map, for this to be productive the bus stops need to have been loaded ideally > 500 milliseconds and < 1 second. It would also probably be better to receive the files in JSON format rather than XML as this will save a chunk of bytes increasing download speed.

If anyone can give me advice on the best way to do this I'd really appreciate it!


asked 07 Sep '13, 13:26

jskidd3's gravatar image

accept rate: 0%

The Overpass API allows to specify complex filters. It is also faster and more suited than the main API which is actually for editing and not for running bulk queries. Another option is to download the data in advance to store it locally. This way you are completely independent from the API and don't have to comply with the usage policy.

permanent link

answered 07 Sep '13, 19:39

scai's gravatar image

scai ♦
accept rate: 23%

you should not use API 0.6 for that, see it's usage policy - it is intended for editing only, and for such queries. There are alternative ways mentioned on the page, from setting up your own server syncing data with master openstreetmap servers, to using third party services.

permanent link

answered 07 Sep '13, 17:22

Matija%20Nalis's gravatar image

Matija Nalis
accept rate: 11%

As already stated Overpass should help you. Have a look how overpass-turbo does it:

If you only need the coordinates:

If you need more details:

You will probably have to consider whether you really want to query for each single pan (or if it would be better to query a bigger bbox and only requery if the user leaves the bbox).


permanent link

answered 09 Sep '13, 11:31

_al's gravatar image

accept rate: 4%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 07 Sep '13, 13:26

question was seen: 12,865 times

last updated: 09 Sep '13, 11:31

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum