Examples

96 views
Skip to first unread message

mattmcalister

unread,
Feb 24, 2009, 6:34:14 AM2/24/09
to Guardian API Talk
Share what you're doing with the Guardian Content API.

James Higgs

unread,
Mar 10, 2009, 7:56:10 AM3/10/09
to Guardian API Talk
I'm very keen to write an iPhone app that treats the Guardian content
as a huge, evolving encyclopedia that can be searched on the move, and
maybe saved for offline reading. I've got lots of ideas - too many
probably - but what I need to make any sort of progress at all is an
approved API key.

Dave

unread,
Mar 10, 2009, 10:39:31 AM3/10/09
to Guardian API Talk
It will be against the T&Cs to save it for offline reading (beyond 24
hours).

And for online, can't you just use the search box on guardian.co.uk
using Safari ?


Dave

James Higgs

unread,
Mar 10, 2009, 10:57:55 AM3/10/09
to Guardian API Talk
Here's the use case: I'm getting ready to leave the house and I want
some stuff to read on my way to work on the tube. I search (perhaps I
have some saved searches that I want run every morning) using my
iPhone and add some articles to read on my way. They download so that
I can read them while I'm out of signal range.

It would be trivial to expire these bits of content once they're
beyond the acceptable age per the T&Cs - maybe a task on app startup
could get rid of them from the local cache on the phone.

Think of it as a combination of Instapaper and Wikipanion but with
Guardian content. I think that's a useful app.

James Higgs

unread,
Mar 10, 2009, 12:12:11 PM3/10/09
to Guardian API Talk
Actually, even if this specific app wasn't useful, I'd still be very
interested in developing a BSD licensed Cocoa/CocoaTouch library that
others could use and contribute to, and in fact I'd do that as part of
developing my app. Something along the lines of Matt Gemmell's
MGTwitterEngine, which is reused in countless Twitter clients.

Dan W

unread,
Mar 10, 2009, 12:36:24 PM3/10/09
to Guardian API Talk
Looks like this could be a starting point for you:
http://github.com/mattb/guardianista/tree/master

James Higgs

unread,
Mar 10, 2009, 12:39:49 PM3/10/09
to Guardian API Talk
Yeah, that looks like a great starting point!

Thanks for creating that sample code, and for the API in general.

james...@googlemail.com

unread,
Mar 10, 2009, 12:41:39 PM3/10/09
to Guardian API Talk
I might not be entirely clear on how we can approach the use of the
Guardian content - but is it possible to pull, say - articles on
Health & Fitness into a blog as extra content for readers?

On Feb 24, 11:34 am, mattmcalister <matt.mcalis...@gmail.com> wrote:

Michael Brunton-Spall

unread,
Mar 10, 2009, 12:52:57 PM3/10/09
to james...@googlemail.com, Guardian API Talk
T's and C's say:
you are hereby granted a non-transferable limited licence to:
• Access, copy, publish, distribute and display the OPG Content in electronic form on Your Website(s).
• Make OPG Content available to Your Website's end users for their personal use only.
• Reproduce our trade marks, logos and branding solely in the form and position provided in the OPG Content.

(b)You will:
• Retain the full headline, byline and copyright notice from the original OPG Content supplied.
• Retain the original watermark embedded in the OPG Content.
• Retain any correction or other notice that is linked to the OPG Content.
• Include a link to the original article published on guardian.co.uk in all OPG Content published on Your Website.
• Retain all links to external websites contained within the OPG Content.

(c)You will not:
• Edit, adapt, translate or otherwise alter the OPG Content.
• Distort the meaning or message of the OPG Content by association, implication or juxtaposition.
• Use OPG Content in a manner that could amount to derogatory treatment of its author.
• Present OPG Content in a way that seeks to replicate, or pass off Your Website as a resource belonging to or endorsed by us.
• Use OPG Content in any printed format.
• Use headlines from the OPG Content to create links to any content other than the full text of the underlying article in its original format (subject to your obligation under 5).


So basically, as long as the guardian content is obviously guardian content, and your content is obviously not guardian content, then yes you can use the articles to bolster your blog, following the rules above, most especially, the retain byline and copyright, and include a link to original content.

You can find some guardian logos at www.guardian.co.uk/open-platform/logos that might help you idnetify which content is the guardians.

Michael Brunton-Spall
guardian.co.uk


Matt Biddulph

unread,
Mar 10, 2009, 12:58:40 PM3/10/09
to Guardian API Talk
That's my project -- I've been lucky enough to have an early-access
API key for a few days. I've been working on the app for fun but
there's every chance I won't have enough time by myself to finish it.
I'd love to work collaboratively on a full app, so feel free to get
into it and make contributions.

Cheers,
Matt.

Christian Heilmann

unread,
Mar 10, 2009, 1:08:12 PM3/10/09
to Michael Brunton-Spall, james...@googlemail.com, Guardian API Talk
Michael Brunton-Spall wrote:
> T's and C's say:
> you are hereby granted a non-transferable limited licence to:
> • Access, copy, publish, distribute and display the OPG Content in
> electronic form on Your Website(s).
> • Make OPG Content available to Your Website's end users for their
> personal use only.
> • Reproduce our trade marks, logos and branding solely in the form and
> position provided in the OPG Content.
>
> (b)You will:
> • Retain the full headline, byline and copyright notice from the
> original OPG Content supplied.
> • Retain the original watermark embedded in the OPG Content.
> • Retain any correction or other notice that is linked to the OPG Content.
> • Include a link to the original article published on guardian.co.uk
> <http://guardian.co.uk> in all OPG Content published on Your Website.

> • Retain all links to external websites contained within the OPG Content.
>
> (c)You will not:
> • Edit, adapt, translate or otherwise alter the OPG Content.
> • Distort the meaning or message of the OPG Content by association,
> implication or juxtaposition.
> • Use OPG Content in a manner that could amount to derogatory
> treatment of its author.
> • Present OPG Content in a way that seeks to replicate, or pass off
> Your Website as a resource belonging to or endorsed by us.
> • Use OPG Content in any printed format.
> • Use headlines from the OPG Content to create links to any content
> other than the full text of the underlying article in its original
> format (subject to your obligation under 5).
>
Hmm this means my hack violates these terms as I am not displaying the
copyright for each and everyone of the original results.

I also split the content at the first full-stop to provide a preview of
the content and split it at every third full-stop and add a new
paragraph to make it more readable.

The link in the text clause is pretty tricky, too as the content is
provided in plain text.

To make this really useful it would be good to be able to get the
content in HTML so we have the real paragraphs and working links.

James Higgs

unread,
Mar 10, 2009, 1:10:45 PM3/10/09
to Guardian API Talk
Great, thanks Matt. I'll try to make a start on that this evening.

Cheers,
James

Michael Brunton-Spall

unread,
Mar 10, 2009, 1:30:10 PM3/10/09
to Christian Heilmann, james...@googlemail.com, Guardian API Talk
Christian,

Right as of this moment, we are excited to see what people are producing.  I'm sure we will see apps go live over the enxt few weeks that contravene the Ts & Cs, mostly because most developers wont have read them.
You can find them at http://www.guardian.co.uk/open-platform/terms-and-conditions

Obviously, we want to encourage people to experiment, but breaches of the T's and C's will result in somebody contacting you to let you know I would imagine.  I'm not the legal department, or even the OPG department, so I can't give any official word on it.

I'll see if I can raise soemthing with the developers about returning content that is better formatted.  I believe that the T's and C's in this case will be interpreted as not changing the semantic content.  Inserting paragraph breaks or reformating into HTML is unlikely to be a major issue, but I'll try to confirm.

Michael Brunton-Spall
guardian.co.uk


2009/3/10 Christian Heilmann <chris.h...@gmail.com>

Michael Brunton-Spall

unread,
Mar 10, 2009, 1:33:57 PM3/10/09
to Guardian API Talk
Just to clarify,

The original poster did not indicate that they were pulling the data in via the Guardian Open Platform API.  These Terms and Conditions are an agreement for use of the API only.  Pulling content into your blog by copying and pasting the articles in HTML from the website is not allowed or covered by the Terms and Conditions outlined below.
You can only extract the content on the basis that you are extracting it via the API, as that allows us to track via mashable, who is pulling what, where they are putting it, and whether they are using the content in accordance with the T's and C's

Michael Brunton-Spall
guardian.co.uk


2009/3/10 Michael Brunton-Spall <mic...@brunton-spall.co.uk>

Christian Heilmann

unread,
Mar 10, 2009, 1:46:40 PM3/10/09
to Michael Brunton-Spall, james...@googlemail.com, Guardian API Talk
Michael Brunton-Spall wrote:
> Christian,
>
> Right as of this moment, we are excited to see what people are
> producing. I'm sure we will see apps go live over the enxt few weeks
> that contravene the Ts & Cs, mostly because most developers wont have
> read them.
> You can find them at
> http://www.guardian.co.uk/open-platform/terms-and-conditions
>
> Obviously, we want to encourage people to experiment, but breaches of
> the T's and C's will result in somebody contacting you to let you know
> I would imagine. I'm not the legal department, or even the OPG
> department, so I can't give any official word on it.
>
> I'll see if I can raise soemthing with the developers about returning
> content that is better formatted. I believe that the T's and C's in
> this case will be interpreted as not changing the semantic content.
> Inserting paragraph breaks or reformating into HTML is unlikely to be
> a major issue, but I'll try to confirm.
>
> Michael Brunton-Spall
> guardian.co.uk <http://guardian.co.uk>
>
Cheers. I know your position, I can read and write 3 languages, know
about 8 programming languages but legalese is still beyond me :)

The T&C as it stands would also make any clever data mining hack on your
data illegal, and this includes Simon's timeline data app.

I'd say the workaround is what Flickr or BOSS does: you need to provide
a link back to the original article and that is that.


Dave

unread,
Mar 10, 2009, 8:45:31 PM3/10/09
to Guardian API Talk
That does sound like a good use case, but you will have to make your
app is hard-coded to delete after 24 hours, and that should be checked
whenever an item is brought up on screen. A task on start-up is no
good because the device may not be rebooted for weeks.

I'm not from GN&M by the way (though they did pay me to build the PHP
client library for the Content API), but just feel it's important to
make known the limitations of the T&Cs.


Dave

James Higgs

unread,
Mar 11, 2009, 6:43:55 AM3/11/09
to Guardian API Talk
I see your point, but an iPhone app is *never* going to run for 24
hours. It doesn't have the battery life for a start, and no one is
going to run one application for an entire day. There are no
background processes allowed, so when you return to the homescreen,
the app quits there and then. App startup time seems like a reasonable
place to expire content to me - there's no way to run a custom process
when the *phone* starts up anyway.

Still, all theoretical until they start dishing out API keys!

Dave

unread,
Mar 11, 2009, 9:33:29 AM3/11/09
to Guardian API Talk
Hmm, I don't have an iPhone (don't want one, for a very long list of
reasons, including as you point out the inability to multitask!), but
surely you can charge the battery without having to shut down the app/
phone?

And as for running an app for an entire day, sure, it's very unlikely,
but it's possible, so any app should not allow that at all, just in
case. As I say, the only way to do it within the T&Cs it to allow the
content to be expired while it is being displayed. The Guardian have
to have control (i.e. cover their backs) for when they have to update
and/or delete content.


Dave

vruz

unread,
Mar 11, 2009, 10:18:23 AM3/11/09
to Dave, Guardian API Talk
Hello all,

And by way of an introduction to this list, Dave.. no, you can't
change the battery in an iPhone at all :-)
I guess that can be added to the long list of iPhone imperfections.

cheers,

vruz

2009/3/11 Dave <da...@natts.com>:

--
---- vruz

David Nattriss

unread,
Mar 11, 2009, 10:52:15 AM3/11/09
to vruz, Guardian API Talk
My question wasn't about changing the battery (which yes, you can't). I was saying surely you don't have to shut down an app or the iPhone itself in order to CHARGE the battery (daily).

Even if you do, that's not the point. To comply with the Guardian Open Platform Content API T&Cs, the application *must* not display content that is over 24 hours old. So when the user chooses to view some content, that is when the age check must be done.


Dave

2009/3/11 vruz <horaci...@gmail.com>

James Higgs

unread,
Mar 11, 2009, 10:59:19 AM3/11/09
to Guardian API Talk
Yeah, it's a fair point, but I think we're talking about a vanishingly
small number of people who will ever use such an app in the way you
describe. I *very* rarely run an app for 24 minutes, never mind 24
hours. Theoretically it's possible, it's just not something that is
ever going to realistically happen.

In any case, adding some kind of "Have I been running for 24 hours?"
thing would be easy enough, should such an unlikely scenario arise. It
could just do the same thing as the startup code to purge any content
older than the maximum cache time.

On Mar 11, 2:52 pm, David Nattriss <d...@natts.com> wrote:
> My question wasn't about changing the battery (which yes, you can't). I was
> saying surely you don't have to shut down an app or the iPhone itself in
> order to CHARGE the battery (daily).
>
> Even if you do, that's not the point. To comply with the Guardian Open
> Platform Content API T&Cs, the application *must* not display content that
> is over 24 hours old. So when the user chooses to view some content, that is
> when the age check must be done.
>
> Dave
>
> 2009/3/11 vruz <horacio.lo...@gmail.com>
>
>
>
> > Hello all,
>
> > And by way of an introduction to this list, Dave..   no, you can't
> > change the battery in an iPhone at all   :-)
> > I guess that can be added to the long list of iPhone imperfections.
>
> > cheers,
>
> > vruz
>
> > 2009/3/11 Dave <d...@natts.com>:

Grant Klopper

unread,
Mar 11, 2009, 3:27:23 PM3/11/09
to James Higgs, Guardian API Talk
Hi

When considering an iPhone app then take the following into account as well 'You may not syndicate or otherwise charge a fee for access to OPG Content.' (assuming a paid for app that is)

Also note that the T&Cs talk exclusively about using the key on 'Your Website', clarify the position on including it in an iPhone (or desktop) app. Especially ensure that you do not unintentionally share your key with others by including it in an iPhone app.

Grant






2009/3/11 James Higgs <james...@gmail.com>

Peter Clark

unread,
Mar 12, 2009, 6:26:03 AM3/12/09
to Guardian API Talk
I'm the founder of a news startup - what is the best way to collaborate with The Guardian? We're working on some really cool news delivery algorithms, and would love to use the guardian news platform.

Keen to see some examples to see what we can, and can't, do with your API - kudos for taking a brave step (the right step) in news publishing.


Peter
Reply all
Reply to author
Forward
0 new messages