<div dir="ltr">You can use Sophox to pull this type of information, possibly just not all at once.<div><br></div><div>Here's a query that will give you all first level country sub-divisions (Canada in this case), as well as each province's Captial, Flag image, and ISO codes.</div><div><br></div><div><a href="https://tinyurl.com/y6jowy8v" target="_blank">https://tinyurl.com/y6jowy8v</a><br></div><div><br></div><div>(this query was modified from one of the examples Sophox has)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 13, 2019 at 5:47 PM Léo El Amri via talk <<a href="mailto:talk@openstreetmap.org" target="_blank">talk@openstreetmap.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I'm trying to fetch countries, their borders, and their capitals through<br>
Overpass API, but the server never replies to me (With a timeout:3600<br>
setting, the server reply with a 502 error after a while).<br>
I'm only a beginner with this API, so maybe my request is not efficient:<br>
<br>
(<br>
  node[place=city];<br>
  node[place=town];<br>
)->.a;<br>
rel[boundary=administrative][admin_level=2]->.b;<br>
(<br>
  node[place=country];<br>
  node.a[capital=yes];<br>
  way[boundary=administrative][admin_level=2];<br>
  .b;<br>
  .b >;<br>
)->.o;<br>
.o out body;<br>
<br>
What am I doing wrong ? (Should I use another tool for this purpose ?)<br>
<br>
Cordially,<br>
Léo<br>
<br>
_______________________________________________<br>
talk mailing list<br>
<a href="mailto:talk@openstreetmap.org" target="_blank">talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/talk</a><br>
</blockquote></div>