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

No luck with, so I am asking what is probably a very elementary question.

How can I download programmatically a GPS trace file which is available at

i.e. how can I do this with a script?

I presume the answer is somewhere in the API wiki documentation , but it's outside of my zone of familiarity (e.g. python or bash).

Note: I don't want to download bulk data, I simply want to be able to automate the download of, say, a dozen GPS trace files.

Edit: The reason of my failure was that I had made a mistake in constructing the URL...

For the record, the following python code snippet works just fine:
import requests from pathlib import Path url = "" path = Path.home()/'datasets' r = requests.get(url) with'wb') as f: f.write(r.content)

asked 29 Sep '19, 16:44

Antoine%20C's gravatar image

Antoine C
accept rate: 0%

edited 29 Sep '19, 21:23

The top public trace at the moment just happens to be this one. On that page is a download link, which is If you get that (via e.g. "wget" or within your programming language of choice) I'd expect that you'll get that trace. I've just done this:


and what I get looks like a GPX file to me. You could do that as part of a script. Does this answer the question, or do you need to know how to find out the trace ID, or something else?

permanent link
This answer is marked "community wiki".

answered 29 Sep '19, 17:08

SomeoneElse's gravatar image

SomeoneElse ♦
accept rate: 16%

Yes that answers my question!

I was not able to do this in python using its requests package - don't know why. (It downloads an html file which somewhere says "File not found".)

To answer your question, I am fine finding trace id (in python using an html parser).

(29 Sep '19, 17:16) Antoine C

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: 29 Sep '19, 16:44

question was seen: 2,055 times

last updated: 29 Sep '19, 21:23

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