API description
Authorization - how to get & use API Keys Learn how to authorize your requests by using API Keys
Parameters
Additional parameters to send (beyond Authorization):
Parameter | Description | Required |
---|---|---|
languageCode | The preferred language of the news (2-letter ISO). | Yes |
fullHtmlContent | If sent with the value true, sends all text of a news in its HTML-format | No, default is false |
size | The number of news to retrieve. The maximum is 12. | No, default is 1 |
maxLeadText | How many characters the lead text of each news should have. Choose a number from 300 - 800 | No, default is 300 |
For general use how to use the API from an editor’s perspective, please visit the relevant article on ahead’s help site.
Response
A typical response looks as follows:
Property | Description | Can be null |
---|---|---|
title | The title of the news. Max 100 characters. | No |
leadText | The first n characters of the content of the news, depending on the provided maxLeadText. This is provided in plain text. | Yes |
htmlContent | If fullHtmlContent query value was provided, it contains all text of a news in its HTML-format. | Yes |
leadImageUrl | The URL of the first image of the news. This is either an external URL or a URL to an image stored in ahead storage. In the latter case, the URL is valid for only 30 minutes. | Yes |
published | The date of when the news was published for the first time. | No |
channels | The name of the channels the news is published in. | No, but can be empty |
url | The URL of the news. | No |
authorDetails | ||
.name | The name of the author of the news, as shown in ahead. | No |
.jobTitle | The author’s value of the Entra ID property ‘jobTitle’. | Yes |
.department | The author’s value of the Entra ID property ‘department’. | Yes |
.officeLocation | The author’s value of the Entra ID property ‘officeLocation’. | Yes |
.city | The author’s value of the Entra ID property ‘city’. | Yes |
.companyName | The author’s value of the Entra ID property ‘companyName’. | Yes |