Skip to main content
POST
/
api
/
news
/
fetch
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "your token");

const raw = JSON.stringify({
  "report_id": 72053
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("{{path}}/api/news/fetch/", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
{
    "report_id": 72053,
    "data": [
        {
            "ai_summary": "Wokelo has announced a minority equity investment from KPMG LLP, marking a significant step in their growth strategy.",
            "type": "Investments",
            "url": "https://kpmg.com/us/en/media/news/kpmg-wokelo-investment-2024.html",
            "title": "Wokelo Announces Minority Equity Investment from KPMG LLP"
        }
    ]
}

Overview

This endpoint retrieves the news items from an existing news report run via the Get News Report endpoint /api/news/start/ news. It returns the news items as a JSON

Endpoint Details

  • Method: POST
  • Endpoint: /api/news/fetch/

Authentication requirements

  • Include a valid JWT token in your request header
  • If you don’t have a token yet, you can get one from the /auth/token/ endpoint first.

Request

Request Parameter

Header Parameters

token
string
required
JWT token obtained from the Authentication request

Body Parameters

report_id
integer
required
Report ID of the news report from which the news is to be retrieved
page
integer
Page number from which the news is to be returned in the response. Default: 1
page_size
integer
Number of news items per page. Default: 500

Response

Successful response will include the news items as a JSON
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "your token");

const raw = JSON.stringify({
  "report_id": 72053
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("{{path}}/api/news/fetch/", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
{
    "report_id": 72053,
    "data": [
        {
            "ai_summary": "Wokelo has announced a minority equity investment from KPMG LLP, marking a significant step in their growth strategy.",
            "type": "Investments",
            "url": "https://kpmg.com/us/en/media/news/kpmg-wokelo-investment-2024.html",
            "title": "Wokelo Announces Minority Equity Investment from KPMG LLP"
        }
    ]
}