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

Hi, I made a query that does what I want, but I found no info on how to put in a single to invoke from a script like wget <query>. Any help is welcomed.

asked 02 Feb '16, 19:51

davide_ttk's gravatar image

accept rate: 0%

edited 02 Feb '16, 20:57

aseerel4c26's gravatar image

aseerel4c26 ♦

  • In overpass turbo run your query.
  • Click on export button and choose raw data from overpass api.
  • Use the url of the page you landed on for wget.
permanent link

answered 02 Feb '16, 20:34

RM87's gravatar image

accept rate: 22%

You can try to use Overpass API

wiki page: [1]:

site page:

and for a page that explain how to use it from a command line (or in your case from a script) see this page:

Please note this two point:

1) the main server has an usage policy (see the wiki page about that)

2) the syntax used by Overpass api may be different from the one used by Overpass Turbo (I am not sure about this, there are two many languages used, I get confused)

permanent link

answered 02 Feb '16, 20:41

AnyFile's gravatar image

accept rate: 0%

Thanks AnyFile it was exactly what I needed

(02 Feb '16, 22:20) davide_ttk

Remove comments and newlines. You should get something like this:

[out:json][timeout:25];(node (poly: "45.5 11 45.6 11.6 45.2 11")["natural"="peak"];);out body;>;out skel qt;

urlencode that string. You can use this or any other tool for urlencode.

Get the encoded string and slap it in wget:

wget -O result.json ""

permanent link

answered 03 Feb '16, 07:09

ivanatora's gravatar image

accept rate: 7%

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: 02 Feb '16, 19:51

question was seen: 3,083 times

last updated: 03 Feb '16, 07:09

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