News

Parameters

HTTP method

Access rights

URL

Parameters

Note

GET public_data https://api.admitad.com/news/
  • offset**
  • limit**
  • language***

Returns the list of news*.

GET public_data https://api.admitad.com/news/{id}/   Returns the news, where id is the news ID*.
  • * Returns the result in the JSON format.

  • ** Sets skipping and the number of returned records. E.g. limit=5&offset=2.

  • *** News language. The language is set by a two-character code. E.g.: language=en.

 

Example of use

Examples of a request with utility ``curl``:

url -L -H 'Authorization: Bearer access-token' -X GET
https://api.admitad.com/news/?limit=1&offset=2&language=en

curl -L -H 'Authorization: Bearer access-token' -X GET
https://api.admitad.com/news/12/

Example of the response from the API server in the JSON format:

{
"results": [
{
"language": "en",
"content": "<p>full text</p>",
"id": 12,
"url": "",
"short_content": "short text",
"advcampaign": {
"name": "dadOiglnaenw",
"id": 312
},
"datetime": "2009-12-02T23:08:45"
},
{
"language": "en",
"content": "",
"id": 1578,
"url": "http://blog.admitad.com/?p=6467",
"short_content": "affiliate program CampaignName",
"datetime": "2014-10-24T19:00:28"
}
],
"_meta": {
"count": 2,
"limit": 20,
"offset": 0
}
}

 

Description of API server response fields

Name

Description

id

News ID

datetime

Date and time of publication

content

News text

short_content

Title

advcampaign

Affiliate program (optional)

url

Link to a third-party resource

language

News language