News API v1 - API Notes

Interactive Documentation

To try our API please ensure you're logged in and click on the IO Docs link.

API Base URL

The base URL for News API v1 is as follows:

http://news.api.press.net/v1

All endpoints discussed are assumed to have this prefix.

 

Authentication

The API requires an API key to access. The API will be provided at the time of registration and can be passed as either an header or query parameter with the key "apikey".

The following examples demonstrate both options for authentication using CURL.

Header Value

curl -v --header "apikey: <API_KEY>" http://news.api.press.net/v1/feeds

Query Parameter

curl -v http://news.api.press.net/v1/feeds\?apikey\=<API_KEY>

 

Content Types

All endpoints are capable of returning JSON, ATOM and RSS response types via content negotiation. By default JSON responses will be returned.

The content type can be negotiated in two ways;

Accept Header

 

Header Value
Content-Type
Description
application/rss+xml
RSS
The response will be in RSS format.
application/json
JSON
The response will be in JSON format (default format). JSONP is also available by passing the "callback" query parameter.
application/atom+xml
ATOM
The response will be in ATOM format.

For example;

curl -v --header "apikey: <API_KEY>" --header "Accept: application/atom+xml" http://news.api.press.net/v1/feeds

curl -v --header "apikey: <API_KEY>" --header "Accept: application/rss+xml" http://news.api.press.net/v1/feeds

 

Accept Query Parameter

 

Parameter Value (accept)
Content-Type
Description
rss
RSS
The response will be in RSS format.
json
JSON
The response will be in JSON format (default format). JSONP is also available by passing the "callback" query parameter.
atom
ATOM
The response will be in ATOM format.

For example;

curl -v --header "apikey: <API_KEY>" http://news.api.press.net/v1/feeds?accept=rss

curl -v --header "apikey: <API_KEY>" http://news.api.press.net/v1/feeds?accept=atom

 

Response Codes

Endpoints also return different HTTP response codes depending on the status of the request The API currently returns the following response HTTP response codes:

Response Code
Type
Description
200
Success
The request was successful.
204
Success
The request was made against a valid resource but there is current no content available to return.
404
Warning
The resource does not exist.
405
Warning
The operation requested is not available on that endpoint (e.g. DELETE on a GET only endpoint).
403 
Warning
The service or key is currently over allowed Queries per Second. Please retry again in 1 second.
500
Error
An internal server error occurred please report this issue to your key provider.
593
Error
The endpoint you are trying to access does not exist. Please refer to the documentation.

Docs Navigation