RapidAPI logo

Sign Up

Log In

Guardian

FREE
By mikilior1
Updated 3 months ago
News, Media
5.3/10
Popularity Score
198ms
Latency
100%
Success Rate

Guardian API Documentation

Query and download data from this publication's database.

View API Details
POSTgetEditions
POSTgetSections
POSTgetSingleItem
POSTgetTags
POSTsearchContent
POSTgetEditions

Returns all returns all editions in the Guardian API. Editions are the different front main pages of the Guardian site we have. At current we have editions for the United Kingdom, the United States and Australia.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
apiKeyCREDENTIALS
REQUIREDThe api key obtained from Guardian
Optional Parameters
querySTRING
OPTIONALReturn section based on the query term specified. Example: business
Request Snippet
unirest.post("https://Guardianmikilior1V1.p.rapidapi.com/getEditions")
.header("X-RapidAPI-Host", "Guardianmikilior1V1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://Guardianmikilior1V1.p.rapidapi.com/getEditions")
.header("X-RapidAPI-Host", "Guardianmikilior1V1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication