Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-07 Thread Michael Holloway
Anand,

I don't believe we track per-article pageview counts by country.  However,
it might be worth asking on analyt...@lists.wikimedia.org to be sure, as
they're the experts on our analytics infrastructure.

Best,
Michael

On Fri, Apr 7, 2017 at 12:03 PM, Anandroid Inc  wrote:

> Thanks Michael, this clears it.
> One last question is there a way to get the most viewed pages countrywise.
> For instance, most viewed pages in India, USA, UK etc.
>
> Thanks,
> Anand
>
> On 07-Apr-2017, at 8:58 PM, Michael Holloway 
> wrote:
>
> Whoops!  Meant to reply to list.
>
> On Fri, Apr 7, 2017 at 10:20 AM, Michael Holloway  > wrote:
>
>> Hi Anand,
>>
>> It looks like the results from those two queries are from different
>> days.  The first set is from April 5 and the second is from April 6.  For
>> the results from April 5 in the REST API, you'll want
>> https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06.
>>
>> Also please note that the results from the Action API (api.php) aren't
>> sorted in decreasing pageview order as the REST API's are.  You'll need to
>> sort them yourself.  (Depending on the number of results you need, you
>> should also familiarize yourself with query continuation
>>  as well as
>> the result limits per request on the various modules you're using (for
>> instance, 20 for TextExtracts and 50 for PageImages as indicated at the
>> bottom of the results of your query)).
>>
>> After ensuring you have the same date and sorting the Action API results,
>> you should have the same or very similar results.  For instance, looking at
>> the results from April 5, it looks like "Lake Nyos Disaster" is on top
>> with 497638 pageviews in both sets.  You still might see slight
>> discrepancies between the two sources due to implementation details,
>> however; for instance, in the REST API endpoint we use a heuristic to
>> attempt to filter out pages with pageview counts likely inflated by bot
>> traffic, and so a few pages here and there that appear in the Action API
>> results wouldn't appear in the REST API list.
>>
>> Best,
>> Michael
>>
>> On Fri, Apr 7, 2017 at 6:02 AM, Anandroid Inc 
>> wrote:
>>
>>> Hi Team,
>>>
>>> Thanks a lot for your support and quick responses.
>>> As per all the suggestions you gave for my query, I found below two apis
>>> which solves my purpose,
>>> But I see both queries ask for todays most viewed pages on wikipedia but
>>> they are returning different results.
>>> Request you to please help me on this.
>>>
>>> 1)
>>> https://en.wikipedia.org/w/api.php?action=query=json;
>>> prop=extracts%7Cinfo%7Cpageimages%7Cpageviews%7Cpageterms%7C
>>> pageprops%7Crevisions=mostviewed=512&
>>> exlimit=max=1=1=plain&
>>> inprop=url=640=max=description
>>> %7Calias%7Clabel=50=1
>>> 
>>>
>>> 2) https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/07
>>>
>>>
>>>
>>> On 07-Apr-2017, at 3:43 AM, Adam Baso  wrote:
>>>
>>> For the action API I think you're looking for an extra property,
>>> *pageviews*. Maybe something like this:
>>>
>>> https://en.wikipedia.org/wiki/Special:ApiSandbox#action=quer
>>> y=json=extracts%7Cinfo%7Cpageimages%7Cpageviews%
>>> 7Cpageterms%7Cpageprops%7Crevisions=mostviewed&
>>> exchars=512=max=1=1&
>>> exsectionformat=plain=url=640=
>>> max=8=description%7Calias%7Clabel=20
>>>
>>> On Thu, Apr 6, 2017 at 4:44 PM, Anandroid Inc 
>>> wrote:
>>>
 ++Michael

 On 07-Apr-2017, at 3:09 AM, Anandroid Inc  wrote:

 Hi Michael,

 Thanks for your quick response.
 This is very helpful, exactly what I was looking for.

 Thanks,
 Anand

 On 07-Apr-2017, at 12:08 AM, Michael Holloway 
 wrote:

 Hi Anand,

 It sounds like the REST API's featured feed endpoint
  provides
 what you're looking for.

 For example: https://en.wikipedia.org/api/r
 est_v1/feed/featured/2017/04/06 (see the content under the "mostread"
 key).

 Under the hood, titles are obtained from the Pageview API
  and then
 supplementary information for our desired titles is obtained from the REST
 API's page summary endpoint
 .
 That would be the easiest way to go if you'd like to go in a slightly
 different direction from what's provided in our featured feed endpoint.

 If you'd like, you can view the implementation for the "mostread"

Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-07 Thread Anandroid Inc
Thanks Michael, this clears it.
One last question is there a way to get the most viewed pages countrywise.
For instance, most viewed pages in India, USA, UK etc.

Thanks,
Anand

> On 07-Apr-2017, at 8:58 PM, Michael Holloway  wrote:
> 
> Whoops!  Meant to reply to list.
> 
> On Fri, Apr 7, 2017 at 10:20 AM, Michael Holloway  > wrote:
> Hi Anand,
> 
> It looks like the results from those two queries are from different days.  
> The first set is from April 5 and the second is from April 6.  For the 
> results from April 5 in the REST API, you'll want 
> https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06 
> .
> 
> Also please note that the results from the Action API (api.php) aren't sorted 
> in decreasing pageview order as the REST API's are.  You'll need to sort them 
> yourself.  (Depending on the number of results you need, you should also 
> familiarize yourself with query continuation 
>  as well as the 
> result limits per request on the various modules you're using (for instance, 
> 20 for TextExtracts and 50 for PageImages as indicated at the bottom of the 
> results of your query)).
> 
> After ensuring you have the same date and sorting the Action API results, you 
> should have the same or very similar results.  For instance, looking at the 
> results from April 5, it looks like "Lake Nyos Disaster" is on top with 
> 497638 pageviews in both sets.  You still might see slight discrepancies 
> between the two sources due to implementation details, however; for instance, 
> in the REST API endpoint we use a heuristic to attempt to filter out pages 
> with pageview counts likely inflated by bot traffic, and so a few pages here 
> and there that appear in the Action API results wouldn't appear in the REST 
> API list. 
> 
> Best,
> Michael
> 
> On Fri, Apr 7, 2017 at 6:02 AM, Anandroid Inc  > wrote:
> Hi Team,
> 
> Thanks a lot for your support and quick responses.
> As per all the suggestions you gave for my query, I found below two apis 
> which solves my purpose,
> But I see both queries ask for todays most viewed pages on wikipedia but they 
> are returning different results.
> Request you to please help me on this.
> 
> 1) 
> https://en.wikipedia.org/w/api.php?action=query=json=extracts%7Cinfo%7Cpageimages%7Cpageviews%7Cpageterms%7Cpageprops%7Crevisions=mostviewed=512=max=1=1=plain=url=640=max=description%7Calias%7Clabel=50=1
>  
> 
> 
> 2) https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/07 
> 
> 
> 
> 
>> On 07-Apr-2017, at 3:43 AM, Adam Baso > > wrote:
>> 
>> For the action API I think you're looking for an extra property, pageviews. 
>> Maybe something like this:
>> 
>> https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query=json=extracts%7Cinfo%7Cpageimages%7Cpageviews%7Cpageterms%7Cpageprops%7Crevisions=mostviewed=512=max=1=1=plain=url=640=max=8=description%7Calias%7Clabel=20
>>  
>> 
>> 
>> On Thu, Apr 6, 2017 at 4:44 PM, Anandroid Inc > > wrote:
>> ++Michael
>> 
>>> On 07-Apr-2017, at 3:09 AM, Anandroid Inc >> > wrote:
>>> 
>>> Hi Michael, 
>>> 
>>> Thanks for your quick response.
>>> This is very helpful, exactly what I was looking for.
>>> 
>>> Thanks,
>>> Anand
>>> 
 On 07-Apr-2017, at 12:08 AM, Michael Holloway > wrote:
 
 Hi Anand,
 
 It sounds like the REST API's featured feed endpoint 
  provides 
 what you're looking for.  
 
 For example: https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06 
  (see the 
 content under the "mostread" key).
 
 Under the hood, titles are obtained from the Pageview API 
  and then 
 supplementary information for our desired titles is obtained from the REST 
 API's page summary endpoint 
 .
   That would be the easiest way to go if you'd 

Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-07 Thread Michael Holloway
Whoops!  Meant to reply to list.

On Fri, Apr 7, 2017 at 10:20 AM, Michael Holloway 
wrote:

> Hi Anand,
>
> It looks like the results from those two queries are from different days.
> The first set is from April 5 and the second is from April 6.  For the
> results from April 5 in the REST API, you'll want
> https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06.
>
> Also please note that the results from the Action API (api.php) aren't
> sorted in decreasing pageview order as the REST API's are.  You'll need to
> sort them yourself.  (Depending on the number of results you need, you
> should also familiarize yourself with query continuation
>  as well as
> the result limits per request on the various modules you're using (for
> instance, 20 for TextExtracts and 50 for PageImages as indicated at the
> bottom of the results of your query)).
>
> After ensuring you have the same date and sorting the Action API results,
> you should have the same or very similar results.  For instance, looking at
> the results from April 5, it looks like "Lake Nyos Disaster" is on top
> with 497638 pageviews in both sets.  You still might see slight
> discrepancies between the two sources due to implementation details,
> however; for instance, in the REST API endpoint we use a heuristic to
> attempt to filter out pages with pageview counts likely inflated by bot
> traffic, and so a few pages here and there that appear in the Action API
> results wouldn't appear in the REST API list.
>
> Best,
> Michael
>
> On Fri, Apr 7, 2017 at 6:02 AM, Anandroid Inc 
> wrote:
>
>> Hi Team,
>>
>> Thanks a lot for your support and quick responses.
>> As per all the suggestions you gave for my query, I found below two apis
>> which solves my purpose,
>> But I see both queries ask for todays most viewed pages on wikipedia but
>> they are returning different results.
>> Request you to please help me on this.
>>
>> 1)
>> https://en.wikipedia.org/w/api.php?action=query=json;
>> prop=extracts%7Cinfo%7Cpageimages%7Cpageviews%7Cpageterms%
>> 7Cpageprops%7Crevisions=mostviewed=
>> 512=max=1=1=plai
>> n=url=640=max=descript
>> ion%7Calias%7Clabel=50=1
>> 
>>
>> 2) https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/07
>>
>>
>>
>> On 07-Apr-2017, at 3:43 AM, Adam Baso  wrote:
>>
>> For the action API I think you're looking for an extra property,
>> *pageviews*. Maybe something like this:
>>
>> https://en.wikipedia.org/wiki/Special:ApiSandbox#action=quer
>> y=json=extracts%7Cinfo%7Cpageimages%7Cpageview
>> s%7Cpageterms%7Cpageprops%7Crevisions=mostviewed=512&
>> exlimit=max=1=1=plain&
>> inprop=url=640=max=8
>> ms=description%7Calias%7Clabel=20
>>
>> On Thu, Apr 6, 2017 at 4:44 PM, Anandroid Inc 
>> wrote:
>>
>>> ++Michael
>>>
>>> On 07-Apr-2017, at 3:09 AM, Anandroid Inc  wrote:
>>>
>>> Hi Michael,
>>>
>>> Thanks for your quick response.
>>> This is very helpful, exactly what I was looking for.
>>>
>>> Thanks,
>>> Anand
>>>
>>> On 07-Apr-2017, at 12:08 AM, Michael Holloway 
>>> wrote:
>>>
>>> Hi Anand,
>>>
>>> It sounds like the REST API's featured feed endpoint
>>>  provides
>>> what you're looking for.
>>>
>>> For example: https://en.wikipedia.org/api/r
>>> est_v1/feed/featured/2017/04/06 (see the content under the "mostread"
>>> key).
>>>
>>> Under the hood, titles are obtained from the Pageview API
>>>  and then
>>> supplementary information for our desired titles is obtained from the REST
>>> API's page summary endpoint
>>> .
>>> That would be the easiest way to go if you'd like to go in a slightly
>>> different direction from what's provided in our featured feed endpoint.
>>>
>>> If you'd like, you can view the implementation for the "mostread"
>>> section of our aggregated feed endpoint here:
>>>
>>> https://phabricator.wikimedia.org/diffusion/GMOA/browse/mast
>>> er/lib/feed/most-read.js
>>>
>>> Please note that as of now the REST API endpoints are officially
>>> designated as unstable.
>>>
>>> Best,
>>> Michael
>>>
>>>
>>>
>>> On Thu, Apr 6, 2017 at 2:19 PM, Anandroid Inc 
>>> wrote:
>>>
 Hi Team,

 Thanks for the great api provided for all the wiki info.
 I am looking for a combination of right parameters which will return me
 most viewed pages with the page url, article snippet, thumbnail image url.
 Hope you can help with this.

 Thanks,
 Anand
 

Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-07 Thread Adam Baso
This relates to slightly different strategies employed by the the APIs

The first one, which is part of the Action API (api.php), applies less
filtering. See WikimediaPageViewService.php

for a starting point.

The second one, which is part of the RESTbase API (/api/rest_v1), applies
more custom filtering. See the most-read.js

file
to which Michael linked.

-Adam

On Fri, Apr 7, 2017 at 5:02 AM, Anandroid Inc  wrote:

> Hi Team,
>
> Thanks a lot for your support and quick responses.
> As per all the suggestions you gave for my query, I found below two apis
> which solves my purpose,
> But I see both queries ask for todays most viewed pages on wikipedia but
> they are returning different results.
> Request you to please help me on this.
>
> 1)
> https://en.wikipedia.org/w/api.php?action=query=
> json=extracts%7Cinfo%7Cpageimages%7Cpageviews%
> 7Cpageterms%7Cpageprops%7Crevisions=mostviewed=512&
> exlimit=max=1=1=
> plain=url=640=max=
> description%7Calias%7Clabel=50=1
> 
>
> 2) https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/07
>
>
>
> On 07-Apr-2017, at 3:43 AM, Adam Baso  wrote:
>
> For the action API I think you're looking for an extra property,
> *pageviews*. Maybe something like this:
>
> https://en.wikipedia.org/wiki/Special:ApiSandbox#action=
> query=json=extracts%7Cinfo%7Cpageimages%
> 7Cpageviews%7Cpageterms%7Cpageprops%7Crevisions&
> generator=mostviewed=512=max=1&
> explaintext=1=plain=url=
> 640=max=8=description%7Calias%
> 7Clabel=20
>
> On Thu, Apr 6, 2017 at 4:44 PM, Anandroid Inc 
> wrote:
>
>> ++Michael
>>
>> On 07-Apr-2017, at 3:09 AM, Anandroid Inc  wrote:
>>
>> Hi Michael,
>>
>> Thanks for your quick response.
>> This is very helpful, exactly what I was looking for.
>>
>> Thanks,
>> Anand
>>
>> On 07-Apr-2017, at 12:08 AM, Michael Holloway 
>> wrote:
>>
>> Hi Anand,
>>
>> It sounds like the REST API's featured feed endpoint
>>  provides
>> what you're looking for.
>>
>> For example: https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/0
>> 6 (see the content under the "mostread" key).
>>
>> Under the hood, titles are obtained from the Pageview API
>>  and then
>> supplementary information for our desired titles is obtained from the REST
>> API's page summary endpoint
>> .
>> That would be the easiest way to go if you'd like to go in a slightly
>> different direction from what's provided in our featured feed endpoint.
>>
>> If you'd like, you can view the implementation for the "mostread" section
>> of our aggregated feed endpoint here:
>>
>> https://phabricator.wikimedia.org/diffusion/GMOA/browse/mast
>> er/lib/feed/most-read.js
>>
>> Please note that as of now the REST API endpoints are officially
>> designated as unstable.
>>
>> Best,
>> Michael
>>
>>
>>
>> On Thu, Apr 6, 2017 at 2:19 PM, Anandroid Inc 
>> wrote:
>>
>>> Hi Team,
>>>
>>> Thanks for the great api provided for all the wiki info.
>>> I am looking for a combination of right parameters which will return me
>>> most viewed pages with the page url, article snippet, thumbnail image url.
>>> Hope you can help with this.
>>>
>>> Thanks,
>>> Anand
>>> ___
>>> Mediawiki-api mailing list
>>> Mediawiki-api@lists.wikimedia.org
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>>>
>>
>> ___
>> Mediawiki-api mailing list
>> Mediawiki-api@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>>
>>
>>
>>
>> ___
>> Mediawiki-api mailing list
>> Mediawiki-api@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>>
>>
> ___
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-07 Thread Anandroid Inc
Hi Team,

Thanks a lot for your support and quick responses.
As per all the suggestions you gave for my query, I found below two apis which 
solves my purpose,
But I see both queries ask for todays most viewed pages on wikipedia but they 
are returning different results.
Request you to please help me on this.

1) 
https://en.wikipedia.org/w/api.php?action=query=json=extracts%7Cinfo%7Cpageimages%7Cpageviews%7Cpageterms%7Cpageprops%7Crevisions=mostviewed=512=max=1=1=plain=url=640=max=description%7Calias%7Clabel=50=1
 


2) https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/07 




> On 07-Apr-2017, at 3:43 AM, Adam Baso  wrote:
> 
> For the action API I think you're looking for an extra property, pageviews. 
> Maybe something like this:
> 
> https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query=json=extracts%7Cinfo%7Cpageimages%7Cpageviews%7Cpageterms%7Cpageprops%7Crevisions=mostviewed=512=max=1=1=plain=url=640=max=8=description%7Calias%7Clabel=20
>  
> 
> 
> On Thu, Apr 6, 2017 at 4:44 PM, Anandroid Inc  > wrote:
> ++Michael
> 
>> On 07-Apr-2017, at 3:09 AM, Anandroid Inc > > wrote:
>> 
>> Hi Michael, 
>> 
>> Thanks for your quick response.
>> This is very helpful, exactly what I was looking for.
>> 
>> Thanks,
>> Anand
>> 
>>> On 07-Apr-2017, at 12:08 AM, Michael Holloway >> > wrote:
>>> 
>>> Hi Anand,
>>> 
>>> It sounds like the REST API's featured feed endpoint 
>>>  provides what 
>>> you're looking for.  
>>> 
>>> For example: https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06 
>>>  (see the 
>>> content under the "mostread" key).
>>> 
>>> Under the hood, titles are obtained from the Pageview API 
>>>  and then 
>>> supplementary information for our desired titles is obtained from the REST 
>>> API's page summary endpoint 
>>> .
>>>   That would be the easiest way to go if you'd like to go in a slightly 
>>> different direction from what's provided in our featured feed endpoint.
>>> 
>>> If you'd like, you can view the implementation for the "mostread" section 
>>> of our aggregated feed endpoint here:
>>> 
>>> https://phabricator.wikimedia.org/diffusion/GMOA/browse/master/lib/feed/most-read.js
>>>  
>>> 
>>> 
>>> Please note that as of now the REST API endpoints are officially designated 
>>> as unstable.
>>> 
>>> Best,
>>> Michael
>>> 
>>> 
>>> 
>>> On Thu, Apr 6, 2017 at 2:19 PM, Anandroid Inc >> > wrote:
>>> Hi Team,
>>> 
>>> Thanks for the great api provided for all the wiki info.
>>> I am looking for a combination of right parameters which will return me 
>>> most viewed pages with the page url, article snippet, thumbnail image url.
>>> Hope you can help with this.
>>> 
>>> Thanks,
>>> Anand
>>> ___
>>> Mediawiki-api mailing list
>>> Mediawiki-api@lists.wikimedia.org 
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 
>>> 
>>> 
>>> ___
>>> Mediawiki-api mailing list
>>> Mediawiki-api@lists.wikimedia.org 
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 
>>> 
>> 
> 
> 
> ___
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org 
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 
> 
> 
> 
> ___
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-06 Thread Adam Baso
For the action API I think you're looking for an extra property, *pageviews*.
Maybe something like this:

https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query=json=extracts%7Cinfo%7Cpageimages%7Cpageviews%7Cpageterms%7Cpageprops%7Crevisions=mostviewed=512=max=1=1=plain=url=640=max=8=description%7Calias%7Clabel=20

On Thu, Apr 6, 2017 at 4:44 PM, Anandroid Inc  wrote:

> ++Michael
>
> On 07-Apr-2017, at 3:09 AM, Anandroid Inc  wrote:
>
> Hi Michael,
>
> Thanks for your quick response.
> This is very helpful, exactly what I was looking for.
>
> Thanks,
> Anand
>
> On 07-Apr-2017, at 12:08 AM, Michael Holloway 
> wrote:
>
> Hi Anand,
>
> It sounds like the REST API's featured feed endpoint
>  provides
> what you're looking for.
>
> For example: https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06
> (see the content under the "mostread" key).
>
> Under the hood, titles are obtained from the Pageview API
>  and then
> supplementary information for our desired titles is obtained from the REST
> API's page summary endpoint
> .
> That would be the easiest way to go if you'd like to go in a slightly
> different direction from what's provided in our featured feed endpoint.
>
> If you'd like, you can view the implementation for the "mostread" section
> of our aggregated feed endpoint here:
>
> https://phabricator.wikimedia.org/diffusion/GMOA/browse/
> master/lib/feed/most-read.js
>
> Please note that as of now the REST API endpoints are officially
> designated as unstable.
>
> Best,
> Michael
>
>
>
> On Thu, Apr 6, 2017 at 2:19 PM, Anandroid Inc 
> wrote:
>
>> Hi Team,
>>
>> Thanks for the great api provided for all the wiki info.
>> I am looking for a combination of right parameters which will return me
>> most viewed pages with the page url, article snippet, thumbnail image url.
>> Hope you can help with this.
>>
>> Thanks,
>> Anand
>> ___
>> Mediawiki-api mailing list
>> Mediawiki-api@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>>
>
> ___
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
>
>
> ___
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-06 Thread Anandroid Inc
++Michael

> On 07-Apr-2017, at 3:09 AM, Anandroid Inc  wrote:
> 
> Hi Michael, 
> 
> Thanks for your quick response.
> This is very helpful, exactly what I was looking for.
> 
> Thanks,
> Anand
> 
>> On 07-Apr-2017, at 12:08 AM, Michael Holloway > > wrote:
>> 
>> Hi Anand,
>> 
>> It sounds like the REST API's featured feed endpoint 
>>  provides what 
>> you're looking for.  
>> 
>> For example: https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06 
>>  (see the 
>> content under the "mostread" key).
>> 
>> Under the hood, titles are obtained from the Pageview API 
>>  and then 
>> supplementary information for our desired titles is obtained from the REST 
>> API's page summary endpoint 
>> .
>>   That would be the easiest way to go if you'd like to go in a slightly 
>> different direction from what's provided in our featured feed endpoint.
>> 
>> If you'd like, you can view the implementation for the "mostread" section of 
>> our aggregated feed endpoint here:
>> 
>> https://phabricator.wikimedia.org/diffusion/GMOA/browse/master/lib/feed/most-read.js
>>  
>> 
>> 
>> Please note that as of now the REST API endpoints are officially designated 
>> as unstable.
>> 
>> Best,
>> Michael
>> 
>> 
>> 
>> On Thu, Apr 6, 2017 at 2:19 PM, Anandroid Inc > > wrote:
>> Hi Team,
>> 
>> Thanks for the great api provided for all the wiki info.
>> I am looking for a combination of right parameters which will return me most 
>> viewed pages with the page url, article snippet, thumbnail image url.
>> Hope you can help with this.
>> 
>> Thanks,
>> Anand
>> ___
>> Mediawiki-api mailing list
>> Mediawiki-api@lists.wikimedia.org 
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 
>> 
>> 
>> ___
>> Mediawiki-api mailing list
>> Mediawiki-api@lists.wikimedia.org 
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
> 

___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-06 Thread Anandroid Inc
Hi Brad, 

Thanks for your quick response.
While the one you suggested is also helpful, It doesn’t have view count 
parameter.
I got another reply from your team with below api, which looks better and also 
has view count:
https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06 


Thanks,
Anand

> On 07-Apr-2017, at 12:26 AM, Brad Jorsch (Anomie)  
> wrote:
> 
> On Thu, Apr 6, 2017 at 2:19 PM, Anandroid Inc  > wrote:
> Thanks for the great api provided for all the wiki info.
> I am looking for a combination of right parameters which will return me most 
> viewed pages with the page url, article snippet, thumbnail image url.
> Hope you can help with this.
> 
> With the action API, you can use generator=mostviewed to generate the pages, 
> and prop=info|extracts|pageimages to fetch the requested properties. For 
> example, using the API Sandbox,
> 
> https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query=json=extracts%7Cinfo%7Cpageimages=mostviewed=max=1=url=max
>  
> 
> 
> -- 
> Brad Jorsch (Anomie)
> Senior Software Engineer
> Wikimedia Foundation
> ___
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-06 Thread Anandroid Inc
Hi Michael, 

Thanks for your quick response.
This is very helpful, exactly what I was looking for.

Thanks,
Anand

> On 07-Apr-2017, at 12:08 AM, Michael Holloway  wrote:
> 
> Hi Anand,
> 
> It sounds like the REST API's featured feed endpoint 
>  provides what 
> you're looking for.  
> 
> For example: https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06 
>  (see the 
> content under the "mostread" key).
> 
> Under the hood, titles are obtained from the Pageview API 
>  and then 
> supplementary information for our desired titles is obtained from the REST 
> API's page summary endpoint 
> .
>   That would be the easiest way to go if you'd like to go in a slightly 
> different direction from what's provided in our featured feed endpoint.
> 
> If you'd like, you can view the implementation for the "mostread" section of 
> our aggregated feed endpoint here:
> 
> https://phabricator.wikimedia.org/diffusion/GMOA/browse/master/lib/feed/most-read.js
>  
> 
> 
> Please note that as of now the REST API endpoints are officially designated 
> as unstable.
> 
> Best,
> Michael
> 
> 
> 
> On Thu, Apr 6, 2017 at 2:19 PM, Anandroid Inc  > wrote:
> Hi Team,
> 
> Thanks for the great api provided for all the wiki info.
> I am looking for a combination of right parameters which will return me most 
> viewed pages with the page url, article snippet, thumbnail image url.
> Hope you can help with this.
> 
> Thanks,
> Anand
> ___
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org 
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 
> 
> 
> ___
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-06 Thread Brad Jorsch (Anomie)
On Thu, Apr 6, 2017 at 2:19 PM, Anandroid Inc  wrote:

> Thanks for the great api provided for all the wiki info.
> I am looking for a combination of right parameters which will return me
> most viewed pages with the page url, article snippet, thumbnail image url.
> Hope you can help with this.
>

With the action API, you can use generator=mostviewed to generate the
pages, and prop=info|extracts|pageimages to fetch the requested properties.
For example, using the API Sandbox,

https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query=json=extracts%7Cinfo%7Cpageimages=mostviewed=max=1=url=max


-- 
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


Re: [Mediawiki-api] Wikipedia most viewed pages data

2017-04-06 Thread Michael Holloway
Hi Anand,

It sounds like the REST API's featured feed endpoint
 provides what
you're looking for.

For example: https://en.wikipedia.org/api/rest_v1/feed/featured/2017/04/06
(see the content under the "mostread" key).

Under the hood, titles are obtained from the Pageview API
 and then
supplementary information for our desired titles is obtained from the REST
API's page summary endpoint
.
That would be the easiest way to go if you'd like to go in a slightly
different direction from what's provided in our featured feed endpoint.

If you'd like, you can view the implementation for the "mostread" section
of our aggregated feed endpoint here:

https://phabricator.wikimedia.org/diffusion/GMOA/browse/master/lib/feed/most-read.js

Please note that as of now the REST API endpoints are officially designated
as unstable.

Best,
Michael



On Thu, Apr 6, 2017 at 2:19 PM, Anandroid Inc  wrote:

> Hi Team,
>
> Thanks for the great api provided for all the wiki info.
> I am looking for a combination of right parameters which will return me
> most viewed pages with the page url, article snippet, thumbnail image url.
> Hope you can help with this.
>
> Thanks,
> Anand
> ___
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


[Mediawiki-api] Wikipedia most viewed pages data

2017-04-06 Thread Anandroid Inc
Hi Team,

Thanks for the great api provided for all the wiki info.
I am looking for a combination of right parameters which will return me most 
viewed pages with the page url, article snippet, thumbnail image url.
Hope you can help with this.

Thanks,
Anand
___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api