Thanks very much, Frances. I am receiving that info OK. I note that it does not 
include the distance from the location in the query to the article’s location. 
Is there a way of getting the query to return that info also?

ja

On Sep 15, 2014, at 12:59 PM, Frances Hocutt <[email protected]> wrote:

> Jim, try this:
> 
> https://en.wikipedia.org/w/api.php?action=query&prop=coordinates|extracts&format=json&colimit=10&exchars=300&exlimit=10&exintro=&generator=geosearch&ggscoord=51.507222%7C-0.1275&ggsradius=1000&ggslimit=10
> 
> The documentation for extracts is here:
> https://www.mediawiki.org/wiki/Extension:TextExtracts#API . It is less
> resource-intensive to only fetch extracts from the introductory
> section so the limits for queries that use the exintro parameter have
> higher limits than queries that require the whole page to be parsed.
> 
> -Frances
> 
> On Mon, Sep 15, 2014 at 12:37 PM, jim andrews <[email protected]> wrote:
>> Thanks, Max. I read the URL you cited and visited the API sandbox, but I 
>> don’t understand how to get an article summary. Could you please give me an 
>> example URL?
>> 
>> Thanks,
>> Jim Andrews
>> http://vispo.com
>> 
>> On Sep 15, 2014, at 12:14 PM, Max Semenik <[email protected]> wrote:
>> 
>>> Jim, you already can do it using geosearch as a generator[1], e.g. [2]
>>> 
>>> 
>>> ---
>>> [1] https://www.mediawiki.org/wiki/API:Query#Generators
>>> [2] http://tr.im/29XHc
>>> 
>>> On Mon, Sep 15, 2014 at 12:05 PM, jim andrews <[email protected]> wrote:
>>> Do you know if there are any plans to include an article summary in the 
>>> list=geosearch results? That would be terrific. I’ve been using the 
>>> geonames.org  API for retrieving Wikipedia articles, and it returns a brief 
>>> (350-400 character?) article summary which seems to be the first 350-400 
>>> characters (or so) of the Wikipedia articles. This is very useful in search 
>>> results, of course. The user can use that information to decide which of 
>>> the several links to click. The title alone is often rather mysterious. It 
>>> often does not provide enough info for the user to make a decision as to 
>>> which link to click, if any.
>>> 
>>> Currently, the info I get back from your service ( 
>>> https://www.mediawiki.org/wiki/Extension:GeoData#API ) has these fields:
>>> <gs pageid="167267" ns="0" title="City Lights Bookstore" lat="37.7976" 
>>> lon="-122.407" dist="1331" primary="" />
>>> 
>>> I’m suggesting it also include a ‘summary’ field consisting of the first 
>>> 350-400 characters of the article.
>>> 
>>> Is that feasible?
>>> 
>>> What I currently do is use geonames as first choice and if that fails, I 
>>> use your service. It would be nice to be able to use your service as first 
>>> choice.
>>> 
>>> Thanks,
>>> Jim Andrews
>>> _______________________________________________
>>> Mediawiki-api mailing list
>>> [email protected]
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>>> 
>>> 
>>> 
>>> --
>>> Best regards,
>>> Max Semenik ([[User:MaxSem]])
>>> _______________________________________________
>>> Mediawiki-api mailing list
>>> [email protected]
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>> 
>> 
>> _______________________________________________
>> Mediawiki-api mailing list
>> [email protected]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
> 
> _______________________________________________
> Mediawiki-api mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to