Kin
Kin

Reputation: 4596

How to get result in json from overpass-turbo?

Is it possible to get result in JSON from http://overpass-turbo.eu/ (or directly from openstreetmap) ?

My request is:

(
  way
  (around:2000,55.693309807744484,21.151986122131348)
  [highway~"^(primary|secondary|tertiary|residential)$"]
  [name];
>;);out;

Upvotes: 3

Views: 1953

Answers (2)

tavi
tavi

Reputation: 680

This is the query: http://overpass-api.de/api/interpreter?data=[out:json]%20;%20(%20way%20(around:2000,55.693309807744484,21.151986122131348)%20[highway~%22^(primary|secondary|tertiary|residential)$%22]%20[name];%20%3E;);%20out;

Yours was missing: [out:json] ; <your part>

and %20 before out;

Upvotes: 2

MaM
MaM

Reputation: 2069

You need to add this line in front of your statement:

[out:json]; ...

Upvotes: 6

Related Questions