{"openapi":"3.1.0","info":{"title":"Mediastack (BYOK) API","version":"0.1.0","description":"Mediastack (BYOK) lets an AI assistant read your own Mediastack data through the Mediastack API with a key you supply (Mediastack access key). Read-only: 5 tools (search_news, get_news_by_category, get_news_by_source, get_news_by_date, search_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-mediastack.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-mediastack/docs"},"termsOfService":"https://connectorbay.com/byok-mediastack/terms"},"servers":[{"url":"https://byok-mediastack.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-mediastack/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/search_news":{"post":{"operationId":"search_news","summary":"Search news articles by keywords, with optional language and country filters. Prefix a keyword with a minus sign to excl","description":"Search news articles by keywords, with optional language and country filters. Prefix a keyword with a minus sign to exclude it. Each call counts against the plan's monthly request quota. Use for \"What is the latest news about electric vehicles in English\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"keywords":{"description":"Keywords to match, for example 'electric vehicles'; prefix one with a minus to exclude it.","maxLength":200,"title":"Keywords","type":"string"},"languages":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated language codes to include, prefix one with a minus to exclude, for example 'en,de,-fr'.","title":"Languages"},"countries":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated ISO 3166-1 alpha-2 country codes to include, prefix one with a minus to exclude, for example 'us,gb,-de'.","title":"Countries"},"sort":{"anyOf":[{"enum":["published_desc","published_asc","popularity"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort order: published_desc (newest first, the default), published_asc or popularity.","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Results per page, 1 to 100 (default 25).","title":"Limit"},"offset":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Results to skip, 0 to 10000; offset plus limit must not exceed 10000.","title":"Offset"}},"required":["keywords"],"title":"search_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_news_by_category":{"post":{"operationId":"get_news_by_category","summary":"Get news articles in one category (general, business, entertainment, health, science, sports or technology), optionally ","description":"Get news articles in one category (general, business, entertainment, health, science, sports or technology), optionally narrowed by country and language. Use for \"Show me the latest business news from the United States\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"categories":{"description":"Category to include: general, business, entertainment, health, science, sports or technology; prefix with a minus to exclude.","maxLength":100,"title":"Categories","type":"string"},"countries":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated ISO 3166-1 alpha-2 country codes to include, prefix one with a minus to exclude, for example 'us,gb,-de'.","title":"Countries"},"languages":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated language codes to include, prefix one with a minus to exclude, for example 'en,de,-fr'.","title":"Languages"},"sort":{"anyOf":[{"enum":["published_desc","published_asc","popularity"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort order: published_desc (newest first, the default), published_asc or popularity.","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Results per page, 1 to 100 (default 25).","title":"Limit"},"offset":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Results to skip, 0 to 10000; offset plus limit must not exceed 10000.","title":"Offset"}},"required":["categories"],"title":"get_news_by_categoryArguments","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_news_by_source":{"post":{"operationId":"get_news_by_source","summary":"Get news articles from specific publishers by source code (find codes with search_sources), for example 'cnn,bbc'; prefi","description":"Get news articles from specific publishers by source code (find codes with search_sources), for example 'cnn,bbc'; prefix a source with a minus to exclude it. Use for \"What did the BBC and CNN publish most recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"sources":{"description":"Comma-separated source codes, for example 'cnn,bbc,-fox'.","maxLength":200,"title":"Sources","type":"string"},"sort":{"anyOf":[{"enum":["published_desc","published_asc","popularity"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort order: published_desc (newest first, the default), published_asc or popularity.","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Results per page, 1 to 100 (default 25).","title":"Limit"},"offset":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Results to skip, 0 to 10000; offset plus limit must not exceed 10000.","title":"Offset"}},"required":["sources"],"title":"get_news_by_sourceArguments","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_news_by_date":{"post":{"operationId":"get_news_by_date","summary":"Get news articles for a single day, a date range or a named period; keyword and category filters are optional. Historica","description":"Get news articles for a single day, a date range or a named period; keyword and category filters are optional. Historical dates need a plan that includes historical data. Use for \"What news was published between 2026-01-01 and 2026-01-07 about inflation\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date":{"description":"A day (YYYY-MM-DD), a range (YYYY-MM-DD,YYYY-MM-DD) or a named period: today, thisweek, thismonth, last7days, last30days, last3months or yeartodate.","maxLength":40,"title":"Date","type":"string"},"keywords":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Keywords to match, prefix one with a minus to exclude it.","title":"Keywords"},"categories":{"anyOf":[{"enum":["general","business","entertainment","health","science","sports","technology"],"type":"string"},{"type":"null"}],"default":null,"description":"Category to include, for example 'business'.","title":"Categories"},"sort":{"anyOf":[{"enum":["published_desc","published_asc","popularity"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort order: published_desc (newest first, the default), published_asc or popularity.","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Results per page, 1 to 100 (default 25).","title":"Limit"},"offset":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Results to skip, 0 to 10000; offset plus limit must not exceed 10000.","title":"Offset"}},"required":["date"],"title":"get_news_by_dateArguments","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_sources":{"post":{"operationId":"search_sources","summary":"Search the catalog of news sources by name and get each source's code, category, country and language; the codes feed ge","description":"Search the catalog of news sources by name and get each source's code, category, country and language; the codes feed get_news_by_source. Use for \"What is the source code for the BBC\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"description":"Words to match against source names, for example 'bbc'.","maxLength":100,"title":"Search","type":"string"},"categories":{"anyOf":[{"enum":["general","business","entertainment","health","science","sports","technology"],"type":"string"},{"type":"null"}],"default":null,"description":"Category to include, for example 'general'.","title":"Categories"},"countries":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated ISO 3166-1 alpha-2 country codes to include, prefix one with a minus to exclude, for example 'us,gb,-de'.","title":"Countries"},"languages":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated language codes to include, prefix one with a minus to exclude, for example 'en,de,-fr'.","title":"Languages"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Results per page, 1 to 100 (default 25).","title":"Limit"},"offset":{"anyOf":[{"maximum":10000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Results to skip, 0 to 10000; offset plus limit must not exceed 10000.","title":"Offset"}},"required":["search"],"title":"search_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}}}}