[GET] Get news

Modified on Tue, 11 Feb at 3:42 AM

https://news.s7risk.com

The News API provides real-time and historical access to global news content at scale.

GET /newsGet news

This endpoint gets all available news items. The news items returned can be filtered in scope by adding query parameters to your request.

HTTP Request

curl -X GET 'https://news.s7risk.com/news' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{YOUR_AUTHENTICATION_TOKEN}}' \
  -d 'search=eq:rockets' \
  -d 'countryCode=in:AFG,IND,KOR' \
  -d 'taxonomyId=in:8cfb8d8a-cd8c-41d8-8a58-da149c874e9b' \
  -d 'publishedAt=lte:162515530' \
  -d 'sort=publishedAt_desc' \
  -d 'limit=200' \
  -d 'page=30' \
  --compressed

Headers

NameTypeRequiredDescription
Authorizationstring✔️Your authentication token (see the Auth API section for more information)

Query Parameters

NameTypeFilterDescription
searchstringeq/neqA search term against the title and summary of news items
countryCodestringin/ninA comma separated list of 3 Alpha-3 country codes
taxonomyIdstringin/ninA comma separated list of Taxonomy UUIDs
publishedAtstringbt / gte / lteEither a single timestamp to filter before or after, or two comma separated timestamps to filter between. Defaults to 24 hours before the request is sent. Queries are limited to a maximum of 3 months.
sortstring~What order to display the items in. Available options publishedAt_asc or publishedAt_desc. If no sort order is specified then results are sorted in chronological order
limitint~A limited result set between 1 and 5000. Defaults to 1000
pageint~A paginated result set between 1 and 10000. Defaults to 1

HTTP Response

{
    "status": "success",
    "data": {
        "news": [
            {
                "id": "c1b8f161-e978-423b-981c-76301b6025cb",
                "title": "Eid al-Adha prayers continue as rockets fired in Afghanistan",
                "summary": "Rockets could be heard exploding nearby during prayers in Afghanistan to mark the start of the Muslim festival Eid al-Adha.",
                "permalink": "https://www.bbc.co.uk/news/av/world-asia-57900618",
                "taxonomy": {
                    "id": "8cfb8d8a-cd8c-41d8-8a58-da149c874e9b",
                    "score": 0.80
                },
                "subTaxonomies": [
                    {
                        "id": "a0841b07-e0d6-45b9-870c-1dd0a20b1845",
                        "score": 0.70
                    }
                ],
                "industries": [
                    {
                        "reference": "in.pol",
                        "name": "Politics"
                    }
                ],
                "countries": [
                    {
                        "code": "USA",
                        "name": "United States of America"
                    }
                ],
                "keywords": [
                    "man",
                    "prayers"
                ],
                "incidentId": null,
                "publishedAt": 1625155307,
                "createdAt": 1625155307,
                "updatedAt": 1625155307
            }
        ],
        "meta": {
            "total": 1,
            "page": 1,
            "pages": 1,
            "pageSize": 100
        }
    }
}

Success

CodeStatusDescription
200SuccessReturns a body containing all valid News items

Errors

CodeStatusDescription
401UnauthorizedExpired or Invalid Authentication token
422Unprocessable EntityIncorrect or invalid parameter

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article