curl --request POST \
--url https://api.context.dev/v1/news/search \
--header 'Content-Type: application/json' \
--data '
{
"searchBy": {
"type": "entity",
"entity": {
"type": "name",
"name": "<string>"
}
},
"filterBy": {
"sourceDomain": [
"<string>"
],
"sourceCountry": [],
"articleLanguage": [],
"articleType": [],
"date": {
"from": 123,
"to": 123
}
},
"sortBy": {
"type": "newest"
},
"limit": 10,
"cursor": "<string>",
"tags": [
"production",
"team-alpha"
]
}
'import requests
url = "https://api.context.dev/v1/news/search"
payload = {
"searchBy": {
"type": "entity",
"entity": {
"type": "name",
"name": "<string>"
}
},
"filterBy": {
"sourceDomain": ["<string>"],
"sourceCountry": [],
"articleLanguage": [],
"articleType": [],
"date": {
"from": 123,
"to": 123
}
},
"sortBy": { "type": "newest" },
"limit": 10,
"cursor": "<string>",
"tags": ["production", "team-alpha"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
searchBy: {type: 'entity', entity: {type: 'name', name: '<string>'}},
filterBy: {
sourceDomain: ['<string>'],
sourceCountry: [],
articleLanguage: [],
articleType: [],
date: {from: 123, to: 123}
},
sortBy: {type: 'newest'},
limit: 10,
cursor: '<string>',
tags: ['production', 'team-alpha']
})
};
fetch('https://api.context.dev/v1/news/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.context.dev/v1/news/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'searchBy' => [
'type' => 'entity',
'entity' => [
'type' => 'name',
'name' => '<string>'
]
],
'filterBy' => [
'sourceDomain' => [
'<string>'
],
'sourceCountry' => [
],
'articleLanguage' => [
],
'articleType' => [
],
'date' => [
'from' => 123,
'to' => 123
]
],
'sortBy' => [
'type' => 'newest'
],
'limit' => 10,
'cursor' => '<string>',
'tags' => [
'production',
'team-alpha'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/news/search"
payload := strings.NewReader("{\n \"searchBy\": {\n \"type\": \"entity\",\n \"entity\": {\n \"type\": \"name\",\n \"name\": \"<string>\"\n }\n },\n \"filterBy\": {\n \"sourceDomain\": [\n \"<string>\"\n ],\n \"sourceCountry\": [],\n \"articleLanguage\": [],\n \"articleType\": [],\n \"date\": {\n \"from\": 123,\n \"to\": 123\n }\n },\n \"sortBy\": {\n \"type\": \"newest\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"tags\": [\n \"production\",\n \"team-alpha\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.context.dev/v1/news/search")
.header("Content-Type", "application/json")
.body("{\n \"searchBy\": {\n \"type\": \"entity\",\n \"entity\": {\n \"type\": \"name\",\n \"name\": \"<string>\"\n }\n },\n \"filterBy\": {\n \"sourceDomain\": [\n \"<string>\"\n ],\n \"sourceCountry\": [],\n \"articleLanguage\": [],\n \"articleType\": [],\n \"date\": {\n \"from\": 123,\n \"to\": 123\n }\n },\n \"sortBy\": {\n \"type\": \"newest\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"tags\": [\n \"production\",\n \"team-alpha\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/news/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"searchBy\": {\n \"type\": \"entity\",\n \"entity\": {\n \"type\": \"name\",\n \"name\": \"<string>\"\n }\n },\n \"filterBy\": {\n \"sourceDomain\": [\n \"<string>\"\n ],\n \"sourceCountry\": [],\n \"articleLanguage\": [],\n \"articleType\": [],\n \"date\": {\n \"from\": 123,\n \"to\": 123\n }\n },\n \"sortBy\": {\n \"type\": \"newest\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"tags\": [\n \"production\",\n \"team-alpha\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"story_id": "<string>",
"url": "<string>",
"title": "<string>",
"description": "<string>",
"language": "<string>",
"authors": [
"<string>"
],
"image_url": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"type": "editorial",
"source": {
"name": "<string>",
"domain": "<string>",
"direct": true
},
"match": {
"level": "primary",
"confidence": 0.5
}
}
],
"has_more": true,
"next_cursor": "<string>",
"meta": {
"count": 1
},
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}Search Company News
Search live and historical company news by name, domain, ticker, or ISIN.
curl --request POST \
--url https://api.context.dev/v1/news/search \
--header 'Content-Type: application/json' \
--data '
{
"searchBy": {
"type": "entity",
"entity": {
"type": "name",
"name": "<string>"
}
},
"filterBy": {
"sourceDomain": [
"<string>"
],
"sourceCountry": [],
"articleLanguage": [],
"articleType": [],
"date": {
"from": 123,
"to": 123
}
},
"sortBy": {
"type": "newest"
},
"limit": 10,
"cursor": "<string>",
"tags": [
"production",
"team-alpha"
]
}
'import requests
url = "https://api.context.dev/v1/news/search"
payload = {
"searchBy": {
"type": "entity",
"entity": {
"type": "name",
"name": "<string>"
}
},
"filterBy": {
"sourceDomain": ["<string>"],
"sourceCountry": [],
"articleLanguage": [],
"articleType": [],
"date": {
"from": 123,
"to": 123
}
},
"sortBy": { "type": "newest" },
"limit": 10,
"cursor": "<string>",
"tags": ["production", "team-alpha"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
searchBy: {type: 'entity', entity: {type: 'name', name: '<string>'}},
filterBy: {
sourceDomain: ['<string>'],
sourceCountry: [],
articleLanguage: [],
articleType: [],
date: {from: 123, to: 123}
},
sortBy: {type: 'newest'},
limit: 10,
cursor: '<string>',
tags: ['production', 'team-alpha']
})
};
fetch('https://api.context.dev/v1/news/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.context.dev/v1/news/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'searchBy' => [
'type' => 'entity',
'entity' => [
'type' => 'name',
'name' => '<string>'
]
],
'filterBy' => [
'sourceDomain' => [
'<string>'
],
'sourceCountry' => [
],
'articleLanguage' => [
],
'articleType' => [
],
'date' => [
'from' => 123,
'to' => 123
]
],
'sortBy' => [
'type' => 'newest'
],
'limit' => 10,
'cursor' => '<string>',
'tags' => [
'production',
'team-alpha'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.context.dev/v1/news/search"
payload := strings.NewReader("{\n \"searchBy\": {\n \"type\": \"entity\",\n \"entity\": {\n \"type\": \"name\",\n \"name\": \"<string>\"\n }\n },\n \"filterBy\": {\n \"sourceDomain\": [\n \"<string>\"\n ],\n \"sourceCountry\": [],\n \"articleLanguage\": [],\n \"articleType\": [],\n \"date\": {\n \"from\": 123,\n \"to\": 123\n }\n },\n \"sortBy\": {\n \"type\": \"newest\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"tags\": [\n \"production\",\n \"team-alpha\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.context.dev/v1/news/search")
.header("Content-Type", "application/json")
.body("{\n \"searchBy\": {\n \"type\": \"entity\",\n \"entity\": {\n \"type\": \"name\",\n \"name\": \"<string>\"\n }\n },\n \"filterBy\": {\n \"sourceDomain\": [\n \"<string>\"\n ],\n \"sourceCountry\": [],\n \"articleLanguage\": [],\n \"articleType\": [],\n \"date\": {\n \"from\": 123,\n \"to\": 123\n }\n },\n \"sortBy\": {\n \"type\": \"newest\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"tags\": [\n \"production\",\n \"team-alpha\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.context.dev/v1/news/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"searchBy\": {\n \"type\": \"entity\",\n \"entity\": {\n \"type\": \"name\",\n \"name\": \"<string>\"\n }\n },\n \"filterBy\": {\n \"sourceDomain\": [\n \"<string>\"\n ],\n \"sourceCountry\": [],\n \"articleLanguage\": [],\n \"articleType\": [],\n \"date\": {\n \"from\": 123,\n \"to\": 123\n }\n },\n \"sortBy\": {\n \"type\": \"newest\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"tags\": [\n \"production\",\n \"team-alpha\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"story_id": "<string>",
"url": "<string>",
"title": "<string>",
"description": "<string>",
"language": "<string>",
"authors": [
"<string>"
],
"image_url": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"type": "editorial",
"source": {
"name": "<string>",
"domain": "<string>",
"direct": true
},
"match": {
"level": "primary",
"confidence": 0.5
}
}
],
"has_more": true,
"next_cursor": "<string>",
"meta": {
"count": 1
},
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "INTERNAL_ERROR",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}Body
What to search for.
Show child attributes
Show child attributes
Optional result filters.
Show child attributes
Show child attributes
Result ordering. Defaults to newest.
Show child attributes
Show child attributes
Maximum results to return. Defaults to 10.
1 <= x <= 100Opaque next_cursor from the previous response, or null for the first page.
300Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
201 - 50["production", "team-alpha"]
Response
Company news results
Articles matching the search, in the requested order.
Show child attributes
Show child attributes
True when more results are available beyond this page.
Pass as cursor in the next request to fetch the following page. Null when there are no more results.
Summary information about this response.
Show child attributes
Show child attributes
Metadata about the API key used for the request. Included in every response whenever a valid API key is provided, even when the response status is not 200.
Show child attributes
Show child attributes
Was this page helpful?