Adding content to html page using jquery/jSON. how to take more than just the 10 items on one page?

95 views
Skip to first unread message

DΛZΞ PΛRΛDΞ

unread,
Dec 5, 2015, 7:55:23 PM12/5/15
to Guardian Open Platform API Forum
Adding content to html page using jquery/jSON. how to take more than just the 10 items on one page?

Gideon Goldberg

unread,
Dec 7, 2015, 4:41:27 AM12/7/15
to guardian...@googlegroups.com
Hi,

You may control the number of items returned using the 'page-size'
parameter e.g.
http://content.guardianapis.com/search?page-size=200

Gideon

On 6 December 2015 at 00:55, DΛZΞ PΛRΛDΞ <dazeparad...@gmail.com> wrote:
> Adding content to html page using jquery/jSON. how to take more than just
> the 10 items on one page?
>
> --
> 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 http://groups.google.com/group/guardian-api-talk.
> For more options, visit https://groups.google.com/d/optout.

--

------------------------------
This e-mail and all attachments are confidential and may also be
privileged. If you are not the named recipient, please notify the sender
and delete the e-mail and all attachments immediately. Do not disclose the
contents to another person. You may not use the information for any
purpose, or store, or copy, it in any way. Guardian News & Media Limited
is not liable for any computer viruses or other material transmitted with
or as part of this e-mail. You should employ virus checking software.

Guardian News & Media Limited is a member of Guardian Media Group plc. Registered
Office: PO Box 68164, Kings Place, 90 York Way, London, N1P 2AP. Registered
in England Number 908396


Clinton Yeboah

unread,
Mar 5, 2016, 9:56:23 AM3/5/16
to Guardian Open Platform API Forum
If I am right, TheGuardian will limit you to 10 items in a single fetch. The system groups ten news items per page. So to get more than 10, you need 
1. First specify a page-number.
2. Ask for all 10 items on this page.
3. Increase the page number by 1
4. Ask for the other number if items.

For example, when i want the newest 20 items, I go to page 1, fetch all the items, increase the page by 1, and fetch all the items. It works. However, you should be careful , you are rate limited.

Mariot Chauvin

unread,
Mar 5, 2016, 10:08:12 AM3/5/16
to guardian...@googlegroups.com
Right but you can increase the number of items per page, using page-size parameter
--
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.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages