Context.dev / Search news about a company
Context.dev tool context-dev-news-search on looot: input fields, $0.00025 per result, output shape, and code to run it with curl, JavaScript or Python.
Searches live and historical news for one company, identified by name, domain, ticker or ISIN in searchBy. filterBy narrows by publisher and date, sortBy orders, limit and cursor page. Returns data with title, description, source, published_at and how well each article matches the company. Priced per article returned.
- Tool id:
context-dev-news-search - Provider: Context.dev
- Job: Get recent news mentioning a company (
company.news) - Price: $0.00025 per result. A call that fails at the provider costs $0.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
cursor |
string | no | Opaque next_cursor from the previous response, or omit for the first page. |
filterBy |
object | no | Optional filters, e.g. {“sourceDomain”:[“reuters.com”],“sourceCountry”:[“us”],“articleLanguage”:[“en”],“articleType”:[“editorial”,“press_release”],“date”:{“from”,“to”}} (all keys optional). |
limit |
integer | no | Max results, 1-100, default 10. Example: 10 |
searchBy |
object | yes | Identifies the company to search news for. Shape: {“type”:“entity”,“entity”:{…}} where entity is ONE of: {“type”:“name”,“name”:“Apple Inc.”}, {“type”:“domain”,“domain”:“apple.com”}, {“type”:“ticker”,“ticker”:“AAPL”,“exchange”:“NASDAQ”} (exchange optional), or {“type”:“isin”,“isin”:“US0378331005”}. |
sortBy |
object | no | Result ordering, e.g. {“type”:“newest”} (default) or {“type”:“relevance”}. |
tags |
array | no | Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. |
Output
Shape of the run’s result, checked against 1 real answer:
{ data: { id, url, type, match: { level, confidence }, title, source: { name, direct, domain }, authors: string[], language, story_id, image_url, description, published_at }[], meta: { count }, has_more, request_id, next_cursor, key_metadata: { credits_consumed, credits_remaining } }
Run it
Every call needs your API token in LOOOT_TOKEN; Sign in shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With wait: 30 the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll GET /v1/runs/<runId>.
Example input with placeholder values:
curl -X POST "https://api.looot.ai/v1/runs" \
-H "Authorization: Bearer $LOOOT_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"endpointId":"context-dev-news-search","input":{"searchBy":{"type":"entity","entity":{"type":"domain","domain":"example.com"}},"tags":["production","team-alpha"],"limit":10},"wait":30}'const response = await fetch("https://api.looot.ai/v1/runs", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
endpointId: "context-dev-news-search",
input: {
searchBy: {
type: "entity",
entity: {
type: "domain",
domain: "example.com",
},
},
tags: ["production", "team-alpha"],
limit: 10,
},
wait: 30,
}),
});
const run = await response.json();
console.log(run.status, run.result);import os
import uuid
import requests
response = requests.post(
"https://api.looot.ai/v1/runs",
headers={
"Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"endpointId": "context-dev-news-search",
"input": {
"searchBy": {
"type": "entity",
"entity": {
"type": "domain",
"domain": "example.com",
},
},
"tags": ["production", "team-alpha"],
"limit": 10,
},
"wait": 30,
},
timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))To let looot pick among every provider of this job instead, send job:company.news as endpointId; see the job page.