- Previous: News API v1 Documentation
- Up: News API v1 Documentation
- Next: News API v1 - Developer's Guide
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
- Documentation
- API Notes
- Sport
- News API Versions
- Cricket
- API Notes
- Release Notes
- API Data Dictionary - Dismissal Types
- API Data Dictionary - Match Statuses
- API Data Dictionary - Match Types
- API Data Dictionary - Result Types
- API Data Dictionary - Result Win Types
- API Data Dictionary - Official Types
- API Data Dictionary - Toss Win Type
- API Data Dictionary - Bowling Types
- API Data Dictionary - Batting Types
- API Data Dictionary - Statistic Types
- TV API
- Football
- Olympics
- Olympics API Version 1
- Olympics API Version 2
- Release Notes
- API Notes
- API Data Dictionary - Event Units
- API Data Dictionary - Standings
- API Data Dictionary - Olympic Result Extensions
- API Data Dictionary - Olympic Result Properties
- API Data Dictionary - Paralympic Result Extensions
- API Data Dictionary - Paralympic Result Properties
- API Data Dictionary - Commonwealth Result Extensions
- API Data Dictionary - Commonwealth Result Properties
- API Data Dictionary - Brackets