API request

91 views
Skip to first unread message

pr

unread,
Mar 23, 2017, 4:40:13 PM3/23/17
to Guardian Open Platform API Forum

Hi,

I was working on academic project in datascience, which needs to use the API to build some cool stuff.

 

Now,

 

 

My python code does the following steps:

 

1. collect the data Using guardian API. The data contains the following field.

    1.1  'results': [{

'isHosted': False,

'type': 'article',

'webPublicationDate': '2016-09-05T19:32:45Z',

'apiUrl': 'https://content.guardianapis.com/politics/2016/sep/05/so-brexit-means-brexit-means-brexit-is-that-it',

'sectionId': 'politics',

'id': 'politics/2016/sep/05/so-brexit-means-brexit-means-brexit-is-that-it',

'webUrl': 'https://www.theguardian.com/politics/2016/sep/05/so-brexit-means-brexit-means-brexit-is-that-it',

'webTitle': 'So Brexit means Brexit means Brexit. Is that it? | John Crace',

'sectionName': 'Politics' ......

 

Also, Guardian API  restricts results to only 200 results, which I think might be in sufficient.

 

All my search results are based on keyword " brexit "

So how to increase my result set?

 

 

I would appreciate if you help me.

Phil Wills

unread,
Mar 24, 2017, 12:40:36 PM3/24/17
to Guardian Open Platform API Forum
There is a hard limit on the number of results per page, but you can page through those results, e.g.


The response includes a 'pages' attribute which should let you know how many pages there are to traverse.

Phil

--
You received this message because you are subscribed to the Google Groups "Guardian Open Platform API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guardian-api-t...@googlegroups.com.
To post to this group, send email to guardian...@googlegroups.com.
Visit this group at https://groups.google.com/group/guardian-api-talk.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages