{"openapi":"3.1.0","info":{"title":"The News API (BYOK) API","version":"0.1.0","description":"The News API (BYOK) lets an AI assistant read your own The News API data through the The News API API with a key you supply (API token). Read-only: 6 tools (get_top_stories, search_all_news, get_headlines, find_similar_news, get_article, list_sources). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-thenewsapi.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-thenewsapi/docs"},"termsOfService":"https://connectorbay.com/byok-thenewsapi/terms"},"servers":[{"url":"https://byok-thenewsapi.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-thenewsapi/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_top_stories":{"post":{"operationId":"get_top_stories","summary":"Get top stories, live or historical, optionally for given countries, languages or categories. Paged; free plans return 3","description":"Get top stories, live or historical, optionally for given countries, languages or categories. Paged; free plans return 3 articles per call. Use for \"What are the top business stories in the US today\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search text. Operators: + for AND, | for OR, - to exclude, double quotes for a phrase, * for a prefix, parentheses to group.","title":"Search"},"search_fields":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated fields to search: title, description, keywords, main_text (default title,main_text).","title":"Search Fields"},"locale":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated country codes to include, for example 'us,ca'.","title":"Locale"},"categories":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated categories to include: general, science, sports, business, health, entertainment, tech, politics, food, travel.","title":"Categories"},"exclude_categories":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated categories to leave out.","title":"Exclude Categories"},"domains":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated source domains to include, for example 'bbc.co.uk'.","title":"Domains"},"exclude_domains":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated source domains to leave out.","title":"Exclude Domains"},"language":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated language codes to include, for example 'en,es'.","title":"Language"},"published_after":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles published after this time. Formats: yyyy-mm-dd, yyyy-mm-ddThh:mm or yyyy-mm-ddThh:mm:ss, in UTC.","title":"Published After"},"published_before":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles published before this time. Formats: yyyy-mm-dd, yyyy-mm-ddThh:mm or yyyy-mm-ddThh:mm:ss, in UTC.","title":"Published Before"},"published_on":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles published on this date, format yyyy-mm-dd.","title":"Published On"},"sort":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Order by published_at or relevance_score (relevance only with search).","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"Articles per page; the maximum depends on the plan (free 3, higher plans 25 to 100).","title":"Limit"},"page":{"anyOf":[{"maximum":20000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; at most 20,000 results can be paged through.","title":"Page"}},"title":"get_top_storiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_all_news":{"post":{"operationId":"search_all_news","summary":"Search all collected articles with boolean operators and filters for category, source, language and publish date. Paged.","description":"Search all collected articles with boolean operators and filters for category, source, language and publish date. Paged. Use for \"Find articles about Apple Inc published this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search text. Operators: + for AND, | for OR, - to exclude, double quotes for a phrase, * for a prefix, parentheses to group.","title":"Search"},"search_fields":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated fields to search: title, description, keywords, main_text (default title,main_text).","title":"Search Fields"},"categories":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated categories to include: general, science, sports, business, health, entertainment, tech, politics, food, travel.","title":"Categories"},"exclude_categories":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated categories to leave out.","title":"Exclude Categories"},"domains":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated source domains to include, for example 'bbc.co.uk'.","title":"Domains"},"exclude_domains":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated source domains to leave out.","title":"Exclude Domains"},"language":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated language codes to include, for example 'en,es'.","title":"Language"},"published_after":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles published after this time. Formats: yyyy-mm-dd, yyyy-mm-ddThh:mm or yyyy-mm-ddThh:mm:ss, in UTC.","title":"Published After"},"published_before":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles published before this time. Formats: yyyy-mm-dd, yyyy-mm-ddThh:mm or yyyy-mm-ddThh:mm:ss, in UTC.","title":"Published Before"},"published_on":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles published on this date, format yyyy-mm-dd.","title":"Published On"},"sort":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Order by published_at or relevance_score (relevance only with search).","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"Articles per page; the maximum depends on the plan (free 3, higher plans 25 to 100).","title":"Limit"},"page":{"anyOf":[{"maximum":20000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; at most 20,000 results can be paged through.","title":"Page"}},"title":"search_all_newsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_headlines":{"post":{"operationId":"get_headlines","summary":"Get the latest headlines grouped by category, each with similar articles when requested. Needs a Standard plan or above.","description":"Get the latest headlines grouped by category, each with similar articles when requested. Needs a Standard plan or above. Use for \"Give me today's headlines by category for the UK\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"locale":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated country codes to include, for example 'us,ca'.","title":"Locale"},"language":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated language codes to include, for example 'en'.","title":"Language"},"domains":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated source domains to include.","title":"Domains"},"exclude_domains":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated source domains to leave out.","title":"Exclude Domains"},"published_on":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only headlines published on this date, format yyyy-mm-dd.","title":"Published On"},"headlines_per_category":{"anyOf":[{"maximum":10,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"Articles per category (1 to 10, default 6).","title":"Headlines Per Category"},"include_similar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to attach similar articles to each headline (makes answers much longer).","title":"Include Similar"}},"title":"get_headlinesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/find_similar_news":{"post":{"operationId":"find_similar_news","summary":"Find articles similar to one article, identified by its uuid, with optional category, source, language and date filters.","description":"Find articles similar to one article, identified by its uuid, with optional category, source, language and date filters. Use for \"Which other outlets covered this same story\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"uuid":{"description":"Article uuid taken from the results of another tool, for example '147013d8-6c2c-4d50-8bad-eb3c8b7f5740'.","maxLength":200,"title":"Uuid","type":"string"},"categories":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated categories to include: general, science, sports, business, health, entertainment, tech, politics, food, travel.","title":"Categories"},"exclude_categories":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated categories to leave out.","title":"Exclude Categories"},"domains":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated source domains to include, for example 'bbc.co.uk'.","title":"Domains"},"exclude_domains":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated source domains to leave out.","title":"Exclude Domains"},"language":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated language codes to include, for example 'en,es'.","title":"Language"},"published_after":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles published after this time. Formats: yyyy-mm-dd, yyyy-mm-ddThh:mm or yyyy-mm-ddThh:mm:ss, in UTC.","title":"Published After"},"published_before":{"anyOf":[{"maxLength":25,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles published before this time. Formats: yyyy-mm-dd, yyyy-mm-ddThh:mm or yyyy-mm-ddThh:mm:ss, in UTC.","title":"Published Before"},"published_on":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles published on this date, format yyyy-mm-dd.","title":"Published On"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"Articles to return; the maximum depends on the plan.","title":"Limit"}},"required":["uuid"],"title":"find_similar_newsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_article":{"post":{"operationId":"get_article","summary":"Get one article's title, description, snippet, source, language, publish time and categories by its uuid. Use for \"Show ","description":"Get one article's title, description, snippet, source, language, publish time and categories by its uuid. Use for \"Show me the article with uuid 147013d8-6c2c-4d50-8bad-eb3c8b7f5740\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"uuid":{"description":"Article uuid taken from the results of another tool, for example '147013d8-6c2c-4d50-8bad-eb3c8b7f5740'.","maxLength":200,"title":"Uuid","type":"string"}},"required":["uuid"],"title":"get_articleArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_sources":{"post":{"operationId":"list_sources","summary":"List the news sources the service indexes with domain, language, locale and categories, 50 per page. Use for \"Which tech","description":"List the news sources the service indexes with domain, language, locale and categories, 50 per page. Use for \"Which tech news sources in English can I filter by\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"categories":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated categories to include: general, science, sports, business, health, entertainment, tech, politics, food, travel.","title":"Categories"},"exclude_categories":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated categories to leave out.","title":"Exclude Categories"},"language":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated language codes to include.","title":"Language"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_sourcesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}