Docs / Get Related Items
Get Related Items
Related coverage with a reason for each suggestion.
GET/v1/items/{item_id}/related
- Auth
- client bearer + quota
- Cache-Control
public, max-age=300, stale-while-revalidate=300, stale-if-error=3000- Validators
ETag, Last-Modified- Source of truth
clients/openapi.jsonanddocs/API.md§12
Related coverage for one published story: "what led to this" and what else runs with it.
| Parameter | Default | Bounds |
|---|---|---|
limit | 10 | Values above 50 are clamped to 50; < 1 or non-integer is 400 limit must be between 1 and 50 |
locale | the source item's locale | Well-formed locale tag; a different locale returns coverage in that language |
itemsare the same item objects as/v1/items(plusassets.title_image_url), and they carryauthor,ai_generated,ai_labelandtranslationsexactly as every other read route does, so a related card renders the byline and its language switch works from the card. Every stored field keeps its stored value: the disclosure and the twin link are added on read, never rewritten. The per-item explanation lives on the envelope underreasonsso the item schema cannot drift. (The example shows one of the three items;countis the full number.)- A candidate qualifies only when it shares a named entity (an instrument or an organisation) or clears a BM25 more-like-this floor. A shared country, recency or the same category can order candidates but never qualify one on its own — that is why an unrelated story that merely mentions "US" does not appear.
- Deliberately excluded: the item itself, withheld items, another language (unless you ask for one), and near-duplicates of the item (the same story re-syndicated, or a rewrite when the dedupe index is present).
window_daysis the candidate window, default 30 (NEWS_RELATED_WINDOW_DAYS).404 item not foundfor an unknown or withheld id (withheld items are invisible to every read route);400for a malformed locale tag.ETag(namespace includes the item id) andLast-Modifiedfrom the newest servedupdated_at;304supported.Cache-Control: public, max-age=300. Metered per delivered item.
An empty items array is a normal answer, not an error: it means nothing cleared the evidence floor.
Description: docs/API.md §12
Parameters
| Name | In | Required | Type | Example | Notes |
|---|---|---|---|---|---|
item_id | path | yes | string | a41f7c02-8d3e-5b16-9a77-2c0e4b91d5aa | Item id (or a twin id from the item's translations map). |
locale | query | no | string | en | Defaults to the item's own locale |
limit | query | no | string | 2 | Defaults to 10, capped at 50 |
include | query | no | string | provenance to carry each item's figures |
Example request
curl -sS \
'https://vg.tempproject.online/v1/items/a41f7c02-8d3e-5b16-9a77-2c0e4b91d5aa/related?limit=2' \
-H "Authorization: Bearer $NEWS_KEY"import json
import os
import urllib.request
URL = "https://vg.tempproject.online/v1/items/a41f7c02-8d3e-5b16-9a77-2c0e4b91d5aa/related?limit=2"
KEY = os.environ["NEWS_KEY"]
def call() -> dict:
req = urllib.request.Request(URL, headers={
"Authorization": f"Bearer {KEY}",
})
with urllib.request.urlopen(req, timeout=15) as res:
print(res.status, res.headers.get("ETag"))
return json.loads(res.read().decode("utf-8"))
if __name__ == "__main__":
body = call()
print(json.dumps(body, indent=2, ensure_ascii=False)[:2000])const res = await fetch(
"https://vg.tempproject.online/v1/items/a41f7c02-8d3e-5b16-9a77-2c0e4b91d5aa/related?limit=2",
{
method: "GET",
headers: {
authorization: `Bearer ${process.env.NEWS_KEY}`,
},
},
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(res.headers.get("etag"), await res.json());The requests are generated from the path template and the parameters in clients/openapi.json, so a new parameter appears here without an edit to this site.
Example response
{
"item_id": "11111111-1111-5111-9111-111111111111",
"locale": "en",
"window_days": 30,
"items": [
{
"id": "66666666-6666-5666-9666-666666666666",
"schema_version": 1,
"locale": "en",
"title": "Fed officials signal patience on further rate cuts",
"summary": "Policymakers said the committee wants more evidence that inflation is returning to target ...",
"category": "central_banks",
"importance": 0.8,
"published_at": "2026-11-02T21:00:00Z",
"updated_at": "2026-11-02T21:00:00Z",
"source": {"name": "Federal Reserve — Monetary Policy", "url": "https://...", "canonical_url": "https://...", "retrieved_at": "..."},
"entities": {"instruments": ["USD"], "countries": ["US"], "organizations": ["Federal Reserve"]},
"compliance": {"status": "clean", "risk_score": 0.0, "reason_codes": ["CLEAN"], "policy_version": "2026-11-12.1"},
"assets": {"title_image_prompt": "...", "title_image_aspect": "16:9"}
}
],
"reasons": {
"66666666-6666-5666-9666-666666666666": ["shared: USD", "shared: Federal Reserve", "shared: US", "same category: central_banks"]
},
"count": 3,
"disclaimer": "This content is provided for information purposes only. ..."
}Response example in docs/API.md §12 (GET /v1/items/{item_id}/related)
Failures
This operation can answer 200, 304, 400, 401, 404, 422, 429. The full envelope for each status, with its body, is on Errors.