Topic on Project:Support desk

Different result from "same" API queries

8
Petr Doktor (talkcontribs)

I got into troubles with this queries: https://cs.wikipedia.org/w/api.php?action=query&format=json&prop=coordinates%7Cpageimages&generator=geosearch&piprop=thumbnail&ggscoord=49.1862423%7C16.5368174&ggsradius=10000&ggslimit=50&pithumbsize=100

the query above gives resul with distance, lon and lan but without page image which I'd like :-)

this query gives result with images url but mostly without lan and lon of GPS coordinates...

https://cs.wikipedia.org/w/api.php?action=query&format=json&prop=coordinates%7Cpageimages&generator=geosearch&piprop=thumbnail&ggscoord=49.1862423%7C16.5368174&ggsradius=10000&ggslimit=50&pithumbsize=100

Naturally, I would prefer to combine them - get a full list of pages with both position and image... Any advice appreciated :)

Ciencia Al Poder (talkcontribs)

I see the same URL and the same results...

Znotch190711 (talkcontribs)

Did you post to Phabricator?

Bawolff (talkcontribs)

copy/paste error?

Petr Doktor (talkcontribs)

they are not same - first 10 have coordinates array... the otthers not :(

Bawolff (talkcontribs)
Znotch190711 (talkcontribs)

What's an API query anyways?

Petr Doktor (talkcontribs)

Thank you guys! Now it works - I used Bawolff's query. I guess it was connected with the API limits. Final product you can check here: https://slavneobrazy.cz/wikiaround/ I hope it will be useful.