diff --git a/docs/commands/README.md b/docs/commands/README.md index 2b53370..a98105f 100644 --- a/docs/commands/README.md +++ b/docs/commands/README.md @@ -5,7 +5,7 @@ description: Complete generated reference for AskNews CLI commands # CLI command reference -Generated from AskNews CLI 0.2.3 and AskNews API 0.31.1. +Generated from AskNews CLI 0.2.5 and AskNews API 0.32.1. The installed CLI is authoritative. Run `asknews --help` for the exact options in your version. Regenerate these pages with `pnpm sync:openapi`. @@ -28,17 +28,14 @@ your version. Regenerate these pages with `pnpm sync:openapi`. ## Generated API groups - [`alerts`](commands/api-alerts) — Generated alerts API operations -- [`analytics`](commands/api-analytics) — Generated analytics API operations - [`autofilter`](commands/api-autofilter) — Generated autofilter API operations - [`byok`](commands/api-byok) — Generated byok API operations -- [`charts`](commands/api-charts) — Generated charts API operations - [`chat`](commands/api-chat) — Generated chat API operations - [`distribution`](commands/api-distribution) — Generated distribution API operations - [`forecast`](commands/api-forecast) — Generated forecast API operations - [`graph`](commands/api-graph) — Generated graph API operations - [`index-urls`](commands/api-index-urls) — Generated index-urls API operations - [`news`](commands/api-news) — Generated news API operations -- [`newsletters`](commands/api-newsletters) — Generated newsletters API operations - [`ping`](commands/api-ping) — Generated ping API operations - [`profile`](commands/api-profile) — Generated profile API operations - [`reddit`](commands/api-reddit) — Generated reddit API operations diff --git a/docs/commands/routes/api-alerts.md b/docs/commands/routes/api-alerts.md index ae15188..f3a0b8d 100644 --- a/docs/commands/routes/api-alerts.md +++ b/docs/commands/routes/api-alerts.md @@ -5,7 +5,7 @@ description: Generated alerts API operations # api alerts -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-analytics.md b/docs/commands/routes/api-analytics.md deleted file mode 100644 index 0e9094e..0000000 --- a/docs/commands/routes/api-analytics.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: api analytics -description: Generated analytics API operations ---- - -# api analytics - -Generated from AskNews API 0.31.1. - -## Operations - -### `asknews api analytics get-asset-sentiment` - -Get the news sentiment for a given asset during a provided period of time. - -This endpoint is good for narrow AI, like using in combination with a regressor -to forecast prices etc. - -- Request: `GET /v1/analytics/finance/sentiment` -- Operation ID: `get_asset_sentiment` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--asset` | The asset name to query for sentiment. Location: query. Type: string. Required. Choices: bitcoin, ethereum, cardano, uniswap, ripple, solana, polkadot, polygon, chainlink, tether, dogecoin, monero, tron, binance, aave, tesla, microsoft, amazon. | -| `--metric` | The metric to obtain. Weighted metrics account for page-rank of original source. Higher page rank sources are weighted more heavily. Location: query. Type: string. Optional. Choices: news_positive, news_negative, news_total, news_positive_weighted, news_negative_weighted, news_total_weighted. Default: `"news_positive"`. | -| `--date-from` | The start date in ISO format Location: query. Type: string. Optional. | -| `--date-to` | The end date in ISO format Location: query. Type: string. Optional. | - -## Global options - -All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL -overrides, request timeout, and color control. Result data is written to stdout; diagnostics -are written to stderr. diff --git a/docs/commands/routes/api-autofilter.md b/docs/commands/routes/api-autofilter.md index 916e712..51c15dd 100644 --- a/docs/commands/routes/api-autofilter.md +++ b/docs/commands/routes/api-autofilter.md @@ -5,7 +5,7 @@ description: Generated autofilter API operations # api autofilter -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-byok.md b/docs/commands/routes/api-byok.md index e2ed803..2e03b68 100644 --- a/docs/commands/routes/api-byok.md +++ b/docs/commands/routes/api-byok.md @@ -5,7 +5,7 @@ description: Generated byok API operations # api byok -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-charts.md b/docs/commands/routes/api-charts.md deleted file mode 100644 index fdf2e02..0000000 --- a/docs/commands/routes/api-charts.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: api charts -description: Generated charts API operations ---- - -# api charts - -Generated from AskNews API 0.31.1. - -## Operations - -### `asknews api charts create-charts-endpoint` - -Create charts. - -- Request: `POST /v1/chat/charts` -- Operation ID: `create_charts_endpoint` -- Safety: `high-cost` - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--query` | string | yes | The chart query to create | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -## Global options - -All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL -overrides, request timeout, and color control. Result data is written to stdout; diagnostics -are written to stderr. diff --git a/docs/commands/routes/api-chat.md b/docs/commands/routes/api-chat.md index 0f88e1a..e6c7646 100644 --- a/docs/commands/routes/api-chat.md +++ b/docs/commands/routes/api-chat.md @@ -5,7 +5,7 @@ description: Generated chat API operations # api chat -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-distribution.md b/docs/commands/routes/api-distribution.md index 5484cfe..41e1560 100644 --- a/docs/commands/routes/api-distribution.md +++ b/docs/commands/routes/api-distribution.md @@ -5,7 +5,7 @@ description: Generated distribution API operations # api distribution -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations @@ -28,7 +28,7 @@ Get the hit share for a list of domains in a time period. ### `asknews api distribution top-n-articles-for-domains` -Get the top N domain articles by hits. +Get the top N domain articles ranked by the selected metric. - Request: `GET /v1/distribution/articles/top_n_for_domains` - Operation ID: `top_n_articles_for_domains` @@ -43,6 +43,7 @@ Get the top N domain articles by hits. | `--page` | Page number (1-based; page size = limit) Location: query. Type: integer. Optional. Default: `1`. Minimum: 1. | | `--start-date` | Start date to filter by (timestamp in seconds since epoch) Location: query. Type: string. Optional. | | `--end-date` | End date to filter by (timestamp in seconds since epoch) Location: query. Type: string. Optional. | +| `--metric` | Metric used to rank and count the returned articles Location: query. Type: string. Optional. Choices: surface, citation, grounded. Default: `"surface"`. | ## Global options diff --git a/docs/commands/routes/api-forecast.md b/docs/commands/routes/api-forecast.md index 55ca15e..835a3d3 100644 --- a/docs/commands/routes/api-forecast.md +++ b/docs/commands/routes/api-forecast.md @@ -5,7 +5,7 @@ description: Generated forecast API operations # api forecast -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-graph.md b/docs/commands/routes/api-graph.md index 0173457..e05b362 100644 --- a/docs/commands/routes/api-graph.md +++ b/docs/commands/routes/api-graph.md @@ -5,7 +5,7 @@ description: Generated graph API operations # api graph -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-index-urls.md b/docs/commands/routes/api-index-urls.md index a8d33bc..92b02ab 100644 --- a/docs/commands/routes/api-index-urls.md +++ b/docs/commands/routes/api-index-urls.md @@ -5,7 +5,7 @@ description: Generated index-urls API operations # api index-urls -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-news.md b/docs/commands/routes/api-news.md index 5ef279b..7ee6971 100644 --- a/docs/commands/routes/api-news.md +++ b/docs/commands/routes/api-news.md @@ -5,7 +5,7 @@ description: Generated news API operations # api news -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations @@ -72,29 +72,6 @@ show the number of articles indexed per source. | `--continents` | Continents to filter by Location: query. Type: string. Optional. | | `--sentiment` | Sentiment to filter news articles by. Location: query. Type: string. Optional. | -### `asknews api news get-sources-report` - -This endpoint is primarly used for transparency and monitoring the -diversity of the data. - -Visualized at `https://asknews.app/transparency`. - -Get the distribution of sources/languages/countries underlying AskNews content. - -- Request: `GET /v1/sources` -- Operation ID: `get_sources_report` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--n-points` | Number of points to return Location: query. Type: integer. Optional. Default: `100`. | -| `--start-timestamp` | Start timestamp to filter by Location: query. Type: string. Optional. | -| `--end-timestamp` | End timestamp to filter by Location: query. Type: string. Optional. | -| `--metric` | Metric to filter by Location: query. Type: string. Optional. Choices: duplication, countries_diversity, languages_diversity, sources_diversity, bucket_loss. Default: `"countries_diversity"`. | -| `--sampling` | Sampling to use Location: query. Type: string. Optional. Choices: 5m, 1h, 4h, 1d. Default: `"1h"`. | - ### `asknews api news search-news` Search for any news, up to the last 5 minutes or in our extensive historical archive diff --git a/docs/commands/routes/api-newsletters.md b/docs/commands/routes/api-newsletters.md deleted file mode 100644 index b171628..0000000 --- a/docs/commands/routes/api-newsletters.md +++ /dev/null @@ -1,241 +0,0 @@ ---- -title: api newsletters -description: Generated newsletters API operations ---- - -# api newsletters - -Generated from AskNews API 0.31.1. - -## Operations - -### `asknews api newsletters delete-newsletter` - -Delete a newsletter. - -- Request: `DELETE /v1/chat/newsletters/{newsletter_id}` -- Operation ID: `delete_newsletter` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters delete-newsletter-contact` - -Delete a newsletter contact. - -- Request: `DELETE /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}` -- Operation ID: `delete_newsletter_contact` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | -| `--contact-id` | The contact ID Location: path. Type: string. Required. | - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters get-newsletter` - -Get a newsletter. - -- Request: `GET /v1/chat/newsletters/{newsletter_id}` -- Operation ID: `get_newsletter` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -### `asknews api newsletters get-newsletter-contact` - -Get a newsletter contact. - -- Request: `GET /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}` -- Operation ID: `get_newsletter_contact` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | -| `--contact-id` | The contact ID Location: path. Type: string. Required. | - -### `asknews api newsletters get-newsletter-contacts` - -Get newsletter contacts. - -- Request: `GET /v1/chat/newsletters/{newsletter_id}/contacts` -- Operation ID: `get_newsletter_contacts` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -### `asknews api newsletters get-newsletters` - -Get all created newsletters. - -- Request: `GET /v1/chat/newsletters` -- Operation ID: `get_newsletters` -- Safety: `read-only` - -### `asknews api newsletters get-public-newsletters` - -Get all public newsletters. - -- Request: `GET /v1/chat/newsletters/public` -- Operation ID: `get_public_newsletters` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--page` | The page number to get Location: query. Type: integer. Optional. Default: `1`. | -| `--per-page` | The number of items per page Location: query. Type: integer. Optional. Default: `10`. | -| `--all` | Whether to get all the public newsletters Location: query. Type: boolean. Optional. Default: `false`. | - -### `asknews api newsletters patch-newsletter-contact` - -Update a newsletter contact. - -- Request: `PATCH /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}` -- Operation ID: `patch_newsletter_contact` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | -| `--contact-id` | The contact ID Location: path. Type: string. Required. | - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--email` | string | yes | | -| `--first-name` | string or null | no | | -| `--last-name` | string or null | no | | -| `--unsubscribed` | boolean | no | Default: `false`. | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters post-newsletter` - -Create a newsletter. - -- Request: `POST /v1/chat/newsletters` -- Operation ID: `post_newsletter` -- Safety: `mutating` - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--name` | string | yes | The name of the newsletter. | -| `--query` | string | yes | The natural language query to run for the newsletter. | -| `--cron` | string | yes | The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples | -| `--model` | string | yes | The model to use for the newsletter. Choices: gpt-4o, gpt-4o-mini, claude-3-5-sonnet-latest, meta-llama/Meta-Llama-3.1-405B-Instruct, meta-llama/Meta-Llama-3.3-70B-Instruct. | -| `--subject` | string or null | no | The subject of the newsletter. If not provided it will be auto generated. | -| `--sender` | string | yes | The sender of the newsletter. | -| `--logo-url` | string or null | no | The logo URL for the newsletter. | -| `--reply-to` | string or null | no | The reply-to address for the newsletter. If not provided, the sender will be used. | -| `--audience-id` | string or null | no | The audience ID to use for the newsletter. If not provided a new audience will be created. | -| `--resend-api-key` | string or null | no | The resend API key to use for the newsletter. If not provided, the newsletter will not be sent. | -| `--public` | boolean | no | Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown. Default: `true`. | -| `--active` | boolean | no | Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent. Default: `true`. | -| `--expires-at` | string or null | no | The expiration date for the alert. Default is None. If set, the alert will be disabled after this date. | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters post-newsletter-contacts` - -Create a newsletter contact. - -- Request: `POST /v1/chat/newsletters/{newsletter_id}/contacts` -- Operation ID: `post_newsletter_contacts` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--email` | string | yes | | -| `--first-name` | string or null | no | | -| `--last-name` | string or null | no | | -| `--unsubscribed` | boolean | no | Default: `false`. | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters put-newsletter` - -Update a newsletter. - -- Request: `PUT /v1/chat/newsletters/{newsletter_id}` -- Operation ID: `put_newsletter` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--name` | string or null | no | The name of the newsletter. | -| `--query` | string or null | no | The natural language query to run for the newsletter. | -| `--cron` | string or null | no | The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples | -| `--model` | string or null | no | The model to use for the newsletter. | -| `--subject` | string or null | no | The subject of the newsletter. If not provided it will be auto generated. | -| `--sender` | string or null | no | The sender of the newsletter. | -| `--logo-url` | string or null | no | The logo URL for the newsletter. | -| `--reply-to` | string or null | no | The reply-to address for the newsletter. If not provided, the sender will be used. | -| `--audience-id` | string or null | no | The audience ID to use for the newsletter. If not provided a new audience will be created. | -| `--resend-api-key` | string or null | no | The resend API key to use for the newsletter. If not provided, the newsletter will not be sent. | -| `--public` | boolean or null | no | Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown. | -| `--active` | boolean or null | no | Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent. | -| `--expires-at` | string or null | no | The expiration date for the alert. Default is None. If set, the alert will be disabled after this date. | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -This operation requires confirmation and `--yes` in non-interactive use. - -## Global options - -All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL -overrides, request timeout, and color control. Result data is written to stdout; diagnostics -are written to stderr. diff --git a/docs/commands/routes/api-ping.md b/docs/commands/routes/api-ping.md index eccd706..eac9a5c 100644 --- a/docs/commands/routes/api-ping.md +++ b/docs/commands/routes/api-ping.md @@ -5,7 +5,7 @@ description: Generated ping API operations # api ping -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-profile.md b/docs/commands/routes/api-profile.md index ecd77a6..b760259 100644 --- a/docs/commands/routes/api-profile.md +++ b/docs/commands/routes/api-profile.md @@ -5,7 +5,7 @@ description: Generated profile API operations # api profile -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-reddit.md b/docs/commands/routes/api-reddit.md index d2ce00a..f2b8b83 100644 --- a/docs/commands/routes/api-reddit.md +++ b/docs/commands/routes/api-reddit.md @@ -5,7 +5,7 @@ description: Generated reddit API operations # api reddit -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-stories.md b/docs/commands/routes/api-stories.md index f9400ce..d83fb33 100644 --- a/docs/commands/routes/api-stories.md +++ b/docs/commands/routes/api-stories.md @@ -5,7 +5,7 @@ description: Generated stories API operations # api stories -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-websearch.md b/docs/commands/routes/api-websearch.md index c534134..e921b09 100644 --- a/docs/commands/routes/api-websearch.md +++ b/docs/commands/routes/api-websearch.md @@ -5,7 +5,7 @@ description: Generated websearch API operations # api websearch -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api-wiki.md b/docs/commands/routes/api-wiki.md index ad33997..7d84155 100644 --- a/docs/commands/routes/api-wiki.md +++ b/docs/commands/routes/api-wiki.md @@ -5,7 +5,7 @@ description: Generated wiki API operations # api wiki -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/docs/commands/routes/api.md b/docs/commands/routes/api.md index 9fb7834..310a291 100644 --- a/docs/commands/routes/api.md +++ b/docs/commands/routes/api.md @@ -30,17 +30,14 @@ asknews api list --tag news --safety read-only --output json ## API groups - [`asknews api alerts`](api-alerts) — 8 operations -- [`asknews api analytics`](api-analytics) — 1 operations - [`asknews api autofilter`](api-autofilter) — 1 operations - [`asknews api byok`](api-byok) — 3 operations -- [`asknews api charts`](api-charts) — 1 operations - [`asknews api chat`](api-chat) — 3 operations - [`asknews api distribution`](api-distribution) — 2 operations - [`asknews api forecast`](api-forecast) — 1 operations - [`asknews api graph`](api-graph) — 1 operations - [`asknews api index-urls`](api-index-urls) — 1 operations -- [`asknews api news`](api-news) — 5 operations -- [`asknews api newsletters`](api-newsletters) — 11 operations +- [`asknews api news`](api-news) — 4 operations - [`asknews api ping`](api-ping) — 1 operations - [`asknews api profile`](api-profile) — 2 operations - [`asknews api reddit`](api-reddit) — 1 operations diff --git a/docs/commands/routes/research.md b/docs/commands/routes/research.md index ef093fb..0ffb9e1 100644 --- a/docs/commands/routes/research.md +++ b/docs/commands/routes/research.md @@ -23,7 +23,7 @@ Run DeepNews research | Option | Description | | --- | --- | -| `--model ` | The model to use for DeepNews research. Defaults to claude-sonnet-5. [body, string\|null, optional, default: "claude-sonnet-5"] Choices: o1-mini, o1, o3-mini, o3, gpt-4o-mini, gpt-4o, gpt-4.1-2025-04-14, gpt-5-mini, gpt-5, command-nightly, claude-3-5-sonnet-20240620, claude-3-5-sonnet-latest, claude-3-7-sonnet-latest, claude-3-7-sonnet-20250219, claude-3-7-sonnet-nothinking, claude-sonnet-4-20250514, claude-opus-4-20250514, claude-sonnet-4-5-20250929, claude-opus-4-5-20251101, claude-sonnet-4-6, claude-sonnet-5, claude-opus-4-8, claude-opus-5, claude-opus-4-6, claude-fable-5, gpt-5.6-terra, gpt-5.6-sol, deepseek, deepseek-basic, deepseek-r1-0528, meta-llama/Meta-Llama-3-8B-Instruct, meta-llama/Meta-Llama-3.1-405B-Instruct, meta-llama/Meta-Llama-3.3-70B-Instruct, meta-llama/Llama-4-Maverick-17B-128E-Instruct, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-pro-preview-03-25, gemini-3-pro, gemini-3.1-pro, gemini-3-flash, gemini-3.5-flash, gemini-3.6-flash, open-source-best, kimi-k2p5. | +| `--model ` | The model to use for DeepNews research. Defaults to claude-sonnet-5. [body, string\|null, optional, default: "claude-sonnet-5"] Choices: o1-mini, o1, o3-mini, o3, gpt-4o-mini, gpt-4o, gpt-4.1-2025-04-14, gpt-5-mini, gpt-5, command-nightly, claude-3-5-sonnet-20240620, claude-3-5-sonnet-latest, claude-3-7-sonnet-latest, claude-3-7-sonnet-20250219, claude-3-7-sonnet-nothinking, claude-sonnet-4-20250514, claude-opus-4-20250514, claude-sonnet-4-5-20250929, claude-opus-4-5-20251101, claude-sonnet-4-6, claude-sonnet-5, claude-opus-4-8, claude-opus-5, claude-opus-5-5, claude-opus-4-6, claude-fable-5, claude-fable-5-1, gpt-5.6-terra, gpt-5.6-sol, gpt-6-sol, gpt-6-astra, deepseek, deepseek-basic, deepseek-r1-0528, meta-llama/Meta-Llama-3-8B-Instruct, meta-llama/Meta-Llama-3.1-405B-Instruct, meta-llama/Meta-Llama-3.3-70B-Instruct, meta-llama/Llama-4-Maverick-17B-128E-Instruct, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-pro-preview-03-25, gemini-3-pro, gemini-3.1-pro, gemini-3-flash, gemini-3.5-flash, gemini-3.6-flash, open-source-best, kimi-k2p5. | | `--filter-params ` | Filter parameters to apply to the AskNews search within DeepNews. [body, object\|null, optional] | | `--search-depth ` | The search depth for deep research. Higher values mean more thorough research. [body, integer, optional, min: 1, max: 190, default: 2] | | `--max-depth ` | The maximum research depth allowed. [body, integer, optional, min: 1, max: 200, default: 6] | diff --git a/skills/asknews-cli/references/commands/api-alerts.md b/skills/asknews-cli/references/commands/api-alerts.md index 7157b60..d61d46b 100644 --- a/skills/asknews-cli/references/commands/api-alerts.md +++ b/skills/asknews-cli/references/commands/api-alerts.md @@ -1,6 +1,6 @@ # api alerts -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-analytics.md b/skills/asknews-cli/references/commands/api-analytics.md deleted file mode 100644 index 01157e5..0000000 --- a/skills/asknews-cli/references/commands/api-analytics.md +++ /dev/null @@ -1,31 +0,0 @@ -# api analytics - -Generated from AskNews API 0.31.1. - -## Operations - -### `asknews api analytics get-asset-sentiment` - -Get the news sentiment for a given asset during a provided period of time. - -This endpoint is good for narrow AI, like using in combination with a regressor -to forecast prices etc. - -- Request: `GET /v1/analytics/finance/sentiment` -- Operation ID: `get_asset_sentiment` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--asset` | The asset name to query for sentiment. Location: query. Type: string. Required. Choices: bitcoin, ethereum, cardano, uniswap, ripple, solana, polkadot, polygon, chainlink, tether, dogecoin, monero, tron, binance, aave, tesla, microsoft, amazon. | -| `--metric` | The metric to obtain. Weighted metrics account for page-rank of original source. Higher page rank sources are weighted more heavily. Location: query. Type: string. Optional. Choices: news_positive, news_negative, news_total, news_positive_weighted, news_negative_weighted, news_total_weighted. Default: `"news_positive"`. | -| `--date-from` | The start date in ISO format Location: query. Type: string. Optional. | -| `--date-to` | The end date in ISO format Location: query. Type: string. Optional. | - -## Global options - -All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL -overrides, request timeout, and color control. Result data is written to stdout; diagnostics -are written to stderr. diff --git a/skills/asknews-cli/references/commands/api-autofilter.md b/skills/asknews-cli/references/commands/api-autofilter.md index 9806adf..22ff6ef 100644 --- a/skills/asknews-cli/references/commands/api-autofilter.md +++ b/skills/asknews-cli/references/commands/api-autofilter.md @@ -1,6 +1,6 @@ # api autofilter -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-byok.md b/skills/asknews-cli/references/commands/api-byok.md index ee671d7..f0d953f 100644 --- a/skills/asknews-cli/references/commands/api-byok.md +++ b/skills/asknews-cli/references/commands/api-byok.md @@ -1,6 +1,6 @@ # api byok -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-charts.md b/skills/asknews-cli/references/commands/api-charts.md deleted file mode 100644 index e7aa118..0000000 --- a/skills/asknews-cli/references/commands/api-charts.md +++ /dev/null @@ -1,28 +0,0 @@ -# api charts - -Generated from AskNews API 0.31.1. - -## Operations - -### `asknews api charts create-charts-endpoint` - -Create charts. - -- Request: `POST /v1/chat/charts` -- Operation ID: `create_charts_endpoint` -- Safety: `high-cost` - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--query` | string | yes | The chart query to create | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -## Global options - -All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL -overrides, request timeout, and color control. Result data is written to stdout; diagnostics -are written to stderr. diff --git a/skills/asknews-cli/references/commands/api-chat.md b/skills/asknews-cli/references/commands/api-chat.md index 7eddd72..fc27844 100644 --- a/skills/asknews-cli/references/commands/api-chat.md +++ b/skills/asknews-cli/references/commands/api-chat.md @@ -1,6 +1,6 @@ # api chat -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-distribution.md b/skills/asknews-cli/references/commands/api-distribution.md index 51811e3..f274774 100644 --- a/skills/asknews-cli/references/commands/api-distribution.md +++ b/skills/asknews-cli/references/commands/api-distribution.md @@ -1,6 +1,6 @@ # api distribution -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations @@ -23,7 +23,7 @@ Get the hit share for a list of domains in a time period. ### `asknews api distribution top-n-articles-for-domains` -Get the top N domain articles by hits. +Get the top N domain articles ranked by the selected metric. - Request: `GET /v1/distribution/articles/top_n_for_domains` - Operation ID: `top_n_articles_for_domains` @@ -38,6 +38,7 @@ Get the top N domain articles by hits. | `--page` | Page number (1-based; page size = limit) Location: query. Type: integer. Optional. Default: `1`. Minimum: 1. | | `--start-date` | Start date to filter by (timestamp in seconds since epoch) Location: query. Type: string. Optional. | | `--end-date` | End date to filter by (timestamp in seconds since epoch) Location: query. Type: string. Optional. | +| `--metric` | Metric used to rank and count the returned articles Location: query. Type: string. Optional. Choices: surface, citation, grounded. Default: `"surface"`. | ## Global options diff --git a/skills/asknews-cli/references/commands/api-forecast.md b/skills/asknews-cli/references/commands/api-forecast.md index 35743fb..a7085e1 100644 --- a/skills/asknews-cli/references/commands/api-forecast.md +++ b/skills/asknews-cli/references/commands/api-forecast.md @@ -1,6 +1,6 @@ # api forecast -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-graph.md b/skills/asknews-cli/references/commands/api-graph.md index 9137fa8..126918e 100644 --- a/skills/asknews-cli/references/commands/api-graph.md +++ b/skills/asknews-cli/references/commands/api-graph.md @@ -1,6 +1,6 @@ # api graph -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-index-urls.md b/skills/asknews-cli/references/commands/api-index-urls.md index 0d68a93..a2d0d36 100644 --- a/skills/asknews-cli/references/commands/api-index-urls.md +++ b/skills/asknews-cli/references/commands/api-index-urls.md @@ -1,6 +1,6 @@ # api index-urls -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-news.md b/skills/asknews-cli/references/commands/api-news.md index 3edd975..60b5023 100644 --- a/skills/asknews-cli/references/commands/api-news.md +++ b/skills/asknews-cli/references/commands/api-news.md @@ -1,6 +1,6 @@ # api news -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations @@ -67,29 +67,6 @@ show the number of articles indexed per source. | `--continents` | Continents to filter by Location: query. Type: string. Optional. | | `--sentiment` | Sentiment to filter news articles by. Location: query. Type: string. Optional. | -### `asknews api news get-sources-report` - -This endpoint is primarly used for transparency and monitoring the -diversity of the data. - -Visualized at `https://asknews.app/transparency`. - -Get the distribution of sources/languages/countries underlying AskNews content. - -- Request: `GET /v1/sources` -- Operation ID: `get_sources_report` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--n-points` | Number of points to return Location: query. Type: integer. Optional. Default: `100`. | -| `--start-timestamp` | Start timestamp to filter by Location: query. Type: string. Optional. | -| `--end-timestamp` | End timestamp to filter by Location: query. Type: string. Optional. | -| `--metric` | Metric to filter by Location: query. Type: string. Optional. Choices: duplication, countries_diversity, languages_diversity, sources_diversity, bucket_loss. Default: `"countries_diversity"`. | -| `--sampling` | Sampling to use Location: query. Type: string. Optional. Choices: 5m, 1h, 4h, 1d. Default: `"1h"`. | - ### `asknews api news search-news` Search for any news, up to the last 5 minutes or in our extensive historical archive diff --git a/skills/asknews-cli/references/commands/api-newsletters.md b/skills/asknews-cli/references/commands/api-newsletters.md deleted file mode 100644 index 503a42a..0000000 --- a/skills/asknews-cli/references/commands/api-newsletters.md +++ /dev/null @@ -1,236 +0,0 @@ -# api newsletters - -Generated from AskNews API 0.31.1. - -## Operations - -### `asknews api newsletters delete-newsletter` - -Delete a newsletter. - -- Request: `DELETE /v1/chat/newsletters/{newsletter_id}` -- Operation ID: `delete_newsletter` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters delete-newsletter-contact` - -Delete a newsletter contact. - -- Request: `DELETE /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}` -- Operation ID: `delete_newsletter_contact` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | -| `--contact-id` | The contact ID Location: path. Type: string. Required. | - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters get-newsletter` - -Get a newsletter. - -- Request: `GET /v1/chat/newsletters/{newsletter_id}` -- Operation ID: `get_newsletter` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -### `asknews api newsletters get-newsletter-contact` - -Get a newsletter contact. - -- Request: `GET /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}` -- Operation ID: `get_newsletter_contact` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | -| `--contact-id` | The contact ID Location: path. Type: string. Required. | - -### `asknews api newsletters get-newsletter-contacts` - -Get newsletter contacts. - -- Request: `GET /v1/chat/newsletters/{newsletter_id}/contacts` -- Operation ID: `get_newsletter_contacts` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -### `asknews api newsletters get-newsletters` - -Get all created newsletters. - -- Request: `GET /v1/chat/newsletters` -- Operation ID: `get_newsletters` -- Safety: `read-only` - -### `asknews api newsletters get-public-newsletters` - -Get all public newsletters. - -- Request: `GET /v1/chat/newsletters/public` -- Operation ID: `get_public_newsletters` -- Safety: `read-only` - -**Options:** - -| Option | Description | -| --- | --- | -| `--page` | The page number to get Location: query. Type: integer. Optional. Default: `1`. | -| `--per-page` | The number of items per page Location: query. Type: integer. Optional. Default: `10`. | -| `--all` | Whether to get all the public newsletters Location: query. Type: boolean. Optional. Default: `false`. | - -### `asknews api newsletters patch-newsletter-contact` - -Update a newsletter contact. - -- Request: `PATCH /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}` -- Operation ID: `patch_newsletter_contact` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | -| `--contact-id` | The contact ID Location: path. Type: string. Required. | - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--email` | string | yes | | -| `--first-name` | string or null | no | | -| `--last-name` | string or null | no | | -| `--unsubscribed` | boolean | no | Default: `false`. | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters post-newsletter` - -Create a newsletter. - -- Request: `POST /v1/chat/newsletters` -- Operation ID: `post_newsletter` -- Safety: `mutating` - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--name` | string | yes | The name of the newsletter. | -| `--query` | string | yes | The natural language query to run for the newsletter. | -| `--cron` | string | yes | The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples | -| `--model` | string | yes | The model to use for the newsletter. Choices: gpt-4o, gpt-4o-mini, claude-3-5-sonnet-latest, meta-llama/Meta-Llama-3.1-405B-Instruct, meta-llama/Meta-Llama-3.3-70B-Instruct. | -| `--subject` | string or null | no | The subject of the newsletter. If not provided it will be auto generated. | -| `--sender` | string | yes | The sender of the newsletter. | -| `--logo-url` | string or null | no | The logo URL for the newsletter. | -| `--reply-to` | string or null | no | The reply-to address for the newsletter. If not provided, the sender will be used. | -| `--audience-id` | string or null | no | The audience ID to use for the newsletter. If not provided a new audience will be created. | -| `--resend-api-key` | string or null | no | The resend API key to use for the newsletter. If not provided, the newsletter will not be sent. | -| `--public` | boolean | no | Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown. Default: `true`. | -| `--active` | boolean | no | Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent. Default: `true`. | -| `--expires-at` | string or null | no | The expiration date for the alert. Default is None. If set, the alert will be disabled after this date. | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters post-newsletter-contacts` - -Create a newsletter contact. - -- Request: `POST /v1/chat/newsletters/{newsletter_id}/contacts` -- Operation ID: `post_newsletter_contacts` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--email` | string | yes | | -| `--first-name` | string or null | no | | -| `--last-name` | string or null | no | | -| `--unsubscribed` | boolean | no | Default: `false`. | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -This operation requires confirmation and `--yes` in non-interactive use. - -### `asknews api newsletters put-newsletter` - -Update a newsletter. - -- Request: `PUT /v1/chat/newsletters/{newsletter_id}` -- Operation ID: `put_newsletter` -- Safety: `mutating` - -**Options:** - -| Option | Description | -| --- | --- | -| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. | - -**Request body fields:** - -| Option | Type | Required | Description | -| --- | --- | --- | --- | -| `--name` | string or null | no | The name of the newsletter. | -| `--query` | string or null | no | The natural language query to run for the newsletter. | -| `--cron` | string or null | no | The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples | -| `--model` | string or null | no | The model to use for the newsletter. | -| `--subject` | string or null | no | The subject of the newsletter. If not provided it will be auto generated. | -| `--sender` | string or null | no | The sender of the newsletter. | -| `--logo-url` | string or null | no | The logo URL for the newsletter. | -| `--reply-to` | string or null | no | The reply-to address for the newsletter. If not provided, the sender will be used. | -| `--audience-id` | string or null | no | The audience ID to use for the newsletter. If not provided a new audience will be created. | -| `--resend-api-key` | string or null | no | The resend API key to use for the newsletter. If not provided, the newsletter will not be sent. | -| `--public` | boolean or null | no | Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown. | -| `--active` | boolean or null | no | Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent. | -| `--expires-at` | string or null | no | The expiration date for the alert. Default is None. If set, the alert will be disabled after this date. | - -Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`. -Direct body options override values supplied through `--body`. - -This operation requires confirmation and `--yes` in non-interactive use. - -## Global options - -All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL -overrides, request timeout, and color control. Result data is written to stdout; diagnostics -are written to stderr. diff --git a/skills/asknews-cli/references/commands/api-ping.md b/skills/asknews-cli/references/commands/api-ping.md index a74ab8d..7b3a247 100644 --- a/skills/asknews-cli/references/commands/api-ping.md +++ b/skills/asknews-cli/references/commands/api-ping.md @@ -1,6 +1,6 @@ # api ping -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-profile.md b/skills/asknews-cli/references/commands/api-profile.md index 58a4efe..e20b41d 100644 --- a/skills/asknews-cli/references/commands/api-profile.md +++ b/skills/asknews-cli/references/commands/api-profile.md @@ -1,6 +1,6 @@ # api profile -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-reddit.md b/skills/asknews-cli/references/commands/api-reddit.md index e1ec3df..c97613d 100644 --- a/skills/asknews-cli/references/commands/api-reddit.md +++ b/skills/asknews-cli/references/commands/api-reddit.md @@ -1,6 +1,6 @@ # api reddit -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-stories.md b/skills/asknews-cli/references/commands/api-stories.md index 652f3de..bfe1171 100644 --- a/skills/asknews-cli/references/commands/api-stories.md +++ b/skills/asknews-cli/references/commands/api-stories.md @@ -1,6 +1,6 @@ # api stories -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-websearch.md b/skills/asknews-cli/references/commands/api-websearch.md index 3ef65d3..202ed56 100644 --- a/skills/asknews-cli/references/commands/api-websearch.md +++ b/skills/asknews-cli/references/commands/api-websearch.md @@ -1,6 +1,6 @@ # api websearch -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api-wiki.md b/skills/asknews-cli/references/commands/api-wiki.md index 84d23df..f8026c6 100644 --- a/skills/asknews-cli/references/commands/api-wiki.md +++ b/skills/asknews-cli/references/commands/api-wiki.md @@ -1,6 +1,6 @@ # api wiki -Generated from AskNews API 0.31.1. +Generated from AskNews API 0.32.1. ## Operations diff --git a/skills/asknews-cli/references/commands/api.md b/skills/asknews-cli/references/commands/api.md index c6445c8..02bf4d8 100644 --- a/skills/asknews-cli/references/commands/api.md +++ b/skills/asknews-cli/references/commands/api.md @@ -25,17 +25,14 @@ asknews api list --tag news --safety read-only --output json ## API groups - [`asknews api alerts`](api-alerts) — 8 operations -- [`asknews api analytics`](api-analytics) — 1 operations - [`asknews api autofilter`](api-autofilter) — 1 operations - [`asknews api byok`](api-byok) — 3 operations -- [`asknews api charts`](api-charts) — 1 operations - [`asknews api chat`](api-chat) — 3 operations - [`asknews api distribution`](api-distribution) — 2 operations - [`asknews api forecast`](api-forecast) — 1 operations - [`asknews api graph`](api-graph) — 1 operations - [`asknews api index-urls`](api-index-urls) — 1 operations -- [`asknews api news`](api-news) — 5 operations -- [`asknews api newsletters`](api-newsletters) — 11 operations +- [`asknews api news`](api-news) — 4 operations - [`asknews api ping`](api-ping) — 1 operations - [`asknews api profile`](api-profile) — 2 operations - [`asknews api reddit`](api-reddit) — 1 operations diff --git a/skills/asknews-cli/references/commands/index.md b/skills/asknews-cli/references/commands/index.md index d4c289e..659ff0a 100644 --- a/skills/asknews-cli/references/commands/index.md +++ b/skills/asknews-cli/references/commands/index.md @@ -1,6 +1,6 @@ # CLI command reference -Generated from AskNews CLI 0.2.3 and AskNews API 0.31.1. +Generated from AskNews CLI 0.2.5 and AskNews API 0.32.1. The installed CLI is authoritative. Run `asknews --help` for the exact options in your version. Regenerate these pages with `pnpm sync:openapi`. @@ -23,17 +23,14 @@ your version. Regenerate these pages with `pnpm sync:openapi`. ## Generated API groups - [`alerts`](commands/api-alerts) — Generated alerts API operations -- [`analytics`](commands/api-analytics) — Generated analytics API operations - [`autofilter`](commands/api-autofilter) — Generated autofilter API operations - [`byok`](commands/api-byok) — Generated byok API operations -- [`charts`](commands/api-charts) — Generated charts API operations - [`chat`](commands/api-chat) — Generated chat API operations - [`distribution`](commands/api-distribution) — Generated distribution API operations - [`forecast`](commands/api-forecast) — Generated forecast API operations - [`graph`](commands/api-graph) — Generated graph API operations - [`index-urls`](commands/api-index-urls) — Generated index-urls API operations - [`news`](commands/api-news) — Generated news API operations -- [`newsletters`](commands/api-newsletters) — Generated newsletters API operations - [`ping`](commands/api-ping) — Generated ping API operations - [`profile`](commands/api-profile) — Generated profile API operations - [`reddit`](commands/api-reddit) — Generated reddit API operations diff --git a/skills/asknews-cli/references/commands/research.md b/skills/asknews-cli/references/commands/research.md index eb0c04c..6bf4ca8 100644 --- a/skills/asknews-cli/references/commands/research.md +++ b/skills/asknews-cli/references/commands/research.md @@ -18,7 +18,7 @@ Run DeepNews research | Option | Description | | --- | --- | -| `--model ` | The model to use for DeepNews research. Defaults to claude-sonnet-5. [body, string\|null, optional, default: "claude-sonnet-5"] Choices: o1-mini, o1, o3-mini, o3, gpt-4o-mini, gpt-4o, gpt-4.1-2025-04-14, gpt-5-mini, gpt-5, command-nightly, claude-3-5-sonnet-20240620, claude-3-5-sonnet-latest, claude-3-7-sonnet-latest, claude-3-7-sonnet-20250219, claude-3-7-sonnet-nothinking, claude-sonnet-4-20250514, claude-opus-4-20250514, claude-sonnet-4-5-20250929, claude-opus-4-5-20251101, claude-sonnet-4-6, claude-sonnet-5, claude-opus-4-8, claude-opus-5, claude-opus-4-6, claude-fable-5, gpt-5.6-terra, gpt-5.6-sol, deepseek, deepseek-basic, deepseek-r1-0528, meta-llama/Meta-Llama-3-8B-Instruct, meta-llama/Meta-Llama-3.1-405B-Instruct, meta-llama/Meta-Llama-3.3-70B-Instruct, meta-llama/Llama-4-Maverick-17B-128E-Instruct, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-pro-preview-03-25, gemini-3-pro, gemini-3.1-pro, gemini-3-flash, gemini-3.5-flash, gemini-3.6-flash, open-source-best, kimi-k2p5. | +| `--model ` | The model to use for DeepNews research. Defaults to claude-sonnet-5. [body, string\|null, optional, default: "claude-sonnet-5"] Choices: o1-mini, o1, o3-mini, o3, gpt-4o-mini, gpt-4o, gpt-4.1-2025-04-14, gpt-5-mini, gpt-5, command-nightly, claude-3-5-sonnet-20240620, claude-3-5-sonnet-latest, claude-3-7-sonnet-latest, claude-3-7-sonnet-20250219, claude-3-7-sonnet-nothinking, claude-sonnet-4-20250514, claude-opus-4-20250514, claude-sonnet-4-5-20250929, claude-opus-4-5-20251101, claude-sonnet-4-6, claude-sonnet-5, claude-opus-4-8, claude-opus-5, claude-opus-5-5, claude-opus-4-6, claude-fable-5, claude-fable-5-1, gpt-5.6-terra, gpt-5.6-sol, gpt-6-sol, gpt-6-astra, deepseek, deepseek-basic, deepseek-r1-0528, meta-llama/Meta-Llama-3-8B-Instruct, meta-llama/Meta-Llama-3.1-405B-Instruct, meta-llama/Meta-Llama-3.3-70B-Instruct, meta-llama/Llama-4-Maverick-17B-128E-Instruct, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-pro-preview-03-25, gemini-3-pro, gemini-3.1-pro, gemini-3-flash, gemini-3.5-flash, gemini-3.6-flash, open-source-best, kimi-k2p5. | | `--filter-params ` | Filter parameters to apply to the AskNews search within DeepNews. [body, object\|null, optional] | | `--search-depth ` | The search depth for deep research. Higher values mean more thorough research. [body, integer, optional, min: 1, max: 190, default: 2] | | `--max-depth ` | The maximum research depth allowed. [body, integer, optional, min: 1, max: 200, default: 6] | diff --git a/src/generated/openapi.json b/src/generated/openapi.json index d4289ab..62cccbb 100644 --- a/src/generated/openapi.json +++ b/src/generated/openapi.json @@ -3,7 +3,7 @@ "info": { "title": "AskNews API", "description": "AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod)", - "version": "0.31.1" + "version": "0.32.1" }, "servers": [ { @@ -1371,182 +1371,6 @@ } } }, - "/v1/sources": { - "get": { - "tags": [ - "news" - ], - "summary": "Get the sources underlying AskNews", - "description": "This endpoint is primarly used for transparency and monitoring the\ndiversity of the data.\n\nVisualized at `https://asknews.app/transparency`.\n\nGet the distribution of sources/languages/countries underlying AskNews content.", - "operationId": "get_sources_report", - "security": [ - { - "APIKey": [ - "news" - ] - } - ], - "parameters": [ - { - "name": "n_points", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "description": "Number of points to return", - "default": 100, - "title": "N Points" - }, - "description": "Number of points to return" - }, - { - "name": "start_timestamp", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "Start timestamp to filter by", - "title": "Start Timestamp" - }, - "description": "Start timestamp to filter by" - }, - { - "name": "end_timestamp", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "End timestamp to filter by", - "title": "End Timestamp" - }, - "description": "End timestamp to filter by" - }, - { - "name": "metric", - "in": "query", - "required": false, - "schema": { - "enum": [ - "duplication", - "countries_diversity", - "languages_diversity", - "sources_diversity", - "bucket_loss" - ], - "type": "string", - "description": "Metric to filter by", - "default": "countries_diversity", - "title": "Metric" - }, - "description": "Metric to filter by" - }, - { - "name": "sampling", - "in": "query", - "required": false, - "schema": { - "enum": [ - "5m", - "1h", - "4h", - "1d" - ], - "type": "string", - "description": "Sampling to use", - "default": "1h", - "title": "Sampling" - }, - "description": "Sampling to use" - } - ], - "responses": { - "200": { - "description": "A time-series for distribution of sources, countries, and languages of underling AskNews content and analytics.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SourceReportResponse" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__24" - } - } - }, - "description": "Bad Request" - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__23" - } - } - }, - "description": "Unauthorized" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__22" - } - } - }, - "description": "Forbidden" - }, - "405": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__21" - } - } - }, - "description": "Method Not Allowed" - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorModel" - } - } - }, - "description": "Unprocessable Entity" - }, - "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/asknews_api__errors__APIErrorModel" - } - } - }, - "description": "Internal Server Error" - } - } - } - }, "/v1/index_counts": { "get": { "tags": [ @@ -2084,7 +1908,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__28" + "$ref": "#/components/schemas/abc__APIErrorModel__24" } } }, @@ -2094,7 +1918,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__27" + "$ref": "#/components/schemas/abc__APIErrorModel__23" } } }, @@ -2104,7 +1928,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__26" + "$ref": "#/components/schemas/abc__APIErrorModel__22" } } }, @@ -2114,7 +1938,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__25" + "$ref": "#/components/schemas/abc__APIErrorModel__21" } } }, @@ -2697,7 +2521,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__32" + "$ref": "#/components/schemas/abc__APIErrorModel__28" } } } @@ -2707,7 +2531,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__31" + "$ref": "#/components/schemas/abc__APIErrorModel__27" } } } @@ -2717,7 +2541,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__30" + "$ref": "#/components/schemas/abc__APIErrorModel__26" } } } @@ -2727,7 +2551,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__29" + "$ref": "#/components/schemas/abc__APIErrorModel__25" } } } @@ -12431,7 +12255,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__36" + "$ref": "#/components/schemas/abc__APIErrorModel__32" } } } @@ -12441,7 +12265,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__35" + "$ref": "#/components/schemas/abc__APIErrorModel__31" } } } @@ -12451,7 +12275,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__34" + "$ref": "#/components/schemas/abc__APIErrorModel__30" } } } @@ -12461,7 +12285,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__33" + "$ref": "#/components/schemas/abc__APIErrorModel__29" } } } @@ -13823,758 +13647,411 @@ } } }, - "/v1/chat/newsletters": { + "/v1/stories/{story_id}": { "get": { "tags": [ - "newsletters" + "stories" ], - "summary": "Get all created newsletters", - "description": "Get all created newsletters.", - "operationId": "get_newsletters", - "responses": { - "200": { - "description": "List of newsletters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaginatedResponse_NewsletterResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, + "summary": "Get a story containing updates", + "description": "Get a single news story given its UUID.", + "operationId": "get_story", "security": [ { "APIKey": [ - "chat" + "stories" ] } - ] - }, - "post": { - "tags": [ - "newsletters" ], - "summary": "Create a newsletter", - "description": "Create a newsletter.", - "operationId": "post_newsletter", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateNewsletterRequest" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Created newsletter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewsletterResponse" - } - } - } + "parameters": [ + { + "name": "story_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "The story UUID, update UUID, or URL safe title", + "title": "Story Id" + }, + "description": "The story UUID, update UUID, or URL safe title" }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ { - "APIKey": [ - "chat" - ] - } - ] - } - }, - "/v1/chat/newsletters/public": { - "get": { - "tags": [ - "newsletters" - ], - "summary": "Get all public newsletters", - "description": "Get all public newsletters.", - "operationId": "get_public_newsletters", - "security": [ + "name": "expand_updates", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to expand updates", + "default": true, + "title": "Expand Updates" + }, + "description": "Whether to expand updates" + }, { - "APIKey": [ - "chat" - ] - } - ], - "parameters": [ + "name": "max_updates", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "description": "Max number of updates to include in the story object", + "default": 10, + "title": "Max Updates" + }, + "description": "Max number of updates to include in the story object" + }, { - "name": "page", + "name": "max_articles", "in": "query", "required": false, "schema": { "type": "integer", - "description": "The page number to get", - "default": 1, - "title": "Page" + "description": "Max articles to include per update", + "default": 25, + "title": "Max Articles" }, - "description": "The page number to get" + "description": "Max articles to include per update" }, { - "name": "per_page", + "name": "reddit", "in": "query", "required": false, "schema": { "type": "integer", - "description": "The number of items per page", - "default": 10, - "title": "Per Page" + "description": "Whether to include Reddit analysis", + "default": 0, + "title": "Reddit" }, - "description": "The number of items per page" + "description": "Whether to include Reddit analysis" }, { - "name": "all", + "name": "citation_method", + "in": "query", + "required": false, + "schema": { + "enum": [ + "brackets", + "urls", + "none" + ], + "type": "string", + "description": "Method to use for citation filtering.", + "default": "brackets", + "title": "Citation Method" + }, + "description": "Method to use for citation filtering." + }, + { + "name": "condense_auxillary_updates", "in": "query", "required": false, "schema": { "type": "boolean", - "description": "Whether to get all the public newsletters", - "default": false, - "title": "All" + "description": "When requesting a particular story update, you can expand the assocaited updates by settined max_updates to the total you would like to get. If you want those updates to by condensed for reduced latency, you can set condense_auxillary_updates to 'False'.", + "default": true, + "title": "Condense Auxillary Updates" }, - "description": "Whether to get all the public newsletters" + "description": "When requesting a particular story update, you can expand the assocaited updates by settined max_updates to the total you would like to get. If you want those updates to by condensed for reduced latency, you can set condense_auxillary_updates to 'False'." } ], "responses": { "200": { - "description": "List of public newsletters.", + "description": "A story object containing updates", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedResponse_NewsletterPublicResponse_" + "$ref": "#/components/schemas/StoryResponse" } } } }, - "422": { - "description": "Validation Error", + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "$ref": "#/components/schemas/abc__APIErrorModel__36" } } - } - } - } - } - }, - "/v1/chat/newsletters/{newsletter_id}": { - "get": { - "tags": [ - "newsletters" - ], - "summary": "Get a newsletter", - "description": "Get a newsletter.", - "operationId": "get_newsletter", - "security": [ - { - "APIKey": [ - "chat" - ] - } - ], - "parameters": [ - { - "name": "newsletter_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "description": "The newsletter ID", - "title": "Newsletter Id" }, - "description": "The newsletter ID" - } - ], - "responses": { - "200": { - "description": "Returns newsletter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewsletterResponse" - } - } - } + "description": "Bad Request" }, - "422": { - "description": "Validation Error", + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "$ref": "#/components/schemas/abc__APIErrorModel__35" } } - } - } - } - }, - "put": { - "tags": [ - "newsletters" - ], - "summary": "Update a newsletter", - "description": "Update a newsletter.", - "operationId": "put_newsletter", - "security": [ - { - "APIKey": [ - "chat" - ] - } - ], - "parameters": [ - { - "name": "newsletter_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "description": "The newsletter ID", - "title": "Newsletter Id" }, - "description": "The newsletter ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateNewsletterRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Returns newsletter.", + "description": "Unauthorized" + }, + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewsletterResponse" + "$ref": "#/components/schemas/abc__APIErrorModel__34" } } - } + }, + "description": "Forbidden" }, - "422": { - "description": "Validation Error", + "405": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "$ref": "#/components/schemas/abc__APIErrorModel__33" } } - } - } - } - }, - "delete": { - "tags": [ - "newsletters" - ], - "summary": "Delete a newsletter", - "description": "Delete a newsletter.", - "operationId": "delete_newsletter", - "security": [ - { - "APIKey": [ - "chat" - ] - } - ], - "parameters": [ - { - "name": "newsletter_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "description": "The newsletter ID", - "title": "Newsletter Id" }, - "description": "The newsletter ID" - } - ], - "responses": { - "204": { - "description": "Successful Response" + "description": "Method Not Allowed" }, "422": { - "description": "Validation Error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "$ref": "#/components/schemas/ValidationErrorModel" } } - } - } - } - } - }, - "/v1/chat/newsletters/{newsletter_id}/unsubscribe": { - "post": { - "tags": [ - "newsletters" - ], - "summary": "Unsubscribe from a newsletter", - "description": "Unsubscribe from a newsletter.", - "operationId": "unsubscribe_newsletter", - "security": [ - { - "APIKey": [ - "chat", - "internal" - ] - } - ], - "parameters": [ - { - "name": "newsletter_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "description": "The newsletter ID", - "title": "Newsletter Id" }, - "description": "The newsletter ID" - } - ], - "responses": { - "204": { - "description": "Successful Response" + "description": "Unprocessable Entity" }, - "422": { - "description": "Validation Error", + "500": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "$ref": "#/components/schemas/asknews_api__errors__APIErrorModel" } } - } + }, + "description": "Internal Server Error" } } } }, - "/v1/chat/newsletters/{newsletter_id}/contacts": { + "/v1/stories": { "get": { "tags": [ - "newsletters" + "stories" ], - "summary": "Get newsletter contacts", - "description": "Get newsletter contacts.", - "operationId": "get_newsletter_contacts", + "summary": "Filter and search for top news narratives", + "description": "Filter on our custom, in-house written, stories/events/narratives.\n\nThese stories are based on clusters of articles (which come through this\nendpoint as well, so you can consider this a clustering endpoint). We write\nstories and track them through time.\n\nThe enrichments include a full Reddit overview (including all the thread metadata),\nas well as descriptions of the reporting voice, the key takeaways, contradictions,\nall the entities, and much, much more.\n\nYou can see this data in action, and filter it similarly at\n`https://asknews.app/stories`", + "operationId": "get_stories", "security": [ { "APIKey": [ - "chat" + "stories" ] } ], "parameters": [ { - "name": "newsletter_id", - "in": "path", - "required": true, + "name": "query", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid", - "description": "The newsletter ID", - "title": "Newsletter Id" - }, - "description": "The newsletter ID" - } - ], - "responses": { - "200": { - "description": "Returns newsletter contacts.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NewsletterContactResponse" - }, - "title": "Response 200 Get Newsletter Contacts" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - } - } + ], + "description": "Query to be used for the search. If method='nl', then this will beused as a natural language query. If method='kw', then this willbe used as a direct keyword query.", + "title": "Query" + }, + "description": "Query to be used for the search. If method='nl', then this will beused as a natural language query. If method='kw', then this willbe used as a direct keyword query." }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "post": { - "tags": [ - "newsletters" - ], - "summary": "Create a newsletter contact", - "description": "Create a newsletter contact.", - "operationId": "post_newsletter_contacts", - "security": [ { - "APIKey": [ - "chat" - ] - } - ], - "parameters": [ - { - "name": "newsletter_id", - "in": "path", - "required": true, + "name": "categories", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid", - "description": "The newsletter ID", - "title": "Newsletter Id" + "type": "array", + "items": { + "enum": [ + "Politics", + "Economy", + "Finance", + "Science", + "Technology", + "Sports", + "Climate", + "Environment", + "Culture", + "Entertainment", + "Business", + "Health", + "International" + ], + "type": "string" + }, + "description": "Categories to use for filtering the stories search", + "default": [], + "title": "Categories" }, - "description": "The newsletter ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewsletterContactRequest" - } - } - } - }, - "responses": { - "201": { - "description": "Newsletter contact", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewsletterContactCreateResponse" - } - } - } + "description": "Categories to use for filtering the stories search" }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}": { - "get": { - "tags": [ - "newsletters" - ], - "summary": "Get a newsletter contact", - "description": "Get a newsletter contact.", - "operationId": "get_newsletter_contact", - "security": [ - { - "APIKey": [ - "chat" - ] - } - ], - "parameters": [ { - "name": "newsletter_id", - "in": "path", - "required": true, + "name": "uuids", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid", - "description": "The newsletter ID", - "title": "Newsletter Id" + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "description": "A list of UUIDs to retrieve.", + "default": [], + "title": "Uuids" }, - "description": "The newsletter ID" + "description": "A list of UUIDs to retrieve." }, { - "name": "contact_id", - "in": "path", - "required": true, + "name": "start_timestamp", + "in": "query", + "required": false, "schema": { - "type": "string", - "description": "The contact ID", - "title": "Contact Id" - }, - "description": "The contact ID" - } - ], - "responses": { - "200": { - "description": "Returns newsletter contact.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewsletterContactResponse" + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" } - } - } + ], + "description": "Start timestamp to filter results on.", + "title": "Start Timestamp" + }, + "description": "Start timestamp to filter results on." }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "patch": { - "tags": [ - "newsletters" - ], - "summary": "Update a newsletter contact", - "description": "Update a newsletter contact.", - "operationId": "patch_newsletter_contact", - "security": [ - { - "APIKey": [ - "chat" - ] - } - ], - "parameters": [ { - "name": "newsletter_id", - "in": "path", - "required": true, + "name": "end_timestamp", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid", - "description": "The newsletter ID", - "title": "Newsletter Id" + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "End timestamp to filter results on.", + "title": "End Timestamp" }, - "description": "The newsletter ID" + "description": "End timestamp to filter results on." }, { - "name": "contact_id", - "in": "path", - "required": true, + "name": "sort_by", + "in": "query", + "required": false, "schema": { - "type": "string", - "description": "The contact ID", - "title": "Contact Id" - }, - "description": "The contact ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewsletterContactRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Returns newsletter contact.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewsletterContactUpdateResponse" + "anyOf": [ + { + "enum": [ + "published", + "coverage", + "sentiment", + "relevance", + "confidence" + ], + "type": "string" + }, + { + "type": "null" } - } - } + ], + "description": "Which type of sorting to perform.\npublished: Sort by published date.\ncoverage: Sort by coverage.\nsentiment: Sort by sentiment.\nrelevance: Sort by relevance of similarity score/ranking.", + "title": "Sort By" + }, + "description": "Which type of sorting to perform.\npublished: Sort by published date.\ncoverage: Sort by coverage.\nsentiment: Sort by sentiment.\nrelevance: Sort by relevance of similarity score/ranking." }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "newsletters" - ], - "summary": "Delete a newsletter contact", - "description": "Delete a newsletter contact.", - "operationId": "delete_newsletter_contact", - "security": [ { - "APIKey": [ - "chat" - ] - } - ], - "parameters": [ - { - "name": "newsletter_id", - "in": "path", - "required": true, + "name": "sort_type", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid", - "description": "The newsletter ID", - "title": "Newsletter Id" + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Whether to sort results in ascending or descending order.", + "title": "Sort Type" }, - "description": "The newsletter ID" + "description": "Whether to sort results in ascending or descending order." }, { - "name": "contact_id", - "in": "path", - "required": true, + "name": "continent", + "in": "query", + "required": false, "schema": { - "type": "string", - "description": "The contact ID", - "title": "Contact Id" - }, - "description": "The contact ID" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "anyOf": [ + { + "type": "array", + "items": { + "enum": [ + "Africa", + "Asia", + "Europe", + "Middle East", + "North America", + "South America", + "Oceania" + ], + "type": "string" + } + }, + { + "type": "string" + }, + { + "type": "null" } - } - } - } - } - } - }, - "/v1/chat/charts": { - "post": { - "tags": [ - "charts" - ], - "summary": "Create a chart", - "description": "Create charts.", - "operationId": "create_charts_endpoint", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateChartRequest" - } - } + ], + "description": "Continents to filter by.", + "title": "Continent" + }, + "description": "Continents to filter by." }, - "required": true - }, - "responses": { - "200": { - "description": "Returns chart data.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChartResponse" + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" } - } - } + ], + "description": "Offset to use", + "default": 0, + "title": "Offset" + }, + "description": "Offset to use" }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "APIKey": [ - "chat" - ] - } - ] - } - }, - "/v1/stories/{story_id}": { - "get": { - "tags": [ - "stories" - ], - "summary": "Get a story containing updates", - "description": "Get a single news story given its UUID.", - "operationId": "get_story", - "security": [ - { - "APIKey": [ - "stories" - ] - } - ], - "parameters": [ { - "name": "story_id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, "schema": { - "type": "string", - "description": "The story UUID, update UUID, or URL safe title", - "title": "Story Id" + "type": "integer", + "description": "Limit to use", + "default": 10, + "title": "Limit" }, - "description": "The story UUID, update UUID, or URL safe title" + "description": "Limit to use" }, { "name": "expand_updates", @@ -14583,7 +14060,7 @@ "schema": { "type": "boolean", "description": "Whether to expand updates", - "default": true, + "default": false, "title": "Expand Updates" }, "description": "Whether to expand updates" @@ -14594,11 +14071,11 @@ "required": false, "schema": { "type": "integer", - "description": "Max number of updates to include in the story object", - "default": 10, + "description": "Max updates to use", + "default": 2, "title": "Max Updates" }, - "description": "Max number of updates to include in the story object" + "description": "Max updates to use" }, { "name": "max_articles", @@ -14606,11 +14083,49 @@ "required": false, "schema": { "type": "integer", - "description": "Max articles to include per update", - "default": 25, + "description": "Max articles to use per update", + "default": 5, "title": "Max Articles" }, - "description": "Max articles to include per update" + "description": "Max articles to use per update" + }, + { + "name": "method", + "in": "query", + "required": false, + "schema": { + "enum": [ + "nl", + "kw", + "both" + ], + "type": "string", + "description": "Method to use for query, 'nl' means natural language, and will run a semantic search on the stories database. 'kw' means keyword, and will search by keyword on the stories database. 'both' means that both methods will be used and results will be ranked according to IRR.", + "default": "kw", + "title": "Method" + }, + "description": "Method to use for query, 'nl' means natural language, and will run a semantic search on the stories database. 'kw' means keyword, and will search by keyword on the stories database. 'both' means that both methods will be used and results will be ranked according to IRR." + }, + { + "name": "obj_type", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "enum": [ + "story", + "story_update" + ], + "type": "string" + }, + "description": "Object type to filter by, can be a list with 'story' and/or 'story_update'", + "default": [ + "story" + ], + "title": "Obj Type" + }, + "description": "Object type to filter by, can be a list with 'story' and/or 'story_update'" }, { "name": "reddit", @@ -14618,11 +14133,11 @@ "required": false, "schema": { "type": "integer", - "description": "Whether to include Reddit analysis", + "description": "Whether or not to include Reddit analysiswhere the integer indicates the number of threadsto include in the response. 0 is default. Requirespaid plan to access.", "default": 0, "title": "Reddit" }, - "description": "Whether to include Reddit analysis" + "description": "Whether or not to include Reddit analysiswhere the integer indicates the number of threadsto include in the response. 0 is default. Requirespaid plan to access." }, { "name": "citation_method", @@ -14642,41 +14157,78 @@ "description": "Method to use for citation filtering." }, { - "name": "condense_auxillary_updates", + "name": "similarity_score_threshold", "in": "query", "required": false, "schema": { - "type": "boolean", - "description": "When requesting a particular story update, you can expand the assocaited updates by settined max_updates to the total you would like to get. If you want those updates to by condensed for reduced latency, you can set condense_auxillary_updates to 'False'.", - "default": true, - "title": "Condense Auxillary Updates" - }, - "description": "When requesting a particular story update, you can expand the assocaited updates by settined max_updates to the total you would like to get. If you want those updates to by condensed for reduced latency, you can set condense_auxillary_updates to 'False'." - } - ], - "responses": { - "200": { - "description": "A story object containing updates", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StoryResponse" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__40" - } - } + "type": "number", + "description": "Similarity score threshold to use when using query", + "default": 0.75, + "title": "Similarity Score Threshold" }, - "description": "Bad Request" + "description": "Similarity score threshold to use when using query" }, - "401": { - "content": { + { + "name": "provocative", + "in": "query", + "required": false, + "schema": { + "enum": [ + "unknown", + "low", + "medium", + "high", + "all" + ], + "type": "string", + "description": "Filter stories based on how provocative the underlying articles are deemed based on the use of provocative language and emotional vocabulary.", + "default": "all", + "title": "Provocative" + }, + "description": "Filter stories based on how provocative the underlying articles are deemed based on the use of provocative language and emotional vocabulary." + }, + { + "name": "strategy", + "in": "query", + "required": false, + "schema": { + "enum": [ + "default", + "topstories", + "topstories_categories", + "topstories_continents" + ], + "type": "string", + "description": "Strategy to use for automatically controlling the search. 'default' is the default strategy, which follows all filters faithfully. 'topstories' aims to give a diverse look at top news stories that are relevant to the current filter combination.'topstories_categories' aims to give the top stories for each category. 'topstories_continents' aims to give the top stories for each continent.", + "default": "default", + "title": "Strategy" + }, + "description": "Strategy to use for automatically controlling the search. 'default' is the default strategy, which follows all filters faithfully. 'topstories' aims to give a diverse look at top news stories that are relevant to the current filter combination.'topstories_categories' aims to give the top stories for each category. 'topstories_continents' aims to give the top stories for each continent." + } + ], + "responses": { + "200": { + "description": "A list of stories with updates", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StoriesResponse" + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__40" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/abc__APIErrorModel__39" @@ -14728,268 +14280,223 @@ } } }, - "/v1/stories": { + "/v1/profiles/me": { "get": { "tags": [ - "stories" - ], - "summary": "Filter and search for top news narratives", - "description": "Filter on our custom, in-house written, stories/events/narratives.\n\nThese stories are based on clusters of articles (which come through this\nendpoint as well, so you can consider this a clustering endpoint). We write\nstories and track them through time.\n\nThe enrichments include a full Reddit overview (including all the thread metadata),\nas well as descriptions of the reporting voice, the key takeaways, contradictions,\nall the entities, and much, much more.\n\nYou can see this data in action, and filter it similarly at\n`https://asknews.app/stories`", - "operationId": "get_stories", - "security": [ - { - "APIKey": [ - "stories" - ] - } + "profile" ], - "parameters": [ - { - "name": "query", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" + "summary": "Get the current user's profile", + "description": "Get the current profile", + "operationId": "get_user_profile", + "responses": { + "200": { + "description": "A profile object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileResponse" } - ], - "description": "Query to be used for the search. If method='nl', then this will beused as a natural language query. If method='kw', then this willbe used as a direct keyword query.", - "title": "Query" - }, - "description": "Query to be used for the search. If method='nl', then this will beused as a natural language query. If method='kw', then this willbe used as a direct keyword query." + } + } }, - { - "name": "categories", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "enum": [ - "Politics", - "Economy", - "Finance", - "Science", - "Technology", - "Sports", - "Climate", - "Environment", - "Culture", - "Entertainment", - "Business", - "Health", - "International" - ], - "type": "string" - }, - "description": "Categories to use for filtering the stories search", - "default": [], - "title": "Categories" - }, - "description": "Categories to use for filtering the stories search" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__44" + } + } + } }, - { - "name": "uuids", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "description": "A list of UUIDs to retrieve.", - "default": [], - "title": "Uuids" - }, - "description": "A list of UUIDs to retrieve." + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__43" + } + } + } }, - { - "name": "start_timestamp", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__42" } - ], - "description": "Start timestamp to filter results on.", - "title": "Start Timestamp" - }, - "description": "Start timestamp to filter results on." + } + } }, - { - "name": "end_timestamp", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__41" } - ], - "description": "End timestamp to filter results on.", - "title": "End Timestamp" - }, - "description": "End timestamp to filter results on." + } + } }, - { - "name": "sort_by", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "enum": [ - "published", - "coverage", - "sentiment", - "relevance", - "confidence" - ], - "type": "string" - }, - { - "type": "null" + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorModel" } - ], - "description": "Which type of sorting to perform.\npublished: Sort by published date.\ncoverage: Sort by coverage.\nsentiment: Sort by sentiment.\nrelevance: Sort by relevance of similarity score/ranking.", - "title": "Sort By" - }, - "description": "Which type of sorting to perform.\npublished: Sort by published date.\ncoverage: Sort by coverage.\nsentiment: Sort by sentiment.\nrelevance: Sort by relevance of similarity score/ranking." + } + } }, - { - "name": "sort_type", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - { - "type": "null" + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/asknews_api__errors__APIErrorModel" } - ], - "description": "Whether to sort results in ascending or descending order.", - "title": "Sort Type" - }, - "description": "Whether to sort results in ascending or descending order." - }, + } + } + } + }, + "security": [ { - "name": "continent", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "enum": [ - "Africa", - "Asia", - "Europe", - "Middle East", - "North America", - "South America", - "Oceania" - ], - "type": "string" - } - }, - { - "type": "string" - }, - { - "type": "null" + "APIKey": [ + "profile" + ] + } + ] + } + }, + "/v1/profiles/me/limits": { + "get": { + "tags": [ + "profile" + ], + "summary": "Get the current user's rate limit status", + "description": "Return the caller's current rate-limit and concurrency-limit state without consuming any tokens.", + "operationId": "get_rate_limit_status", + "responses": { + "200": { + "description": "Current rate limit and concurrency state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitStatusResponse" } - ], - "description": "Continents to filter by.", - "title": "Continent" - }, - "description": "Continents to filter by." + } + } }, - { - "name": "offset", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__48" } - ], - "description": "Offset to use", - "default": 0, - "title": "Offset" - }, - "description": "Offset to use" + } + } }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "description": "Limit to use", - "default": 10, - "title": "Limit" - }, - "description": "Limit to use" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__47" + } + } + } }, - { - "name": "expand_updates", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Whether to expand updates", - "default": false, - "title": "Expand Updates" - }, - "description": "Whether to expand updates" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__46" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__45" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorModel" + } + } + } }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/asknews_api__errors__APIErrorModel" + } + } + } + } + }, + "security": [ { - "name": "max_updates", + "APIKey": [] + } + ] + } + }, + "/v1/reddit/search": { + "get": { + "tags": [ + "reddit" + ], + "summary": "Search Reddit, summarize threads, and return analysis.", + "description": "Go to Reddit, search threads, summarize the threads, return analysis.\n`deep`=True is a live web scrape, AskNews searches Reddit, finds threads,\nsummarizes them, analyzes them, and returns the results. `deep`=False\nis a search in AskNews' existing database of Reddit threads.", + "operationId": "search_reddit", + "security": [ + { + "APIKey": [ + "news" + ] + } + ], + "parameters": [ + { + "name": "keywords", "in": "query", - "required": false, + "required": true, "schema": { - "type": "integer", - "description": "Max updates to use", - "default": 2, - "title": "Max Updates" + "type": "array", + "items": { + "type": "string" + }, + "description": "Keywords used to search for relevant Reddit threads.", + "title": "Keywords" }, - "description": "Max updates to use" + "description": "Keywords used to search for relevant Reddit threads." }, { - "name": "max_articles", + "name": "n_threads", "in": "query", "required": false, "schema": { "type": "integer", - "description": "Max articles to use per update", + "description": "Number of Reddit threads to summarize and return", "default": 5, - "title": "Max Articles" + "title": "N Threads" }, - "description": "Max articles to use per update" + "description": "Number of Reddit threads to summarize and return" }, { "name": "method", @@ -14998,123 +14505,91 @@ "schema": { "enum": [ "nl", - "kw", - "both" + "kw" ], "type": "string", - "description": "Method to use for query, 'nl' means natural language, and will run a semantic search on the stories database. 'kw' means keyword, and will search by keyword on the stories database. 'both' means that both methods will be used and results will be ranked according to IRR.", + "description": "The search method. Can be 'nl' or 'kw'. If 'nl', then the query will be used as a natural language query. If 'kw', then the query will be used as a direct keyword query.", "default": "kw", "title": "Method" }, - "description": "Method to use for query, 'nl' means natural language, and will run a semantic search on the stories database. 'kw' means keyword, and will search by keyword on the stories database. 'both' means that both methods will be used and results will be ranked according to IRR." + "description": "The search method. Can be 'nl' or 'kw'. If 'nl', then the query will be used as a natural language query. If 'kw', then the query will be used as a direct keyword query." }, { - "name": "obj_type", + "name": "deep", "in": "query", "required": false, "schema": { - "type": "array", - "items": { - "enum": [ - "story", - "story_update" - ], - "type": "string" - }, - "description": "Object type to filter by, can be a list with 'story' and/or 'story_update'", - "default": [ - "story" - ], - "title": "Obj Type" + "type": "boolean", + "description": "Deep means that AskNews goes directly to Reddit, searches live, summarizes the threads live, and returns structured data for you. Deep=False means that AskNews looks in its existing database of Reddit threads and returns the most similar threads ", + "default": false, + "title": "Deep" }, - "description": "Object type to filter by, can be a list with 'story' and/or 'story_update'" + "description": "Deep means that AskNews goes directly to Reddit, searches live, summarizes the threads live, and returns structured data for you. Deep=False means that AskNews looks in its existing database of Reddit threads and returns the most similar threads " }, { - "name": "reddit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "description": "Whether or not to include Reddit analysiswhere the integer indicates the number of threadsto include in the response. 0 is default. Requirespaid plan to access.", - "default": 0, - "title": "Reddit" - }, - "description": "Whether or not to include Reddit analysiswhere the integer indicates the number of threadsto include in the response. 0 is default. Requirespaid plan to access." - }, - { - "name": "citation_method", + "name": "return_type", "in": "query", "required": false, "schema": { "enum": [ - "brackets", - "urls", - "none" + "dicts", + "string", + "both" ], "type": "string", - "description": "Method to use for citation filtering.", - "default": "brackets", - "title": "Citation Method" - }, - "description": "Method to use for citation filtering." - }, - { - "name": "similarity_score_threshold", - "in": "query", - "required": false, - "schema": { - "type": "number", - "description": "Similarity score threshold to use when using query", - "default": 0.75, - "title": "Similarity Score Threshold" + "description": "The return type. Can be 'dicts', 'string', or 'both'.", + "default": "string", + "title": "Return Type" }, - "description": "Similarity score threshold to use when using query" + "description": "The return type. Can be 'dicts', 'string', or 'both'." }, { - "name": "provocative", + "name": "time_filter", "in": "query", "required": false, "schema": { "enum": [ - "unknown", - "low", - "medium", - "high", + "hour", + "day", + "week", + "month", + "year", "all" ], "type": "string", - "description": "Filter stories based on how provocative the underlying articles are deemed based on the use of provocative language and emotional vocabulary.", - "default": "all", - "title": "Provocative" + "description": "The time filter.", + "default": "day", + "title": "Time Filter" }, - "description": "Filter stories based on how provocative the underlying articles are deemed based on the use of provocative language and emotional vocabulary." + "description": "The time filter." }, { - "name": "strategy", + "name": "sort", "in": "query", "required": false, "schema": { "enum": [ - "default", - "topstories", - "topstories_categories", - "topstories_continents" + "relevance", + "hot", + "top", + "new", + "comments" ], "type": "string", - "description": "Strategy to use for automatically controlling the search. 'default' is the default strategy, which follows all filters faithfully. 'topstories' aims to give a diverse look at top news stories that are relevant to the current filter combination.'topstories_categories' aims to give the top stories for each category. 'topstories_continents' aims to give the top stories for each continent.", - "default": "default", - "title": "Strategy" + "description": "The sort order.", + "default": "relevance", + "title": "Sort" }, - "description": "Strategy to use for automatically controlling the search. 'default' is the default strategy, which follows all filters faithfully. 'topstories' aims to give a diverse look at top news stories that are relevant to the current filter combination.'topstories_categories' aims to give the top stories for each category. 'topstories_continents' aims to give the top stories for each continent." + "description": "The sort order." } ], "responses": { "200": { - "description": "A list of stories with updates", + "description": "The summarized Reddit threads.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StoriesResponse" + "$ref": "#/components/schemas/RedditResponse" } } } @@ -15123,7 +14598,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__44" + "$ref": "#/components/schemas/abc__APIErrorModel__52" } } }, @@ -15133,7 +14608,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__43" + "$ref": "#/components/schemas/abc__APIErrorModel__51" } } }, @@ -15143,7 +14618,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__42" + "$ref": "#/components/schemas/abc__APIErrorModel__50" } } }, @@ -15153,7 +14628,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__41" + "$ref": "#/components/schemas/abc__APIErrorModel__49" } } }, @@ -15182,119 +14657,102 @@ } } }, - "/v1/analytics/finance/sentiment": { + "/v1/distribution/domains/top_n": { "get": { "tags": [ - "analytics" + "distribution" ], - "summary": "Get a timeseries of finance news sentiment for assets", - "description": "Get the news sentiment for a given asset during a provided period of time.\n\nThis endpoint is good for narrow AI, like using in combination with a regressor\nto forecast prices etc.", - "operationId": "get_asset_sentiment", + "summary": "Get the top N domains by hits", + "description": "Get the top N domains by hits.", + "operationId": "top_n_domains_by_hits", "security": [ { "APIKey": [ - "analytics" + "distribution", + "internal" ] } ], "parameters": [ { - "name": "asset", + "name": "limit", "in": "query", - "required": true, + "required": false, "schema": { - "enum": [ - "bitcoin", - "ethereum", - "cardano", - "uniswap", - "ripple", - "solana", - "polkadot", - "polygon", - "chainlink", - "tether", - "dogecoin", - "monero", - "tron", - "binance", - "aave", - "tesla", - "microsoft", - "amazon" - ], - "type": "string", - "description": "The asset name to query for sentiment.", - "title": "Asset" + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Number of top domains to return", + "default": 10, + "title": "Limit" }, - "description": "The asset name to query for sentiment." + "description": "Number of top domains to return" }, { - "name": "metric", + "name": "start_date", "in": "query", "required": false, "schema": { - "enum": [ - "news_positive", - "news_negative", - "news_total", - "news_positive_weighted", - "news_negative_weighted", - "news_total_weighted" + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } ], - "type": "string", - "description": "The metric to obtain. Weighted metrics account for page-rank of original source. Higher page rank sources are weighted more heavily.", - "default": "news_positive", - "title": "Metric" + "description": "Start date to filter by (timestamp in seconds since epoch)", + "title": "Start Date" }, - "description": "The metric to obtain. Weighted metrics account for page-rank of original source. Higher page rank sources are weighted more heavily." + "description": "Start date to filter by (timestamp in seconds since epoch)" }, { - "name": "date_from", + "name": "end_date", "in": "query", "required": false, "schema": { "anyOf": [ { - "type": "string", - "format": "date-time" + "type": "integer" }, { "type": "null" } ], - "description": "The start date in ISO format", - "title": "Date From" + "description": "End date to filter by (timestamp in seconds since epoch)", + "title": "End Date" }, - "description": "The start date in ISO format" + "description": "End date to filter by (timestamp in seconds since epoch)" }, { - "name": "date_to", + "name": "names", "in": "query", "required": false, "schema": { "anyOf": [ { - "type": "string", - "format": "date-time" + "type": "array", + "items": { + "type": "string" + } }, { "type": "null" } ], - "description": "The end date in ISO format", - "title": "Date To" + "description": "List of domain names to filter by", + "title": "Names" }, - "description": "The end date in ISO format" + "description": "List of domain names to filter by" } ], "responses": { "200": { - "description": "The timeseries sentiment for an asset or cryptocurrency", + "description": "A list of top domains with their hit counts", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FinanceResponse" + "$ref": "#/components/schemas/TopNDomainsByHitsResponse" } } } @@ -15303,7 +14761,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__48" + "$ref": "#/components/schemas/abc__APIErrorModel__56" } } }, @@ -15313,7 +14771,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__47" + "$ref": "#/components/schemas/abc__APIErrorModel__55" } } }, @@ -15323,7 +14781,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__46" + "$ref": "#/components/schemas/abc__APIErrorModel__54" } } }, @@ -15333,7 +14791,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__45" + "$ref": "#/components/schemas/abc__APIErrorModel__53" } } }, @@ -15362,316 +14820,133 @@ } } }, - "/v1/profiles/me": { + "/v1/distribution/domains": { "get": { "tags": [ - "profile" + "distribution" ], - "summary": "Get the current user's profile", - "description": "Get the current profile", - "operationId": "get_user_profile", - "responses": { - "200": { - "description": "A profile object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProfileResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__52" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__51" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__50" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__49" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorModel" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/asknews_api__errors__APIErrorModel" - } - } - } - } - }, + "summary": "Find domains", + "description": "Find domains with optional filters.", + "operationId": "find_domains", "security": [ { "APIKey": [ - "profile" - ] - } - ] - } - }, - "/v1/profiles/me/limits": { - "get": { - "tags": [ - "profile" - ], - "summary": "Get the current user's rate limit status", - "description": "Return the caller's current rate-limit and concurrency-limit state without consuming any tokens.", - "operationId": "get_rate_limit_status", - "responses": { - "200": { - "description": "Current rate limit and concurrency state", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitStatusResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__56" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__55" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__54" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__53" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorModel" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/asknews_api__errors__APIErrorModel" - } - } - } - } - }, - "security": [ - { - "APIKey": [] - } - ] - } - }, - "/v1/reddit/search": { - "get": { - "tags": [ - "reddit" - ], - "summary": "Search Reddit, summarize threads, and return analysis.", - "description": "Go to Reddit, search threads, summarize the threads, return analysis.\n`deep`=True is a live web scrape, AskNews searches Reddit, finds threads,\nsummarizes them, analyzes them, and returns the results. `deep`=False\nis a search in AskNews' existing database of Reddit threads.", - "operationId": "search_reddit", - "security": [ - { - "APIKey": [ - "news" + "distribution", + "internal" ] } ], "parameters": [ { - "name": "keywords", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Keywords used to search for relevant Reddit threads.", - "title": "Keywords" - }, - "description": "Keywords used to search for relevant Reddit threads." - }, - { - "name": "n_threads", + "name": "page", "in": "query", "required": false, "schema": { "type": "integer", - "description": "Number of Reddit threads to summarize and return", - "default": 5, - "title": "N Threads" + "minimum": 1, + "description": "Page number for pagination", + "default": 1, + "title": "Page" }, - "description": "Number of Reddit threads to summarize and return" + "description": "Page number for pagination" }, { - "name": "method", + "name": "per_page", "in": "query", "required": false, "schema": { - "enum": [ - "nl", - "kw" - ], - "type": "string", - "description": "The search method. Can be 'nl' or 'kw'. If 'nl', then the query will be used as a natural language query. If 'kw', then the query will be used as a direct keyword query.", - "default": "kw", - "title": "Method" + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Number of items per page", + "default": 10, + "title": "Per Page" }, - "description": "The search method. Can be 'nl' or 'kw'. If 'nl', then the query will be used as a natural language query. If 'kw', then the query will be used as a direct keyword query." + "description": "Number of items per page" }, { - "name": "deep", + "name": "names", "in": "query", "required": false, "schema": { - "type": "boolean", - "description": "Deep means that AskNews goes directly to Reddit, searches live, summarizes the threads live, and returns structured data for you. Deep=False means that AskNews looks in its existing database of Reddit threads and returns the most similar threads ", - "default": false, - "title": "Deep" + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "List of domain names to filter by", + "title": "Names" }, - "description": "Deep means that AskNews goes directly to Reddit, searches live, summarizes the threads live, and returns structured data for you. Deep=False means that AskNews looks in its existing database of Reddit threads and returns the most similar threads " + "description": "List of domain names to filter by" }, { - "name": "return_type", + "name": "is_tollbit", "in": "query", "required": false, "schema": { - "enum": [ - "dicts", - "string", - "both" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } ], - "type": "string", - "description": "The return type. Can be 'dicts', 'string', or 'both'.", - "default": "string", - "title": "Return Type" + "description": "Filter by tollbit status", + "title": "Is Tollbit" }, - "description": "The return type. Can be 'dicts', 'string', or 'both'." + "description": "Filter by tollbit status" }, { - "name": "time_filter", + "name": "publisher", "in": "query", "required": false, "schema": { - "enum": [ - "hour", - "day", - "week", - "month", - "year", - "all" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } ], - "type": "string", - "description": "The time filter.", - "default": "day", - "title": "Time Filter" + "description": "Filter by publisher status", + "title": "Publisher" }, - "description": "The time filter." + "description": "Filter by publisher status" }, { - "name": "sort", + "name": "full_text", "in": "query", "required": false, "schema": { - "enum": [ - "relevance", - "hot", - "top", - "new", - "comments" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } ], - "type": "string", - "description": "The sort order.", - "default": "relevance", - "title": "Sort" + "description": "Filter by full-text opt-in status", + "title": "Full Text" }, - "description": "The sort order." + "description": "Filter by full-text opt-in status" } ], "responses": { "200": { - "description": "The summarized Reddit threads.", + "description": "A paginated list of domains", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RedditResponse" + "$ref": "#/components/schemas/PaginatedResponse_ReadDomainResponse_" } } } @@ -15739,14 +15014,14 @@ } } }, - "/v1/distribution/domains/top_n": { + "/v1/distribution/domains/{name}": { "get": { "tags": [ "distribution" ], - "summary": "Get the top N domains by hits", - "description": "Get the top N domains by hits.", - "operationId": "top_n_domains_by_hits", + "summary": "Get a domain by name", + "description": "Get a domain.", + "operationId": "get_domain", "security": [ { "APIKey": [ @@ -15757,97 +15032,35 @@ ], "parameters": [ { - "name": "limit", - "in": "query", - "required": false, + "name": "name", + "in": "path", + "required": true, "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Number of top domains to return", - "default": 10, - "title": "Limit" + "type": "string", + "title": "Name" + } + } + ], + "responses": { + "200": { + "description": "Response for getting a domain", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReadDomainResponse" + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/abc__APIErrorModel__64" + } + } }, - "description": "Number of top domains to return" - }, - { - "name": "start_date", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "Start date to filter by (timestamp in seconds since epoch)", - "title": "Start Date" - }, - "description": "Start date to filter by (timestamp in seconds since epoch)" - }, - { - "name": "end_date", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "End date to filter by (timestamp in seconds since epoch)", - "title": "End Date" - }, - "description": "End date to filter by (timestamp in seconds since epoch)" - }, - { - "name": "names", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "List of domain names to filter by", - "title": "Names" - }, - "description": "List of domain names to filter by" - } - ], - "responses": { - "200": { - "description": "A list of top domains with their hit counts", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TopNDomainsByHitsResponse" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__64" - } - } - }, - "description": "Bad Request" + "description": "Bad Request" }, "401": { "content": { @@ -15902,133 +15115,124 @@ } } }, - "/v1/distribution/domains": { + "/v1/distribution/articles/top_n_for_domains": { "get": { "tags": [ "distribution" ], - "summary": "Find domains", - "description": "Find domains with optional filters.", - "operationId": "find_domains", + "summary": "Get the top N articles by metric for domains", + "description": "Get the top N domain articles ranked by the selected metric.", + "operationId": "top_n_articles_for_domains", "security": [ { "APIKey": [ - "distribution", - "internal" + "distribution" ] } ], "parameters": [ { - "name": "page", + "name": "domain_names", "in": "query", - "required": false, + "required": true, "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number for pagination", - "default": 1, - "title": "Page" + "type": "array", + "items": { + "type": "string" + }, + "description": "Domain names to filter by", + "title": "Domain Names" }, - "description": "Page number for pagination" + "description": "Domain names to filter by" }, { - "name": "per_page", + "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, - "description": "Number of items per page", + "description": "Number of top domain articles to return (page size)", "default": 10, - "title": "Per Page" + "title": "Limit" }, - "description": "Number of items per page" + "description": "Number of top domain articles to return (page size)" }, { - "name": "names", + "name": "page", "in": "query", "required": false, "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "List of domain names to filter by", - "title": "Names" + "type": "integer", + "minimum": 1, + "description": "Page number (1-based; page size = limit)", + "default": 1, + "title": "Page" }, - "description": "List of domain names to filter by" + "description": "Page number (1-based; page size = limit)" }, { - "name": "is_tollbit", + "name": "start_date", "in": "query", "required": false, "schema": { "anyOf": [ { - "type": "boolean" + "type": "integer" }, { "type": "null" } ], - "description": "Filter by tollbit status", - "title": "Is Tollbit" + "description": "Start date to filter by (timestamp in seconds since epoch)", + "title": "Start Date" }, - "description": "Filter by tollbit status" + "description": "Start date to filter by (timestamp in seconds since epoch)" }, { - "name": "publisher", + "name": "end_date", "in": "query", "required": false, "schema": { "anyOf": [ { - "type": "boolean" + "type": "integer" }, { "type": "null" } ], - "description": "Filter by publisher status", - "title": "Publisher" + "description": "End date to filter by (timestamp in seconds since epoch)", + "title": "End Date" }, - "description": "Filter by publisher status" + "description": "End date to filter by (timestamp in seconds since epoch)" }, { - "name": "full_text", + "name": "metric", "in": "query", "required": false, "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } + "enum": [ + "surface", + "citation", + "grounded" ], - "description": "Filter by full-text opt-in status", - "title": "Full Text" + "type": "string", + "description": "Metric used to rank and count the returned articles", + "default": "surface", + "title": "Metric" }, - "description": "Filter by full-text opt-in status" + "description": "Metric used to rank and count the returned articles" } ], "responses": { "200": { - "description": "A paginated list of domains", + "description": "A list of top domain articles with raw counts for the selected ranking metric", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedResponse_ReadDomainResponse_" + "$ref": "#/components/schemas/TopNArticlesForDomainResponse" } } } @@ -16096,14 +15300,14 @@ } } }, - "/v1/distribution/domains/{name}": { + "/v1/distribution/articles/top_n_for_domain_timeseries": { "get": { "tags": [ "distribution" ], - "summary": "Get a domain by name", - "description": "Get a domain.", - "operationId": "get_domain", + "summary": "Get the top N articles by hits for domain with daily breakdown", + "description": "Get the top N domain articles by hits with daily breakdown.", + "operationId": "top_n_articles_for_domain_timeseries", "security": [ { "APIKey": [ @@ -16114,22 +15318,74 @@ ], "parameters": [ { - "name": "name", - "in": "path", + "name": "domain_name", + "in": "query", "required": true, "schema": { "type": "string", - "title": "Name" - } + "description": "Domain name to filter by", + "title": "Domain Name" + }, + "description": "Domain name to filter by" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "description": "Number of top domain articles to return per day", + "default": 10, + "title": "Limit" + }, + "description": "Number of top domain articles to return per day" + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Start date to filter by (timestamp in seconds since epoch)", + "title": "Start Date" + }, + "description": "Start date to filter by (timestamp in seconds since epoch)" + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "End date to filter by (timestamp in seconds since epoch)", + "title": "End Date" + }, + "description": "End date to filter by (timestamp in seconds since epoch)" } ], "responses": { "200": { - "description": "Response for getting a domain", + "description": "A list of top domain articles with their hit counts grouped by day", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReadDomainResponse" + "$ref": "#/components/schemas/TopNArticlesTimeseriesResponse" } } } @@ -16197,49 +15453,36 @@ } } }, - "/v1/distribution/articles/top_n_for_domains": { + "/v1/distribution/articles/top_n": { "get": { "tags": [ "distribution" ], - "summary": "Get the top N articles by hits for domains", - "description": "Get the top N domain articles by hits.", - "operationId": "top_n_articles_for_domains", + "summary": "Get the top N articles by hits", + "description": "Get the top N articles by hits.", + "operationId": "top_n_articles_by_hits", "security": [ { "APIKey": [ - "distribution" + "distribution", + "internal" ] } ], "parameters": [ { - "name": "domain_names", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Domain names to filter by", - "title": "Domain Names" - }, - "description": "Domain names to filter by" - }, - { - "name": "limit", + "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, - "description": "Number of top domain articles to return (page size)", + "description": "Number of top articles to return (page size)", "default": 10, "title": "Limit" }, - "description": "Number of top domain articles to return (page size)" + "description": "Number of top articles to return (page size)" }, { "name": "page", @@ -16289,15 +15532,36 @@ "title": "End Date" }, "description": "End date to filter by (timestamp in seconds since epoch)" + }, + { + "name": "domain_names", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "List of domain names to filter by", + "title": "Domain Names" + }, + "description": "List of domain names to filter by" } ], "responses": { "200": { - "description": "A list of top domain articles with their hit counts", + "description": "A list of top articles with their hit counts", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TopNArticlesForDomainResponse" + "$ref": "#/components/schemas/TopNArticlesByHitsResponse" } } } @@ -16365,14 +15629,14 @@ } } }, - "/v1/distribution/articles/top_n_for_domain_timeseries": { + "/v1/distribution/articles/domain_queries": { "get": { "tags": [ "distribution" ], - "summary": "Get the top N articles by hits for domain with daily breakdown", - "description": "Get the top N domain articles by hits with daily breakdown.", - "operationId": "top_n_articles_for_domain_timeseries", + "summary": "Get queries that surfaced domain articles", + "description": "Get article hits.", + "operationId": "get_domain_queries", "security": [ { "APIKey": [ @@ -16383,15 +15647,18 @@ ], "parameters": [ { - "name": "domain_name", + "name": "domain_names", "in": "query", "required": true, "schema": { - "type": "string", - "description": "Domain name to filter by", - "title": "Domain Name" + "type": "array", + "items": { + "type": "string" + }, + "description": "Domain names to filter by", + "title": "Domain Names" }, - "description": "Domain name to filter by" + "description": "Domain names to filter by" }, { "name": "limit", @@ -16399,13 +15666,11 @@ "required": false, "schema": { "type": "integer", - "maximum": 1000, - "minimum": 1, - "description": "Number of top domain articles to return per day", + "description": "Limit for the number of articles", "default": 10, "title": "Limit" }, - "description": "Number of top domain articles to return per day" + "description": "Limit for the number of articles" }, { "name": "start_date", @@ -16420,10 +15685,10 @@ "type": "null" } ], - "description": "Start date to filter by (timestamp in seconds since epoch)", + "description": "Start date to filter by", "title": "Start Date" }, - "description": "Start date to filter by (timestamp in seconds since epoch)" + "description": "Start date to filter by" }, { "name": "end_date", @@ -16438,19 +15703,19 @@ "type": "null" } ], - "description": "End date to filter by (timestamp in seconds since epoch)", + "description": "End date to filter by", "title": "End Date" }, - "description": "End date to filter by (timestamp in seconds since epoch)" + "description": "End date to filter by" } ], "responses": { "200": { - "description": "A list of top domain articles with their hit counts grouped by day", + "description": "The queries that surfaced domain articles", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TopNArticlesTimeseriesResponse" + "$ref": "#/components/schemas/DomainQueriesResponse" } } } @@ -16518,14 +15783,14 @@ } } }, - "/v1/distribution/articles/top_n": { + "/v1/distribution/articles/domain_hits_surface": { "get": { "tags": [ "distribution" ], - "summary": "Get the top N articles by hits", - "description": "Get the top N articles by hits.", - "operationId": "top_n_articles_by_hits", + "summary": "Get total hits and surfaced articles for domains", + "description": "Get total hits and surfaced articles for domains.", + "operationId": "get_domain_hits_surface", "security": [ { "APIKey": [ @@ -16536,97 +15801,53 @@ ], "parameters": [ { - "name": "limit", + "name": "domain_names", "in": "query", - "required": false, + "required": true, "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Number of top articles to return (page size)", - "default": 10, - "title": "Limit" + "type": "array", + "items": { + "type": "string" + }, + "description": "List of domain names to filter by", + "title": "Domain Names" }, - "description": "Number of top articles to return (page size)" + "description": "List of domain names to filter by" }, { - "name": "page", + "name": "year", "in": "query", - "required": false, + "required": true, "schema": { "type": "integer", - "minimum": 1, - "description": "Page number (1-based; page size = limit)", - "default": 1, - "title": "Page" - }, - "description": "Page number (1-based; page size = limit)" - }, - { - "name": "start_date", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "Start date to filter by (timestamp in seconds since epoch)", - "title": "Start Date" - }, - "description": "Start date to filter by (timestamp in seconds since epoch)" - }, - { - "name": "end_date", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "End date to filter by (timestamp in seconds since epoch)", - "title": "End Date" + "maximum": 2100, + "minimum": 2000, + "description": "Year (4 digits)", + "title": "Year" }, - "description": "End date to filter by (timestamp in seconds since epoch)" + "description": "Year (4 digits)" }, { - "name": "domain_names", + "name": "month", "in": "query", - "required": false, + "required": true, "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "List of domain names to filter by", - "title": "Domain Names" + "type": "integer", + "maximum": 12, + "minimum": 1, + "description": "Month (1-12)", + "title": "Month" }, - "description": "List of domain names to filter by" + "description": "Month (1-12)" } ], "responses": { "200": { - "description": "A list of top articles with their hit counts", + "description": "Total hits and distinct article count for the specified domains", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TopNArticlesByHitsResponse" + "$ref": "#/components/schemas/DomainHitsSurfaceResponse" } } } @@ -16694,14 +15915,14 @@ } } }, - "/v1/distribution/articles/domain_queries": { + "/v1/distribution/articles/domain_hits_surface_timewindow": { "get": { "tags": [ "distribution" ], - "summary": "Get queries that surfaced domain articles", - "description": "Get article hits.", - "operationId": "get_domain_queries", + "summary": "Get hits and surfaced articles per day for domains", + "description": "Get hits and surfaced articles per day for domains.", + "operationId": "get_domain_hits_surface_timewindow", "security": [ { "APIKey": [ @@ -16720,67 +15941,45 @@ "items": { "type": "string" }, - "description": "Domain names to filter by", + "description": "List of domain names to filter by", "title": "Domain Names" }, - "description": "Domain names to filter by" + "description": "List of domain names to filter by" }, { - "name": "limit", + "name": "year", "in": "query", - "required": false, + "required": true, "schema": { "type": "integer", - "description": "Limit for the number of articles", - "default": 10, - "title": "Limit" - }, - "description": "Limit for the number of articles" - }, - { - "name": "start_date", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "Start date to filter by", - "title": "Start Date" + "maximum": 2100, + "minimum": 2000, + "description": "Year (4 digits)", + "title": "Year" }, - "description": "Start date to filter by" + "description": "Year (4 digits)" }, { - "name": "end_date", + "name": "month", "in": "query", - "required": false, + "required": true, "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "End date to filter by", - "title": "End Date" + "type": "integer", + "maximum": 12, + "minimum": 1, + "description": "Month (1-12)", + "title": "Month" }, - "description": "End date to filter by" + "description": "Month (1-12)" } ], "responses": { "200": { - "description": "The queries that surfaced domain articles", + "description": "Daily breakdown of hits and distinct article count", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainQueriesResponse" + "$ref": "#/components/schemas/DomainHitsSurfaceTimeWindowResponse" } } } @@ -16848,14 +16047,14 @@ } } }, - "/v1/distribution/articles/domain_hits_surface": { + "/v1/distribution/stats/metrics": { "get": { "tags": [ "distribution" ], - "summary": "Get total hits and surfaced articles for domains", - "description": "Get total hits and surfaced articles for domains.", - "operationId": "get_domain_hits_surface", + "summary": "Get raw publisher metric event counts for domains", + "description": "Get raw (unweighted) surface, citation, full_text and grounded publisher\nmetric event counts for a list of domains in a time period. Counts are 1 per\nreal event; revenue-share weighting stays in the distribution service.", + "operationId": "get_domain_metrics", "security": [ { "APIKey": [ @@ -16874,45 +16073,55 @@ "items": { "type": "string" }, - "description": "List of domain names to filter by", + "description": "Domain names to filter by", "title": "Domain Names" }, - "description": "List of domain names to filter by" + "description": "Domain names to filter by" }, { - "name": "year", + "name": "start_date", "in": "query", - "required": true, + "required": false, "schema": { - "type": "integer", - "maximum": 2100, - "minimum": 2000, - "description": "Year (4 digits)", - "title": "Year" + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Start date to filter by (timestamp in seconds since epoch)", + "title": "Start Date" }, - "description": "Year (4 digits)" + "description": "Start date to filter by (timestamp in seconds since epoch)" }, { - "name": "month", + "name": "end_date", "in": "query", - "required": true, + "required": false, "schema": { - "type": "integer", - "maximum": 12, - "minimum": 1, - "description": "Month (1-12)", - "title": "Month" + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "End date to filter by (timestamp in seconds since epoch)", + "title": "End Date" }, - "description": "Month (1-12)" + "description": "End date to filter by (timestamp in seconds since epoch)" } ], "responses": { "200": { - "description": "Total hits and distinct article count for the specified domains", + "description": "Raw surface, citation, full_text and grounded event counts", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainHitsSurfaceResponse" + "$ref": "#/components/schemas/DomainMetricsResponse" } } } @@ -16980,14 +16189,14 @@ } } }, - "/v1/distribution/articles/domain_hits_surface_timewindow": { + "/v1/distribution/stats/metrics_timeseries": { "get": { "tags": [ "distribution" ], - "summary": "Get hits and surfaced articles per day for domains", - "description": "Get hits and surfaced articles per day for domains.", - "operationId": "get_domain_hits_surface_timewindow", + "summary": "Get raw publisher metric event counts per day for domains", + "description": "Get raw (unweighted) surface, citation, full_text and grounded publisher\nmetric event counts per day for a list of domains in a time period.", + "operationId": "get_domain_metrics_timeseries", "security": [ { "APIKey": [ @@ -17006,45 +16215,55 @@ "items": { "type": "string" }, - "description": "List of domain names to filter by", + "description": "Domain names to filter by", "title": "Domain Names" }, - "description": "List of domain names to filter by" + "description": "Domain names to filter by" }, { - "name": "year", + "name": "start_date", "in": "query", - "required": true, + "required": false, "schema": { - "type": "integer", - "maximum": 2100, - "minimum": 2000, - "description": "Year (4 digits)", - "title": "Year" + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Start date to filter by (timestamp in seconds since epoch)", + "title": "Start Date" }, - "description": "Year (4 digits)" + "description": "Start date to filter by (timestamp in seconds since epoch)" }, { - "name": "month", + "name": "end_date", "in": "query", - "required": true, + "required": false, "schema": { - "type": "integer", - "maximum": 12, - "minimum": 1, - "description": "Month (1-12)", - "title": "Month" + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "End date to filter by (timestamp in seconds since epoch)", + "title": "End Date" }, - "description": "Month (1-12)" + "description": "End date to filter by (timestamp in seconds since epoch)" } ], "responses": { "200": { - "description": "Daily breakdown of hits and distinct article count", + "description": "Daily breakdown of surface, citation, full_text and grounded event counts", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainHitsSurfaceTimeWindowResponse" + "$ref": "#/components/schemas/DomainMetricsTimeWindowResponse" } } } @@ -17112,19 +16331,18 @@ } } }, - "/v1/distribution/stats/metrics": { + "/v1/distribution/stats/hit_share": { "get": { "tags": [ "distribution" ], - "summary": "Get raw publisher metric event counts for domains", - "description": "Get raw (unweighted) surface, citation, full_text and grounded publisher\nmetric event counts for a list of domains in a time period. Counts are 1 per\nreal event; revenue-share weighting stays in the distribution service.", - "operationId": "get_domain_metrics", + "summary": "Get the hit share for a list of domains in a time period", + "description": "Get the hit share for a list of domains in a time period.", + "operationId": "domain_hit_share", "security": [ { "APIKey": [ - "distribution", - "internal" + "distribution" ] } ], @@ -17178,15 +16396,27 @@ "title": "End Date" }, "description": "End date to filter by (timestamp in seconds since epoch)" + }, + { + "name": "is_publisher", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Only calculate hit share for publisher domains", + "default": true, + "title": "Is Publisher" + }, + "description": "Only calculate hit share for publisher domains" } ], "responses": { "200": { - "description": "Raw surface, citation, full_text and grounded event counts", + "description": "The hit share for each domain", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainMetricsResponse" + "$ref": "#/components/schemas/HitShareResponse" } } } @@ -17254,14 +16484,14 @@ } } }, - "/v1/distribution/stats/metrics_timeseries": { + "/v1/distribution/stats/count": { "get": { "tags": [ "distribution" ], - "summary": "Get raw publisher metric event counts per day for domains", - "description": "Get raw (unweighted) surface, citation, full_text and grounded publisher\nmetric event counts per day for a list of domains in a time period.", - "operationId": "get_domain_metrics_timeseries", + "summary": "Get article hits", + "description": "Get the number of hits for articles in a specific domain.", + "operationId": "get_article_hits", "security": [ { "APIKey": [ @@ -17272,18 +16502,15 @@ ], "parameters": [ { - "name": "domain_names", + "name": "domain_name", "in": "query", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Domain names to filter by", - "title": "Domain Names" + "type": "string", + "description": "Domain name to filter by", + "title": "Domain Name" }, - "description": "Domain names to filter by" + "description": "Domain name to filter by" }, { "name": "start_date", @@ -17324,11 +16551,11 @@ ], "responses": { "200": { - "description": "Daily breakdown of surface, citation, full_text and grounded event counts", + "description": "Count of article hits", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainMetricsTimeWindowResponse" + "$ref": "#/components/schemas/CountResponse" } } } @@ -17396,231 +16623,183 @@ } } }, - "/v1/distribution/stats/hit_share": { + "/v1/wiki/search": { "get": { "tags": [ - "distribution" + "wiki" ], - "summary": "Get the hit share for a list of domains in a time period", - "description": "Get the hit share for a list of domains in a time period.", - "operationId": "domain_hit_share", + "summary": "Search for Wikipedia context with natural language", + "description": "Search on Wikipedia content with natural language. Find exactly relevant chunks,\nwith contextual neighbor chunks, and the full articles they came from.", + "operationId": "search_wiki", "security": [ { "APIKey": [ - "distribution" + "news" ] } ], "parameters": [ { - "name": "domain_names", + "name": "query", "in": "query", - "required": true, + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Domain names to filter by", - "title": "Domain Names" + "type": "string", + "description": "Natural language query that can be any phrase, keyword, question, or paragraph. ", + "default": "", + "title": "Query" }, - "description": "Domain names to filter by" + "description": "Natural language query that can be any phrase, keyword, question, or paragraph. " }, { - "name": "start_date", + "name": "neighbor_chunks", "in": "query", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "integer", + "maximum": 10, + "minimum": 0 }, { "type": "null" } ], - "description": "Start date to filter by (timestamp in seconds since epoch)", - "title": "Start Date" + "description": "Number of neighbor chunks to attach and return. If 0, then no neighbor chunks will be returned. ", + "default": 1, + "title": "Neighbor Chunks" }, - "description": "Start date to filter by (timestamp in seconds since epoch)" + "description": "Number of neighbor chunks to attach and return. If 0, then no neighbor chunks will be returned. " }, { - "name": "end_date", + "name": "n_documents", "in": "query", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "integer", + "maximum": 20, + "minimum": 1 }, { "type": "null" } ], - "description": "End date to filter by (timestamp in seconds since epoch)", - "title": "End Date" + "description": "Number of documents to return. If 0, then no documents will be returned. ", + "default": 5, + "title": "N Documents" }, - "description": "End date to filter by (timestamp in seconds since epoch)" + "description": "Number of documents to return. If 0, then no documents will be returned. " }, { - "name": "is_publisher", + "name": "full_articles", "in": "query", "required": false, "schema": { - "type": "boolean", - "description": "Only calculate hit share for publisher domains", - "default": true, - "title": "Is Publisher" - }, - "description": "Only calculate hit share for publisher domains" - } - ], - "responses": { - "200": { - "description": "The hit share for each domain", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HitShareResponse" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__108" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" } - } + ], + "description": "If true, then full articles will be returned. If false, then only chunks and their neighbors will be returned. Beware that returning full articles increases data size which increases token usage downstream.", + "default": false, + "title": "Full Articles" }, - "description": "Bad Request" - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__107" - } - } - }, - "description": "Unauthorized" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__106" - } - } - }, - "description": "Forbidden" - }, - "405": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__105" - } - } - }, - "description": "Method Not Allowed" + "description": "If true, then full articles will be returned. If false, then only chunks and their neighbors will be returned. Beware that returning full articles increases data size which increases token usage downstream." }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorModel" + { + "name": "hybrid_search", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" } - } + ], + "description": "If true, then hybrid search will be used. If false, then only vector search will be used. ", + "default": false, + "title": "Hybrid Search" }, - "description": "Unprocessable Entity" + "description": "If true, then hybrid search will be used. If false, then only vector search will be used. " }, - "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/asknews_api__errors__APIErrorModel" - } - } - }, - "description": "Internal Server Error" - } - } - } - }, - "/v1/distribution/stats/count": { - "get": { - "tags": [ - "distribution" - ], - "summary": "Get article hits", - "description": "Get the number of hits for articles in a specific domain.", - "operationId": "get_article_hits", - "security": [ - { - "APIKey": [ - "distribution", - "internal" - ] - } - ], - "parameters": [ { - "name": "domain_name", + "name": "string_guarantee", "in": "query", - "required": true, + "required": false, "schema": { - "type": "string", - "description": "Domain name to filter by", - "title": "Domain Name" + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "List of strings that must be present in the results. If empty, then no string guarantee will be applied. ", + "title": "String Guarantee" }, - "description": "Domain name to filter by" + "description": "List of strings that must be present in the results. If empty, then no string guarantee will be applied. " }, { - "name": "start_date", + "name": "diversify", "in": "query", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "number", + "maximum": 1, + "minimum": 0 }, { "type": "null" } ], - "description": "Start date to filter by (timestamp in seconds since epoch)", - "title": "Start Date" + "description": "Diversity factor for MMR re-ranking. 0.0 means no diversity (pure relevance), 1.0 means full diversity. ", + "default": 0, + "title": "Diversify" }, - "description": "Start date to filter by (timestamp in seconds since epoch)" + "description": "Diversity factor for MMR re-ranking. 0.0 means no diversity (pure relevance), 1.0 means full diversity. " }, { - "name": "end_date", + "name": "include_main_section", "in": "query", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "boolean" }, { "type": "null" } ], - "description": "End date to filter by (timestamp in seconds since epoch)", - "title": "End Date" + "description": "If true, then the main section of the article will be included at the start of each chunk's content. If false, then only the chunk content will be returned. Useful because the main section often contains important context. ", + "default": false, + "title": "Include Main Section" }, - "description": "End date to filter by (timestamp in seconds since epoch)" + "description": "If true, then the main section of the article will be included at the start of each chunk's content. If false, then only the chunk content will be returned. Useful because the main section often contains important context. " } ], "responses": { "200": { - "description": "Count of article hits", + "description": "A string or a list of dictionaries", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CountResponse" + "$ref": "#/components/schemas/WikiSearchResponse" } } } @@ -17629,7 +16808,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__112" + "$ref": "#/components/schemas/abc__APIErrorModel__108" } } }, @@ -17639,7 +16818,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__111" + "$ref": "#/components/schemas/abc__APIErrorModel__107" } } }, @@ -17649,7 +16828,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__110" + "$ref": "#/components/schemas/abc__APIErrorModel__106" } } }, @@ -17659,7 +16838,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__109" + "$ref": "#/components/schemas/abc__APIErrorModel__105" } } }, @@ -17688,290 +16867,46 @@ } } }, - "/v1/wiki/search": { + "/": { "get": { "tags": [ - "wiki" - ], - "summary": "Search for Wikipedia context with natural language", - "description": "Search on Wikipedia content with natural language. Find exactly relevant chunks,\nwith contextual neighbor chunks, and the full articles they came from.", - "operationId": "search_wiki", - "security": [ - { - "APIKey": [ - "news" - ] - } + "ping" ], - "parameters": [ - { - "name": "query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "description": "Natural language query that can be any phrase, keyword, question, or paragraph. ", - "default": "", - "title": "Query" - }, - "description": "Natural language query that can be any phrase, keyword, question, or paragraph. " - }, - { - "name": "neighbor_chunks", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer", - "maximum": 10, - "minimum": 0 - }, - { - "type": "null" + "summary": "Ping", + "operationId": "ping", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PingModel" } - ], - "description": "Number of neighbor chunks to attach and return. If 0, then no neighbor chunks will be returned. ", - "default": 1, - "title": "Neighbor Chunks" - }, - "description": "Number of neighbor chunks to attach and return. If 0, then no neighbor chunks will be returned. " + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AlertLog": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" }, - { - "name": "n_documents", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer", - "maximum": 20, - "minimum": 1 - }, - { - "type": "null" - } - ], - "description": "Number of documents to return. If 0, then no documents will be returned. ", - "default": 5, - "title": "N Documents" - }, - "description": "Number of documents to return. If 0, then no documents will be returned. " + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" }, - { - "name": "full_articles", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "If true, then full articles will be returned. If false, then only chunks and their neighbors will be returned. Beware that returning full articles increases data size which increases token usage downstream.", - "default": false, - "title": "Full Articles" - }, - "description": "If true, then full articles will be returned. If false, then only chunks and their neighbors will be returned. Beware that returning full articles increases data size which increases token usage downstream." - }, - { - "name": "hybrid_search", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "If true, then hybrid search will be used. If false, then only vector search will be used. ", - "default": false, - "title": "Hybrid Search" - }, - "description": "If true, then hybrid search will be used. If false, then only vector search will be used. " - }, - { - "name": "string_guarantee", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "List of strings that must be present in the results. If empty, then no string guarantee will be applied. ", - "title": "String Guarantee" - }, - "description": "List of strings that must be present in the results. If empty, then no string guarantee will be applied. " - }, - { - "name": "diversify", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "number", - "maximum": 1, - "minimum": 0 - }, - { - "type": "null" - } - ], - "description": "Diversity factor for MMR re-ranking. 0.0 means no diversity (pure relevance), 1.0 means full diversity. ", - "default": 0, - "title": "Diversify" - }, - "description": "Diversity factor for MMR re-ranking. 0.0 means no diversity (pure relevance), 1.0 means full diversity. " - }, - { - "name": "include_main_section", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "If true, then the main section of the article will be included at the start of each chunk's content. If false, then only the chunk content will be returned. Useful because the main section often contains important context. ", - "default": false, - "title": "Include Main Section" - }, - "description": "If true, then the main section of the article will be included at the start of each chunk's content. If false, then only the chunk content will be returned. Useful because the main section often contains important context. " - } - ], - "responses": { - "200": { - "description": "A string or a list of dictionaries", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WikiSearchResponse" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__116" - } - } - }, - "description": "Bad Request" - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__115" - } - } - }, - "description": "Unauthorized" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__114" - } - } - }, - "description": "Forbidden" - }, - "405": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/abc__APIErrorModel__113" - } - } - }, - "description": "Method Not Allowed" - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorModel" - } - } - }, - "description": "Unprocessable Entity" - }, - "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/asknews_api__errors__APIErrorModel" - } - } - }, - "description": "Internal Server Error" - } - } - } - }, - "/": { - "get": { - "tags": [ - "ping" - ], - "summary": "Ping", - "operationId": "ping", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PingModel" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "AlertLog": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "alert_id": { - "type": "string", - "format": "uuid", - "title": "Alert Id" + "alert_id": { + "type": "string", + "format": "uuid", + "title": "Alert Id" }, "user_id": { "type": "string", @@ -19466,20 +18401,6 @@ ], "title": "CreateAlertRequest" }, - "CreateChartRequest": { - "properties": { - "query": { - "type": "string", - "title": "Query", - "description": "The chart query to create" - } - }, - "type": "object", - "required": [ - "query" - ], - "title": "CreateChartRequest" - }, "CreateChatCompletionRequest": { "properties": { "model": { @@ -20537,203 +19458,64 @@ ], "title": "CreateDeepNewsResponseUsage" }, - "CreateNewsletterRequest": { + "DeepNewsModel": { + "type": "string", + "enum": [ + "o1-mini", + "o1", + "o3-mini", + "o3", + "gpt-4o-mini", + "gpt-4o", + "gpt-4.1-2025-04-14", + "gpt-5-mini", + "gpt-5", + "command-nightly", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-latest", + "claude-3-7-sonnet-latest", + "claude-3-7-sonnet-20250219", + "claude-3-7-sonnet-nothinking", + "claude-sonnet-4-20250514", + "claude-opus-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-opus-4-5-20251101", + "claude-sonnet-4-6", + "claude-sonnet-5", + "claude-opus-4-8", + "claude-opus-5", + "claude-opus-5-5", + "claude-opus-4-6", + "claude-fable-5", + "claude-fable-5-1", + "gpt-5.6-terra", + "gpt-5.6-sol", + "gpt-6-sol", + "gpt-6-astra", + "deepseek", + "deepseek-basic", + "deepseek-r1-0528", + "meta-llama/Meta-Llama-3-8B-Instruct", + "meta-llama/Meta-Llama-3.1-405B-Instruct", + "meta-llama/Meta-Llama-3.3-70B-Instruct", + "meta-llama/Llama-4-Maverick-17B-128E-Instruct", + "gemini-2.5-flash", + "gemini-2.5-pro", + "gemini-2.5-pro-preview-03-25", + "gemini-3-pro", + "gemini-3.1-pro", + "gemini-3-flash", + "gemini-3.5-flash", + "gemini-3.6-flash", + "open-source-best", + "kimi-k2p5" + ], + "title": "DeepNewsModel" + }, + "DeepNewsModelItem": { "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the newsletter.", - "example": "Daily Economy News" - }, - "query": { - "type": "string", - "title": "Query", - "description": "The natural language query to run for the newsletter.", - "example": "Send me the latest news on the economy." - }, - "cron": { - "type": "string", - "title": "Cron", - "description": "The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples", - "example": "0 0 * * *" - }, - "model": { - "type": "string", - "enum": [ - "gpt-4o", - "gpt-4o-mini", - "claude-3-5-sonnet-latest", - "meta-llama/Meta-Llama-3.1-405B-Instruct", - "meta-llama/Meta-Llama-3.3-70B-Instruct" - ], - "title": "Model", - "description": "The model to use for the newsletter.", - "example": "gpt-4o-mini" - }, - "subject": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Subject", - "description": "The subject of the newsletter. If not provided it will be auto generated.", - "example": "Your Daily Economy News" - }, - "sender": { - "type": "string", - "title": "Sender", - "description": "The sender of the newsletter.", - "example": "Your Name " - }, - "logo_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Url", - "description": "The logo URL for the newsletter.", - "example": "https://example.com/logo.png" - }, - "reply_to": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Reply To", - "description": "The reply-to address for the newsletter. If not provided, the sender will be used.", - "example": "Your Name " - }, - "audience_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Audience Id", - "description": "The audience ID to use for the newsletter. If not provided a new audience will be created.", - "example": "123e4567-e89b-12d3-a456-426614174000" - }, - "resend_api_key": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Resend Api Key", - "description": "The resend API key to use for the newsletter. If not provided, the newsletter will not be sent.", - "example": "re_123456789" - }, - "public": { - "type": "boolean", - "title": "Public", - "description": "Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown.", - "default": true - }, - "active": { - "type": "boolean", - "title": "Active", - "description": "Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent.", - "default": true - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At", - "description": "The expiration date for the alert. Default is None. If set, the alert will be disabled after this date." - } - }, - "type": "object", - "required": [ - "name", - "query", - "cron", - "model", - "sender" - ], - "title": "CreateNewsletterRequest" - }, - "DeepNewsModel": { - "type": "string", - "enum": [ - "o1-mini", - "o1", - "o3-mini", - "o3", - "gpt-4o-mini", - "gpt-4o", - "gpt-4.1-2025-04-14", - "gpt-5-mini", - "gpt-5", - "command-nightly", - "claude-3-5-sonnet-20240620", - "claude-3-5-sonnet-latest", - "claude-3-7-sonnet-latest", - "claude-3-7-sonnet-20250219", - "claude-3-7-sonnet-nothinking", - "claude-sonnet-4-20250514", - "claude-opus-4-20250514", - "claude-sonnet-4-5-20250929", - "claude-opus-4-5-20251101", - "claude-sonnet-4-6", - "claude-sonnet-5", - "claude-opus-4-8", - "claude-opus-5", - "claude-opus-4-6", - "claude-fable-5", - "gpt-5.6-terra", - "gpt-5.6-sol", - "deepseek", - "deepseek-basic", - "deepseek-r1-0528", - "meta-llama/Meta-Llama-3-8B-Instruct", - "meta-llama/Meta-Llama-3.1-405B-Instruct", - "meta-llama/Meta-Llama-3.3-70B-Instruct", - "meta-llama/Llama-4-Maverick-17B-128E-Instruct", - "gemini-2.5-flash", - "gemini-2.5-pro", - "gemini-2.5-pro-preview-03-25", - "gemini-3-pro", - "gemini-3.1-pro", - "gemini-3-flash", - "gemini-3.5-flash", - "gemini-3.6-flash", - "open-source-best", - "kimi-k2p5" - ], - "title": "DeepNewsModel" - }, - "DeepNewsModelItem": { - "properties": { - "model": { - "$ref": "#/components/schemas/DeepNewsModel" + "model": { + "$ref": "#/components/schemas/DeepNewsModel" }, "type": { "type": "string", @@ -21742,777 +20524,303 @@ "start_timestamp": { "anyOf": [ { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Start Timestamp", - "description": "Timestamp to start search from" - }, - "end_timestamp": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "End Timestamp", - "description": "Timestamp to end search at" - }, - "time_filter": { - "type": "string", - "enum": [ - "crawl_date", - "pub_date" - ], - "title": "Time Filter", - "description": "Control which date type to filter on. 'crawl_date' is the date the article was crawled, 'pub_date' is the date the article was published.", - "default": "crawl_date" - }, - "return_type": { - "type": "string", - "enum": [ - "string", - "dicts", - "both" - ], - "title": "Return Type", - "description": "Type of return value. 'string' means that the return is prompt-optimized and ready to be immediately injected into any prompt. 'dicts' means that the return is a structured dictionary, containing additional metadata (like a classic news api). Can be 'string' or 'dicts', or 'both'. 'string' guarantees the lowest-latency response 'dicts' requires more I/O, therefore increases latency (very slightly, depending on your network connection).", - "default": "dicts" - }, - "historical": { - "type": "boolean", - "title": "Historical", - "description": "Search on archive of historical news. Defaults to False, meaning that the search will only look through the most recent news (48 hours)", - "default": false - }, - "method": { - "type": "string", - "enum": [ - "nl", - "kw", - "both" - ], - "title": "Method", - "description": "Method to use for searching. 'nl' means Natural Language, which is a string that can be any phrase, keyword, question, or paragraph that will be used for semantic search on the news. 'kw' means Keyword, which can also be any keyword(s), phrase, or paragraph, however the search is a direct keyword search on the database. 'both' means both methods will be used and results will be ranked according to IRR. 'both' may reduce latency by 10 pct in exchange for improved accuracy.", - "default": "kw" - }, - "similarity_score_threshold": { - "type": "number", - "title": "Similarity Score Threshold", - "description": "Similarity score threshold to determine which articles to return. Lower means less similar results are allowed.", - "default": 0.5 - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "string" - } - ], - "title": "Offset", - "description": "Offset for pagination. The n_articles is your page size, while your offset is the number of articles to skip to get to your page of interest. For example, if you want to get page 3 for n_article page size of 10, you would set offset to 20.", - "default": 0 - }, - "categories": { - "items": { - "type": "string", - "enum": [ - "All", - "Business", - "Crime", - "Politics", - "Science", - "Sports", - "Technology", - "Military", - "Health", - "Entertainment", - "Finance", - "Culture", - "Climate", - "Environment", - "World" - ] - }, - "type": "array", - "title": "Categories", - "description": "Categories of news to filter on", - "default": [ - "All" - ] - }, - "doc_start_delimiter": { - "type": "string", - "title": "Doc Start Delimiter", - "description": "Document start delimiter for string return.", - "default": "" - }, - "doc_end_delimiter": { - "type": "string", - "title": "Doc End Delimiter", - "description": "Document end delimiter for string return.", - "default": "" - }, - "provocative": { - "type": "string", - "enum": [ - "unknown", - "low", - "medium", - "high", - "all" - ], - "title": "Provocative", - "description": "Filter articles based on how provocative they are deemed based on the use of provocative language and emotional vocabulary.", - "default": "all" - }, - "reporting_voice": { - "anyOf": [ - { - "items": { - "type": "string", - "enum": [ - "Objective", - "Subjective", - "Investigative", - "Narrative", - "Analytical", - "Advocacy", - "Conversational", - "Satirical", - "Emotive", - "Explanatory", - "Persuasive", - "Sensational", - "Unknown", - "all" - ] - }, - "type": "array" - }, - { - "type": "string", - "enum": [ - "Objective", - "Subjective", - "Investigative", - "Narrative", - "Analytical", - "Advocacy", - "Conversational", - "Satirical", - "Emotive", - "Explanatory", - "Persuasive", - "Sensational", - "Unknown", - "all" - ] - } - ], - "title": "Reporting Voice", - "description": "Type of reporting voice to filer by.", - "default": [ - "all" - ] - }, - "domain_url": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Domain Url", - "description": "filter by domain url of interest. This can be a single domain or a list of domains. For example, 'npr.org' or ['nature.com', 'npr.org']" - }, - "bad_domain_url": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Bad Domain Url", - "description": "Domain blacklist.This can be a single domain or a list of domains. For example, 'npr.org' or ['nature.com', 'npr.org']" - }, - "page_rank": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Page Rank", - "description": "Maximum allowed page rank for returned articles." - }, - "diversify_sources": { - "type": "boolean", - "title": "Diversify Sources", - "description": "Ensure that the return set of articles are selected from diverse sources. This adds latency to the search, but attempts to balance the representation of sources by country and source origins. In summary, a net is cast around your search, then the diversity of sources is analyzed, and your final result matches the large net diversity distribution. This means that your search accuracy is reduced, but you gain more diverse perspectives.", - "default": false - }, - "strategy": { - "type": "string", - "enum": [ - "latest news", - "news knowledge", - "default" - ], - "title": "Strategy", - "description": "Strategy to use for searching. 'latest news' automatically setsmethod='nl', historical=False, and looks within the past 24 hours. 'news knowledge' automatically sets method='kw', historical=True, and looks within the past 60 days. 'news knowledge' will increase latency due to the larger search space in the archive. Use 'default' if you want to control start_timestamp, end_timestamp, historical, and method.", - "default": "default" - }, - "hours_back": { - "type": "integer", - "title": "Hours Back", - "description": "Can be set to easily control the look back on the search. This is the same as controlling the 'start_timestamp' parameter. The difference is that this is not a timestamp, it is the number of hours back to look from the current time. Defaults to 24 hours.", - "default": 24 - }, - "string_guarantee": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "String Guarantee", - "description": "If defined, the search will only occur on articles that contain strings in this list." - }, - "string_guarantee_op": { - "type": "string", - "enum": [ - "AND", - "OR" - ], - "title": "String Guarantee Op", - "description": "Operator to use for string guarantee list.", - "default": "AND" - }, - "reverse_string_guarantee": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Reverse String Guarantee", - "description": "If defined, the search will only occur on articles that do not contain strings in this list." - }, - "entity_guarantee": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Entity Guarantee", - "description": "Entity guarantee to filter by. This is a list of strings, where each string includes entity type and entity value separated by a colon. The first element is the entity type and the second element is the entity value. For example ['Location:Paris', 'Person:John']" - }, - "reverse_entity_guarantee": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Reverse Entity Guarantee", - "description": "Reverse entity guarantee to filter by. This is a list of strings, where each string includes entity type and entity value separated by a colon. The first element is the entity type and the second element is the entity value. For example ['Location:Paris', 'Person:John']" - }, - "entity_guarantee_op": { - "type": "string", - "enum": [ - "AND", - "OR" - ], - "title": "Entity Guarantee Op", - "description": "Operator to use for entity guarantee list.", - "default": "OR" - }, - "return_graphs": { - "type": "boolean", - "title": "Return Graphs", - "description": "Return graphs for the articles. Only available to Analyst tier and above.", - "default": false - }, - "return_geo": { - "type": "boolean", - "title": "Return Geo", - "description": "Return GeoCoordinates associated with locations discussed inside the articles. Only available to Analyst tier and above.", - "default": false - }, - "languages": { - "anyOf": [ - { - "items": { - "type": "string", - "enum": [ - "sq", - "ar", - "az", - "ca", - "zh", - "hr", - "cs", - "da", - "nl", - "en", - "eo", - "fi", - "fr", - "gl", - "de", - "el", - "he", - "hi", - "hu", - "is", - "id", - "ia", - "it", - "ja", - "kk", - "km", - "ko", - "ky", - "ms", - "mt", - "mhr", - "mn", - "no", - "or", - "pl", - "pt", - "pa", - "ro", - "ru", - "sr", - "sk", - "sl", - "es", - "sv", - "ta", - "te", - "th", - "tr", - "uk", - "vi", - "unknown" - ] - }, - "type": "array" + "type": "integer" }, { "type": "null" } ], - "title": "Languages", - "description": "Languages to filter by. This is the two-letter 'set 1' of the ISO 639-1 standard. For example: English is 'en'." + "title": "Start Timestamp", + "description": "Timestamp to start search from" }, - "countries": { + "end_timestamp": { "anyOf": [ { - "items": { - "type": "string" - }, - "type": "array" + "type": "integer" }, { "type": "null" } ], - "title": "Countries", - "description": "Countries to filter by, this is the two-letter ISO country codeFor example: United States is 'US', France is 'FR', Sweden is 'SE'." + "title": "End Timestamp", + "description": "Timestamp to end search at" }, - "countries_blacklist": { + "time_filter": { + "type": "string", + "enum": [ + "crawl_date", + "pub_date" + ], + "title": "Time Filter", + "description": "Control which date type to filter on. 'crawl_date' is the date the article was crawled, 'pub_date' is the date the article was published.", + "default": "crawl_date" + }, + "return_type": { + "type": "string", + "enum": [ + "string", + "dicts", + "both" + ], + "title": "Return Type", + "description": "Type of return value. 'string' means that the return is prompt-optimized and ready to be immediately injected into any prompt. 'dicts' means that the return is a structured dictionary, containing additional metadata (like a classic news api). Can be 'string' or 'dicts', or 'both'. 'string' guarantees the lowest-latency response 'dicts' requires more I/O, therefore increases latency (very slightly, depending on your network connection).", + "default": "dicts" + }, + "historical": { + "type": "boolean", + "title": "Historical", + "description": "Search on archive of historical news. Defaults to False, meaning that the search will only look through the most recent news (48 hours)", + "default": false + }, + "method": { + "type": "string", + "enum": [ + "nl", + "kw", + "both" + ], + "title": "Method", + "description": "Method to use for searching. 'nl' means Natural Language, which is a string that can be any phrase, keyword, question, or paragraph that will be used for semantic search on the news. 'kw' means Keyword, which can also be any keyword(s), phrase, or paragraph, however the search is a direct keyword search on the database. 'both' means both methods will be used and results will be ranked according to IRR. 'both' may reduce latency by 10 pct in exchange for improved accuracy.", + "default": "kw" + }, + "similarity_score_threshold": { + "type": "number", + "title": "Similarity Score Threshold", + "description": "Similarity score threshold to determine which articles to return. Lower means less similar results are allowed.", + "default": 0.5 + }, + "offset": { "anyOf": [ { - "items": { - "type": "string" - }, - "type": "array" + "type": "integer" }, { - "type": "null" + "type": "string" } ], - "title": "Countries Blacklist", - "description": "Countries to blacklist, this is the two-letter ISO country code. For example: United States is 'US', France is 'FR', Sweden is 'SE'." + "title": "Offset", + "description": "Offset for pagination. The n_articles is your page size, while your offset is the number of articles to skip to get to your page of interest. For example, if you want to get page 3 for n_article page size of 10, you would set offset to 20.", + "default": 0 }, - "continents": { + "categories": { + "items": { + "type": "string", + "enum": [ + "All", + "Business", + "Crime", + "Politics", + "Science", + "Sports", + "Technology", + "Military", + "Health", + "Entertainment", + "Finance", + "Culture", + "Climate", + "Environment", + "World" + ] + }, + "type": "array", + "title": "Categories", + "description": "Categories of news to filter on", + "default": [ + "All" + ] + }, + "doc_start_delimiter": { + "type": "string", + "title": "Doc Start Delimiter", + "description": "Document start delimiter for string return.", + "default": "" + }, + "doc_end_delimiter": { + "type": "string", + "title": "Doc End Delimiter", + "description": "Document end delimiter for string return.", + "default": "" + }, + "provocative": { + "type": "string", + "enum": [ + "unknown", + "low", + "medium", + "high", + "all" + ], + "title": "Provocative", + "description": "Filter articles based on how provocative they are deemed based on the use of provocative language and emotional vocabulary.", + "default": "all" + }, + "reporting_voice": { "anyOf": [ { "items": { "type": "string", "enum": [ - "Africa", - "Asia", - "Oceania", - "Europe", - "Middle East", - "North America", - "South America" + "Objective", + "Subjective", + "Investigative", + "Narrative", + "Analytical", + "Advocacy", + "Conversational", + "Satirical", + "Emotive", + "Explanatory", + "Persuasive", + "Sensational", + "Unknown", + "all" ] }, "type": "array" }, { - "type": "null" + "type": "string", + "enum": [ + "Objective", + "Subjective", + "Investigative", + "Narrative", + "Analytical", + "Advocacy", + "Conversational", + "Satirical", + "Emotive", + "Explanatory", + "Persuasive", + "Sensational", + "Unknown", + "all" + ] } ], - "title": "Continents", - "description": "Continents to filter by." + "title": "Reporting Voice", + "description": "Type of reporting voice to filer by.", + "default": [ + "all" + ] }, - "sentiment": { + "domain_url": { "anyOf": [ { - "type": "string", - "enum": [ - "negative", - "neutral", - "positive" - ] + "items": { + "type": "string" + }, + "type": "array" }, { - "type": "null" - } - ], - "title": "Sentiment", - "description": "Sentiment to filter articles by." - }, - "premium": { - "type": "boolean", - "title": "Premium", - "description": "Include premium sources.", - "default": false - } - }, - "additionalProperties": false, - "type": "object", - "title": "FilterParams" - }, - "FilterParamsMetadata": { - "properties": { - "title": { - "type": "string", - "title": "Title", - "default": "" - } - }, - "type": "object", - "title": "FilterParamsMetadata" - }, - "FilterParamsResponse": { - "properties": { - "filter_params": { - "$ref": "#/components/schemas/FilterParams" - }, - "metadata": { - "$ref": "#/components/schemas/FilterParamsMetadata" - } - }, - "type": "object", - "required": [ - "filter_params", - "metadata" - ], - "title": "FilterParamsResponse" - }, - "FinanceResponse": { - "properties": { - "data": { - "$ref": "#/components/schemas/FinanceResponseTimeSeries" - } - }, - "type": "object", - "required": [ - "data" - ], - "title": "FinanceResponse" - }, - "FinanceResponseTimeSeries": { - "properties": { - "timeseries": { - "items": { - "$ref": "#/components/schemas/FinanceResponseTimeSeriesData" - }, - "type": "array", - "title": "Timeseries" - } - }, - "type": "object", - "required": [ - "timeseries" - ], - "title": "FinanceResponseTimeSeries" - }, - "FinanceResponseTimeSeriesData": { - "properties": { - "datetime": { - "type": "string", - "format": "date-time", - "title": "Datetime" + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Domain Url", + "description": "filter by domain url of interest. This can be a single domain or a list of domains. For example, 'npr.org' or ['nature.com', 'npr.org']" }, - "value": { + "bad_domain_url": { "anyOf": [ { - "type": "integer" + "items": { + "type": "string" + }, + "type": "array" }, { - "type": "number" + "type": "string" + }, + { + "type": "null" } ], - "title": "Value" - } - }, - "type": "object", - "required": [ - "datetime", - "value" - ], - "title": "FinanceResponseTimeSeriesData" - }, - "ForecastResponse": { - "properties": { - "forecast": { - "type": "string", - "title": "Forecast" - }, - "resolution_criteria": { - "type": "string", - "title": "Resolution Criteria" - }, - "date": { - "type": "string", - "format": "date-time", - "title": "Date" - }, - "reasoning": { - "type": "string", - "title": "Reasoning" - }, - "sources": { - "items": { - "$ref": "#/components/schemas/SearchResponseDictItem" - }, - "type": "array", - "title": "Sources" - }, - "timeline": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Timeline" - }, - "opposite_request": { - "type": "string", - "title": "Opposite Request" - }, - "confidence": { - "type": "number", - "title": "Confidence" + "title": "Bad Domain Url", + "description": "Domain blacklist.This can be a single domain or a list of domains. For example, 'npr.org' or ['nature.com', 'npr.org']" }, - "choice": { + "page_rank": { "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "string" + "type": "null" } ], - "title": "Choice" - }, - "llm_confidence": { - "type": "integer", - "title": "Llm Confidence" + "title": "Page Rank", + "description": "Maximum allowed page rank for returned articles." }, - "model_used": { - "type": "string", - "title": "Model Used" + "diversify_sources": { + "type": "boolean", + "title": "Diversify Sources", + "description": "Ensure that the return set of articles are selected from diverse sources. This adds latency to the search, but attempts to balance the representation of sources by country and source origins. In summary, a net is cast around your search, then the diversity of sources is analyzed, and your final result matches the large net diversity distribution. This means that your search accuracy is reduced, but you gain more diverse perspectives.", + "default": false }, - "likelihood": { + "strategy": { "type": "string", - "title": "Likelihood" + "enum": [ + "latest news", + "news knowledge", + "default" + ], + "title": "Strategy", + "description": "Strategy to use for searching. 'latest news' automatically setsmethod='nl', historical=False, and looks within the past 24 hours. 'news knowledge' automatically sets method='kw', historical=True, and looks within the past 60 days. 'news knowledge' will increase latency due to the larger search space in the archive. Use 'default' if you want to control start_timestamp, end_timestamp, historical, and method.", + "default": "default" }, - "probability": { + "hours_back": { "type": "integer", - "title": "Probability" - }, - "web_search_results": { - "items": { - "$ref": "#/components/schemas/WebSearchResult" - }, - "type": "array", - "title": "Web Search Results" - }, - "summary": { - "type": "string", - "title": "Summary" - }, - "key_people": { - "items": { - "$ref": "#/components/schemas/KeyPerson" - }, - "type": "array", - "title": "Key People" - }, - "key_facets": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Key Facets" - }, - "reconciled_information": { - "type": "string", - "title": "Reconciled Information" - }, - "candidate_models": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Candidate Models" - }, - "unique_information": { - "type": "string", - "title": "Unique Information" - }, - "expert_information": { - "additionalProperties": true, - "type": "object", - "title": "Expert Information", - "default": {} - } - }, - "type": "object", - "required": [ - "forecast", - "resolution_criteria", - "date", - "reasoning", - "sources", - "timeline", - "opposite_request", - "confidence", - "choice", - "llm_confidence", - "model_used", - "likelihood", - "probability", - "web_search_results", - "summary", - "key_people", - "key_facets", - "reconciled_information", - "candidate_models", - "unique_information" - ], - "title": "ForecastResponse" - }, - "GeoCoordinate": { - "properties": { - "latitude": { - "type": "number", - "title": "Latitude" + "title": "Hours Back", + "description": "Can be set to easily control the look back on the search. This is the same as controlling the 'start_timestamp' parameter. The difference is that this is not a timestamp, it is the number of hours back to look from the current time. Defaults to 24 hours.", + "default": 24 }, - "longitude": { - "type": "number", - "title": "Longitude" + "string_guarantee": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "String Guarantee", + "description": "If defined, the search will only occur on articles that contain strings in this list." }, - "metadata": { - "additionalProperties": true, - "type": "object", - "title": "Metadata" - } - }, - "type": "object", - "required": [ - "latitude", - "longitude", - "metadata" - ], - "title": "GeoCoordinate" - }, - "GoogleDocsAction": { - "properties": { - "action": { + "string_guarantee_op": { "type": "string", - "const": "google_docs", - "title": "Action", - "default": "google_docs" + "enum": [ + "AND", + "OR" + ], + "title": "String Guarantee Op", + "description": "Operator to use for string guarantee list.", + "default": "AND" }, - "params": { - "$ref": "#/components/schemas/GoogleDocsParams" - } - }, - "type": "object", - "required": [ - "params" - ], - "title": "GoogleDocsAction" - }, - "GoogleDocsParams": { - "properties": { - "client_json": { - "additionalProperties": true, - "type": "object", - "title": "Client Json", - "description": "The google service account json. This should be a dict. You can get this from the google cloud console. The document will be created in the service account's google drive and shared with the user." + "reverse_string_guarantee": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Reverse String Guarantee", + "description": "If defined, the search will only occur on articles that do not contain strings in this list." }, - "emails": { + "entity_guarantee": { "anyOf": [ { "items": { - "type": "string", - "format": "email" + "type": "string" }, "type": "array" }, @@ -22520,42 +20828,14 @@ "type": "null" } ], - "title": "Emails", - "description": "The emails to share the doc with" - }, - "asknews_watermark": { - "type": "boolean", - "title": "Asknews Watermark", - "description": "Append 'Generated by AskNews AI' watermark", - "default": true - } - }, - "type": "object", - "required": [ - "client_json" - ], - "title": "GoogleDocsParams" - }, - "GraphResponse": { - "properties": { - "full_graph": { - "additionalProperties": true, - "type": "object", - "title": "Full Graph" - }, - "disambiguations": { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array", - "title": "Disambiguations" + "title": "Entity Guarantee", + "description": "Entity guarantee to filter by. This is a list of strings, where each string includes entity type and entity value separated by a colon. The first element is the entity type and the second element is the entity value. For example ['Location:Paris', 'Person:John']" }, - "articles": { + "reverse_entity_guarantee": { "anyOf": [ { "items": { - "$ref": "#/components/schemas/SearchResponseDictItem" + "type": "string" }, "type": "array" }, @@ -22563,25 +20843,104 @@ "type": "null" } ], - "title": "Articles" + "title": "Reverse Entity Guarantee", + "description": "Reverse entity guarantee to filter by. This is a list of strings, where each string includes entity type and entity value separated by a colon. The first element is the entity type and the second element is the entity value. For example ['Location:Paris', 'Person:John']" }, - "query": { + "entity_guarantee_op": { + "type": "string", + "enum": [ + "AND", + "OR" + ], + "title": "Entity Guarantee Op", + "description": "Operator to use for entity guarantee list.", + "default": "OR" + }, + "return_graphs": { + "type": "boolean", + "title": "Return Graphs", + "description": "Return graphs for the articles. Only available to Analyst tier and above.", + "default": false + }, + "return_geo": { + "type": "boolean", + "title": "Return Geo", + "description": "Return GeoCoordinates associated with locations discussed inside the articles. Only available to Analyst tier and above.", + "default": false + }, + "languages": { "anyOf": [ { - "type": "string" + "items": { + "type": "string", + "enum": [ + "sq", + "ar", + "az", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "eo", + "fi", + "fr", + "gl", + "de", + "el", + "he", + "hi", + "hu", + "is", + "id", + "ia", + "it", + "ja", + "kk", + "km", + "ko", + "ky", + "ms", + "mt", + "mhr", + "mn", + "no", + "or", + "pl", + "pt", + "pa", + "ro", + "ru", + "sr", + "sk", + "sl", + "es", + "sv", + "ta", + "te", + "th", + "tr", + "uk", + "vi", + "unknown" + ] + }, + "type": "array" }, { "type": "null" } ], - "title": "Query" + "title": "Languages", + "description": "Languages to filter by. This is the two-letter 'set 1' of the ISO 639-1 standard. For example: English is 'en'." }, - "docs_enhanced": { + "countries": { "anyOf": [ { "items": { - "additionalProperties": true, - "type": "object" + "type": "string" }, "type": "array" }, @@ -22589,516 +20948,368 @@ "type": "null" } ], - "title": "Docs Enhanced" + "title": "Countries", + "description": "Countries to filter by, this is the two-letter ISO country codeFor example: United States is 'US', France is 'FR', Sweden is 'SE'." }, - "triples_url": { + "countries_blacklist": { "anyOf": [ { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" }, { "type": "null" } ], - "title": "Triples Url" + "title": "Countries Blacklist", + "description": "Countries to blacklist, this is the two-letter ISO country code. For example: United States is 'US', France is 'FR', Sweden is 'SE'." }, - "visualize_url": { + "continents": { "anyOf": [ { - "type": "string" + "items": { + "type": "string", + "enum": [ + "Africa", + "Asia", + "Oceania", + "Europe", + "Middle East", + "North America", + "South America" + ] + }, + "type": "array" }, { "type": "null" } - ], - "title": "Visualize Url" - } - }, - "type": "object", - "required": [ - "full_graph", - "disambiguations" - ], - "title": "GraphResponse" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "HitShareItem": { - "properties": { - "domain": { - "type": "string", - "title": "Domain" - }, - "hit_share": { - "type": "number", - "title": "Hit Share" - } - }, - "type": "object", - "required": [ - "domain", - "hit_share" - ], - "title": "HitShareItem" - }, - "HitShareResponse": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/HitShareItem" - }, - "type": "array", - "title": "Data" - }, - "total_share": { - "type": "number", - "title": "Total Share" - } - }, - "type": "object", - "required": [ - "data", - "total_share" - ], - "title": "HitShareResponse" - }, - "IndexCountItem": { - "properties": { - "start": { - "type": "string", - "format": "date-time", - "title": "Start" - }, - "end": { - "type": "string", - "format": "date-time", - "title": "End" - }, - "count": { - "type": "integer", - "title": "Count" - } - }, - "type": "object", - "required": [ - "start", - "end", - "count" - ], - "title": "IndexCountItem" - }, - "IndexUrlsResponse": { - "properties": { - "status": { - "type": "string", - "title": "Status" + ], + "title": "Continents", + "description": "Continents to filter by." }, - "job_id": { + "sentiment": { "anyOf": [ { - "type": "string" + "type": "string", + "enum": [ + "negative", + "neutral", + "positive" + ] }, { "type": "null" } ], - "title": "Job Id" + "title": "Sentiment", + "description": "Sentiment to filter articles by." + }, + "premium": { + "type": "boolean", + "title": "Premium", + "description": "Include premium sources.", + "default": false } }, + "additionalProperties": false, "type": "object", - "required": [ - "status" - ], - "title": "IndexUrlsResponse" + "title": "FilterParams" }, - "IntraClusterStatistics": { + "FilterParamsMetadata": { "properties": { - "cluster_articles_pct": { - "type": "number", - "title": "Cluster Articles Pct", - "default": 0 - }, - "cluster_countries_pct": { - "type": "number", - "title": "Cluster Countries Pct", - "default": 0 - }, - "cluster_domains_pct": { - "type": "number", - "title": "Cluster Domains Pct", - "default": 0 - }, - "cluster_languages_pct": { - "type": "number", - "title": "Cluster Languages Pct", - "default": 0 - }, - "cluster_probabilities": { - "additionalProperties": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "number" - } - ] - }, - "type": "object", - "title": "Cluster Probabilities", - "default": {} + "title": { + "type": "string", + "title": "Title", + "default": "" } }, "type": "object", - "title": "IntraClusterStatistics" + "title": "FilterParamsMetadata" }, - "KeyPerson": { + "FilterParamsResponse": { "properties": { - "name": { - "type": "string", - "title": "Name" + "filter_params": { + "$ref": "#/components/schemas/FilterParams" }, - "role": { - "type": "string", - "title": "Role" + "metadata": { + "$ref": "#/components/schemas/FilterParamsMetadata" } }, "type": "object", "required": [ - "name", - "role" + "filter_params", + "metadata" ], - "title": "KeyPerson" + "title": "FilterParamsResponse" }, - "LegacyReportRequest": { + "ForecastResponse": { "properties": { - "logo_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Url", - "description": "The logo URL to use for the report" + "forecast": { + "type": "string", + "title": "Forecast" }, - "include_appendix": { + "resolution_criteria": { + "type": "string", + "title": "Resolution Criteria" + }, + "date": { + "type": "string", + "format": "date-time", + "title": "Date" + }, + "reasoning": { + "type": "string", + "title": "Reasoning" + }, + "sources": { + "items": { + "$ref": "#/components/schemas/SearchResponseDictItem" + }, + "type": "array", + "title": "Sources" + }, + "timeline": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Timeline" + }, + "opposite_request": { + "type": "string", + "title": "Opposite Request" + }, + "confidence": { + "type": "number", + "title": "Confidence" + }, + "choice": { "anyOf": [ { "type": "boolean" }, { - "type": "null" + "type": "string" } ], - "title": "Include Appendix", - "description": "Whether to append thinking and search traces as an appendix to the report.", - "default": false + "title": "Choice" }, - "asknews_watermark": { - "type": "boolean", - "title": "Asknews Watermark", - "description": "Append 'Generated by AskNews AI' watermark", - "default": true + "llm_confidence": { + "type": "integer", + "title": "Llm Confidence" }, - "identifier": { + "model_used": { "type": "string", - "const": "legacy", - "title": "Identifier", - "default": "legacy" + "title": "Model Used" }, - "model": { + "likelihood": { "type": "string", - "enum": [ - "gpt-5", - "gpt-4o", - "gpt-4.1-2025-04-14", - "gpt-4.1-mini-2025-04-14", - "gpt-4o-mini", - "o3-mini", - "claude-3-5-sonnet-latest", - "claude-sonnet-4-20250514", - "claude-sonnet-4-5-20250929", - "claude-opus-4-5-20251101", - "claude-opus-4-6", - "claude-fable-5", - "claude-sonnet-4-6", - "claude-sonnet-5", - "claude-opus-4-8", - "claude-opus-5", - "gpt-5.6-terra", - "gpt-5.6-sol", - "meta-llama/Meta-Llama-3.1-405B-Instruct", - "meta-llama/Meta-Llama-3.3-70B-Instruct" - ], - "title": "Model", - "description": "The model to use for the report. Defaults to claude-sonnet-5.", - "default": "claude-sonnet-5", - "example": "gpt-4o" + "title": "Likelihood" + }, + "probability": { + "type": "integer", + "title": "Probability" + }, + "web_search_results": { + "items": { + "$ref": "#/components/schemas/WebSearchResult" + }, + "type": "array", + "title": "Web Search Results" + }, + "summary": { + "type": "string", + "title": "Summary" + }, + "key_people": { + "items": { + "$ref": "#/components/schemas/KeyPerson" + }, + "type": "array", + "title": "Key People" + }, + "key_facets": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Key Facets" + }, + "reconciled_information": { + "type": "string", + "title": "Reconciled Information" + }, + "candidate_models": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Candidate Models" + }, + "unique_information": { + "type": "string", + "title": "Unique Information" + }, + "expert_information": { + "additionalProperties": true, + "type": "object", + "title": "Expert Information", + "default": {} + } + }, + "type": "object", + "required": [ + "forecast", + "resolution_criteria", + "date", + "reasoning", + "sources", + "timeline", + "opposite_request", + "confidence", + "choice", + "llm_confidence", + "model_used", + "likelihood", + "probability", + "web_search_results", + "summary", + "key_people", + "key_facets", + "reconciled_information", + "candidate_models", + "unique_information" + ], + "title": "ForecastResponse" + }, + "GeoCoordinate": { + "properties": { + "latitude": { + "type": "number", + "title": "Latitude" + }, + "longitude": { + "type": "number", + "title": "Longitude" + }, + "metadata": { + "additionalProperties": true, + "type": "object", + "title": "Metadata" } }, "type": "object", - "title": "LegacyReportRequest", - "description": "DEPRECATED - Use DeepNewsReportRequest instead.\nLegacy report configuration (original format).\n\nThis is the original ReportRequest format that uses a simple model field\nfor report generation without DeepNews capabilities." + "required": [ + "latitude", + "longitude", + "metadata" + ], + "title": "GeoCoordinate" }, - "ListDeepNewsModelResponse": { + "GoogleDocsAction": { "properties": { - "models": { - "items": { - "$ref": "#/components/schemas/DeepNewsModelItem" - }, - "type": "array", - "title": "Models" + "action": { + "type": "string", + "const": "google_docs", + "title": "Action", + "default": "google_docs" + }, + "params": { + "$ref": "#/components/schemas/GoogleDocsParams" } }, "type": "object", "required": [ - "models" + "params" ], - "title": "ListDeepNewsModelResponse" + "title": "GoogleDocsAction" }, - "MCPFilterParams": { + "GoogleDocsParams": { "properties": { - "query": { - "type": "string", - "title": "Query", - "description": "Query string that can be any phrase, keyword, question, or paragraph. If method='nl', then this will be used as a natural language query. If method='kw', then this will be used as a direct keyword query. This is not required, if it is not passed, then the search is based on the remaining filters only.", - "default": "" - }, - "n_articles": { - "type": "integer", - "title": "N Articles", - "description": "Number of articles to return", - "default": 10 - }, - "start_timestamp": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Start Timestamp", - "description": "Timestamp to start search from" - }, - "end_timestamp": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "End Timestamp", - "description": "Timestamp to end search at" - }, - "time_filter": { - "type": "string", - "enum": [ - "crawl_date", - "pub_date" - ], - "title": "Time Filter", - "description": "Control which date type to filter on. 'crawl_date' is the date the article was crawled, 'pub_date' is the date the article was published.", - "default": "crawl_date" - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "string" - } - ], - "title": "Offset", - "description": "The number of results to offset for followup queries. Use for pagination. The value to put here is returned in the response.offset from previous searches.", - "default": 0 - }, - "categories": { - "items": { - "type": "string", - "enum": [ - "All", - "Business", - "Crime", - "Politics", - "Science", - "Sports", - "Technology", - "Military", - "Health", - "Entertainment", - "Finance", - "Culture", - "Climate", - "Environment", - "World" - ] - }, - "type": "array", - "title": "Categories", - "description": "Categories of news to filter on", - "default": [ - "All" - ] - }, - "provocative": { - "type": "string", - "enum": [ - "unknown", - "low", - "medium", - "high", - "all" - ], - "title": "Provocative", - "description": "Filter articles based on how provocative they are deemed based on the use of provocative language and emotional vocabulary.", - "default": "all" - }, - "authors": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Authors", - "description": "Authors to filter articles by." + "client_json": { + "additionalProperties": true, + "type": "object", + "title": "Client Json", + "description": "The google service account json. This should be a dict. You can get this from the google cloud console. The document will be created in the service account's google drive and shared with the user." }, - "reporting_voice": { + "emails": { "anyOf": [ { "items": { "type": "string", - "enum": [ - "Objective", - "Subjective", - "Investigative", - "Narrative", - "Analytical", - "Advocacy", - "Conversational", - "Satirical", - "Emotive", - "Explanatory", - "Persuasive", - "Sensational", - "Unknown", - "all" - ] - }, - "type": "array" - }, - { - "type": "string", - "enum": [ - "Objective", - "Subjective", - "Investigative", - "Narrative", - "Analytical", - "Advocacy", - "Conversational", - "Satirical", - "Emotive", - "Explanatory", - "Persuasive", - "Sensational", - "Unknown", - "all" - ] - } - ], - "title": "Reporting Voice", - "description": "Type of reporting voice to filer by.", - "default": [ - "all" - ] - }, - "domain_url": { - "anyOf": [ - { - "items": { - "type": "string" + "format": "email" }, "type": "array" }, - { - "type": "string" - }, { "type": "null" } ], - "title": "Domain Url", - "description": "filter by domain url of interest. This can be a single domain or a list of domains. For example, 'npr.org' or ['nature.com', 'npr.org']" + "title": "Emails", + "description": "The emails to share the doc with" + }, + "asknews_watermark": { + "type": "boolean", + "title": "Asknews Watermark", + "description": "Append 'Generated by AskNews AI' watermark", + "default": true + } + }, + "type": "object", + "required": [ + "client_json" + ], + "title": "GoogleDocsParams" + }, + "GraphResponse": { + "properties": { + "full_graph": { + "additionalProperties": true, + "type": "object", + "title": "Full Graph" }, - "bad_domain_url": { + "disambiguations": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array", + "title": "Disambiguations" + }, + "articles": { "anyOf": [ { "items": { - "type": "string" + "$ref": "#/components/schemas/SearchResponseDictItem" }, "type": "array" }, - { - "type": "string" - }, { "type": "null" } ], - "title": "Bad Domain Url", - "description": "Domain blacklist.This can be a single domain or a list of domains. For example, 'npr.org' or ['nature.com', 'npr.org']" + "title": "Articles" }, - "page_rank": { + "query": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Page Rank", - "description": "Maximum allowed page rank for returned articles." - }, - "hours_back": { - "type": "integer", - "title": "Hours Back", - "description": "Can be set to easily control the look back on the search. This is the same as controlling the 'start_timestamp' parameter. The difference is that this is not a timestamp, it is the number of hours back to look from the current time. Defaults to 24 hours.", - "default": 24 + "title": "Query" }, - "string_guarantee": { + "docs_enhanced": { "anyOf": [ { "items": { - "type": "string" + "additionalProperties": true, + "type": "object" }, "type": "array" }, @@ -23106,312 +21317,467 @@ "type": "null" } ], - "title": "String Guarantee", - "description": "If defined, the search will only occur on articles that contain strings in this list." - }, - "string_guarantee_op": { - "type": "string", - "enum": [ - "AND", - "OR" - ], - "title": "String Guarantee Op", - "description": "Operator to use for string guarantee list.", - "default": "AND" + "title": "Docs Enhanced" }, - "reverse_string_guarantee": { + "triples_url": { "anyOf": [ { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" }, { "type": "null" } ], - "title": "Reverse String Guarantee", - "description": "If defined, the search will only occur on articles that do not contain strings in this list." + "title": "Triples Url" }, - "entity_guarantee": { + "visualize_url": { "anyOf": [ { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" }, { "type": "null" } ], - "title": "Entity Guarantee", - "description": "Entity guarantee to filter by. This is a list of strings, where each string includes entity type and entity value separated by a colon. The first element is the entity type and the second element is the entity value. For example ['Location:Paris', 'Person:John']" + "title": "Visualize Url" + } + }, + "type": "object", + "required": [ + "full_graph", + "disambiguations" + ], + "title": "GraphResponse" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "HitShareItem": { + "properties": { + "domain": { + "type": "string", + "title": "Domain" }, - "reverse_entity_guarantee": { + "hit_share": { + "type": "number", + "title": "Hit Share" + } + }, + "type": "object", + "required": [ + "domain", + "hit_share" + ], + "title": "HitShareItem" + }, + "HitShareResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/HitShareItem" + }, + "type": "array", + "title": "Data" + }, + "total_share": { + "type": "number", + "title": "Total Share" + } + }, + "type": "object", + "required": [ + "data", + "total_share" + ], + "title": "HitShareResponse" + }, + "IndexCountItem": { + "properties": { + "start": { + "type": "string", + "format": "date-time", + "title": "Start" + }, + "end": { + "type": "string", + "format": "date-time", + "title": "End" + }, + "count": { + "type": "integer", + "title": "Count" + } + }, + "type": "object", + "required": [ + "start", + "end", + "count" + ], + "title": "IndexCountItem" + }, + "IndexUrlsResponse": { + "properties": { + "status": { + "type": "string", + "title": "Status" + }, + "job_id": { "anyOf": [ { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" }, { "type": "null" } ], - "title": "Reverse Entity Guarantee", - "description": "Reverse entity guarantee to filter by. This is a list of strings, where each string includes entity type and entity value separated by a colon. The first element is the entity type and the second element is the entity value. For example ['Location:Paris', 'Person:John']" + "title": "Job Id" + } + }, + "type": "object", + "required": [ + "status" + ], + "title": "IndexUrlsResponse" + }, + "IntraClusterStatistics": { + "properties": { + "cluster_articles_pct": { + "type": "number", + "title": "Cluster Articles Pct", + "default": 0 }, - "entity_guarantee_op": { - "type": "string", - "enum": [ - "AND", - "OR" - ], - "title": "Entity Guarantee Op", - "description": "Operator to use for entity guarantee list.", - "default": "OR" + "cluster_countries_pct": { + "type": "number", + "title": "Cluster Countries Pct", + "default": 0 }, - "languages": { - "anyOf": [ - { - "items": { - "type": "string", - "enum": [ - "sq", - "ar", - "az", - "ca", - "zh", - "hr", - "cs", - "da", - "nl", - "en", - "eo", - "fi", - "fr", - "gl", - "de", - "el", - "he", - "hi", - "hu", - "is", - "id", - "ia", - "it", - "ja", - "kk", - "km", - "ko", - "ky", - "ms", - "mt", - "mhr", - "mn", - "no", - "or", - "pl", - "pt", - "pa", - "ro", - "ru", - "sr", - "sk", - "sl", - "es", - "sv", - "ta", - "te", - "th", - "tr", - "uk", - "vi", - "unknown" - ] + "cluster_domains_pct": { + "type": "number", + "title": "Cluster Domains Pct", + "default": 0 + }, + "cluster_languages_pct": { + "type": "number", + "title": "Cluster Languages Pct", + "default": 0 + }, + "cluster_probabilities": { + "additionalProperties": { + "anyOf": [ + { + "type": "integer" }, - "type": "array" + { + "type": "number" + } + ] + }, + "type": "object", + "title": "Cluster Probabilities", + "default": {} + } + }, + "type": "object", + "title": "IntraClusterStatistics" + }, + "KeyPerson": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "role": { + "type": "string", + "title": "Role" + } + }, + "type": "object", + "required": [ + "name", + "role" + ], + "title": "KeyPerson" + }, + "LegacyReportRequest": { + "properties": { + "logo_url": { + "anyOf": [ + { + "type": "string", + "maxLength": 2083, + "minLength": 1, + "format": "uri" }, { "type": "null" } ], - "title": "Languages", - "description": "Languages to filter by. This is the two-letter 'set 1' of the ISO 639-1 standard. For example: English is 'en'." + "title": "Logo Url", + "description": "The logo URL to use for the report" }, - "countries": { + "include_appendix": { "anyOf": [ { - "items": { - "type": "string" - }, - "type": "array" + "type": "boolean" }, { "type": "null" } ], - "title": "Countries", - "description": "Countries to filter by, this is the two-letter ISO country codeFor example: United States is 'US', France is 'FR', Sweden is 'SE'." + "title": "Include Appendix", + "description": "Whether to append thinking and search traces as an appendix to the report.", + "default": false }, - "countries_blacklist": { + "asknews_watermark": { + "type": "boolean", + "title": "Asknews Watermark", + "description": "Append 'Generated by AskNews AI' watermark", + "default": true + }, + "identifier": { + "type": "string", + "const": "legacy", + "title": "Identifier", + "default": "legacy" + }, + "model": { + "type": "string", + "enum": [ + "gpt-5", + "gpt-4o", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4o-mini", + "o3-mini", + "claude-3-5-sonnet-latest", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-fable-5", + "claude-fable-5-1", + "claude-sonnet-4-6", + "claude-sonnet-5", + "claude-opus-4-8", + "claude-opus-5", + "gpt-5.6-terra", + "gpt-5.6-sol", + "gpt-6-astra", + "meta-llama/Meta-Llama-3.1-405B-Instruct", + "meta-llama/Meta-Llama-3.3-70B-Instruct" + ], + "title": "Model", + "description": "The model to use for the report. Defaults to claude-sonnet-5.", + "default": "claude-sonnet-5", + "example": "gpt-4o" + } + }, + "type": "object", + "title": "LegacyReportRequest", + "description": "DEPRECATED - Use DeepNewsReportRequest instead.\nLegacy report configuration (original format).\n\nThis is the original ReportRequest format that uses a simple model field\nfor report generation without DeepNews capabilities." + }, + "ListDeepNewsModelResponse": { + "properties": { + "models": { + "items": { + "$ref": "#/components/schemas/DeepNewsModelItem" + }, + "type": "array", + "title": "Models" + } + }, + "type": "object", + "required": [ + "models" + ], + "title": "ListDeepNewsModelResponse" + }, + "MCPFilterParams": { + "properties": { + "query": { + "type": "string", + "title": "Query", + "description": "Query string that can be any phrase, keyword, question, or paragraph. If method='nl', then this will be used as a natural language query. If method='kw', then this will be used as a direct keyword query. This is not required, if it is not passed, then the search is based on the remaining filters only.", + "default": "" + }, + "n_articles": { + "type": "integer", + "title": "N Articles", + "description": "Number of articles to return", + "default": 10 + }, + "start_timestamp": { "anyOf": [ { - "items": { - "type": "string" - }, - "type": "array" + "type": "integer" }, { "type": "null" } ], - "title": "Countries Blacklist", - "description": "Countries to blacklist, this is the two-letter ISO country code. For example: United States is 'US', France is 'FR', Sweden is 'SE'." + "title": "Start Timestamp", + "description": "Timestamp to start search from" }, - "continents": { + "end_timestamp": { "anyOf": [ { - "items": { - "type": "string", - "enum": [ - "Africa", - "Asia", - "Oceania", - "Europe", - "Middle East", - "North America", - "South America" - ] - }, - "type": "array" + "type": "integer" }, { "type": "null" } ], - "title": "Continents", - "description": "Continents to filter by." + "title": "End Timestamp", + "description": "Timestamp to end search at" }, - "sentiment": { + "time_filter": { + "type": "string", + "enum": [ + "crawl_date", + "pub_date" + ], + "title": "Time Filter", + "description": "Control which date type to filter on. 'crawl_date' is the date the article was crawled, 'pub_date' is the date the article was published.", + "default": "crawl_date" + }, + "offset": { "anyOf": [ { - "type": "string", - "enum": [ - "negative", - "neutral", - "positive" - ] + "type": "integer" }, { - "type": "null" + "type": "string" } ], - "title": "Sentiment", - "description": "Sentiment to filter articles by." - } - }, - "type": "object", - "title": "MCPFilterParams" - }, - "MessageStartEvent": { - "properties": { - "type": { - "type": "string", - "const": "message_start", - "title": "Type", - "default": "message_start" + "title": "Offset", + "description": "The number of results to offset for followup queries. Use for pagination. The value to put here is returned in the response.offset from previous searches.", + "default": 0 }, - "role": { - "type": "string", - "const": "assistant", - "title": "Role", - "default": "assistant" - } - }, - "type": "object", - "title": "MessageStartEvent" - }, - "MessageStopEvent": { - "properties": { - "type": { - "type": "string", - "const": "message_stop", - "title": "Type", - "default": "message_stop" - } - }, - "type": "object", - "title": "MessageStopEvent" - }, - "NewsletterContactCreateResponse": { - "properties": { - "id": { - "type": "string", - "title": "Id" - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "NewsletterContactCreateResponse" - }, - "NewsletterContactRequest": { - "properties": { - "email": { + "categories": { + "items": { + "type": "string", + "enum": [ + "All", + "Business", + "Crime", + "Politics", + "Science", + "Sports", + "Technology", + "Military", + "Health", + "Entertainment", + "Finance", + "Culture", + "Climate", + "Environment", + "World" + ] + }, + "type": "array", + "title": "Categories", + "description": "Categories of news to filter on", + "default": [ + "All" + ] + }, + "provocative": { "type": "string", - "title": "Email" + "enum": [ + "unknown", + "low", + "medium", + "high", + "all" + ], + "title": "Provocative", + "description": "Filter articles based on how provocative they are deemed based on the use of provocative language and emotional vocabulary.", + "default": "all" }, - "first_name": { + "authors": { "anyOf": [ { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" }, { "type": "null" } ], - "title": "First Name" + "title": "Authors", + "description": "Authors to filter articles by." }, - "last_name": { + "reporting_voice": { "anyOf": [ { - "type": "string" + "items": { + "type": "string", + "enum": [ + "Objective", + "Subjective", + "Investigative", + "Narrative", + "Analytical", + "Advocacy", + "Conversational", + "Satirical", + "Emotive", + "Explanatory", + "Persuasive", + "Sensational", + "Unknown", + "all" + ] + }, + "type": "array" }, { - "type": "null" + "type": "string", + "enum": [ + "Objective", + "Subjective", + "Investigative", + "Narrative", + "Analytical", + "Advocacy", + "Conversational", + "Satirical", + "Emotive", + "Explanatory", + "Persuasive", + "Sensational", + "Unknown", + "all" + ] } ], - "title": "Last Name" - }, - "unsubscribed": { - "type": "boolean", - "title": "Unsubscribed", - "default": false - } - }, - "type": "object", - "required": [ - "email" - ], - "title": "NewsletterContactRequest" - }, - "NewsletterContactResponse": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "email": { - "type": "string", - "title": "Email" + "title": "Reporting Voice", + "description": "Type of reporting voice to filer by.", + "default": [ + "all" + ] }, - "first_name": { + "domain_url": { "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, { "type": "string" }, @@ -23419,10 +21785,17 @@ "type": "null" } ], - "title": "First Name" + "title": "Domain Url", + "description": "filter by domain url of interest. This can be a single domain or a list of domains. For example, 'npr.org' or ['nature.com', 'npr.org']" }, - "last_name": { + "bad_domain_url": { "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, { "type": "string" }, @@ -23430,232 +21803,279 @@ "type": "null" } ], - "title": "Last Name" - }, - "created_at": { - "type": "string", - "title": "Created At" - }, - "unsubscribed": { - "type": "boolean", - "title": "Unsubscribed" - } - }, - "type": "object", - "required": [ - "id", - "email", - "created_at", - "unsubscribed" - ], - "title": "NewsletterContactResponse" - }, - "NewsletterContactUpdateResponse": { - "properties": { - "id": { - "type": "string", - "title": "Id" - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "NewsletterContactUpdateResponse" - }, - "NewsletterPublicResponse": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "query": { - "type": "string", - "title": "Query" - } - }, - "type": "object", - "required": [ - "id", - "name", - "query" - ], - "title": "NewsletterPublicResponse" - }, - "NewsletterResponse": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" + "title": "Bad Domain Url", + "description": "Domain blacklist.This can be a single domain or a list of domains. For example, 'npr.org' or ['nature.com', 'npr.org']" }, - "created_at": { + "page_rank": { "anyOf": [ { - "type": "string", - "format": "date-time" + "type": "integer" }, { "type": "null" } ], - "title": "Created At" + "title": "Page Rank", + "description": "Maximum allowed page rank for returned articles." }, - "updated_at": { + "hours_back": { + "type": "integer", + "title": "Hours Back", + "description": "Can be set to easily control the look back on the search. This is the same as controlling the 'start_timestamp' parameter. The difference is that this is not a timestamp, it is the number of hours back to look from the current time. Defaults to 24 hours.", + "default": 24 + }, + "string_guarantee": { "anyOf": [ { - "type": "string", - "format": "date-time" + "items": { + "type": "string" + }, + "type": "array" }, { "type": "null" } ], - "title": "Updated At" + "title": "String Guarantee", + "description": "If defined, the search will only occur on articles that contain strings in this list." }, - "user_id": { + "string_guarantee_op": { "type": "string", - "format": "uuid", - "title": "User Id" + "enum": [ + "AND", + "OR" + ], + "title": "String Guarantee Op", + "description": "Operator to use for string guarantee list.", + "default": "AND" }, - "alert_id": { + "reverse_string_guarantee": { "anyOf": [ { - "type": "string", - "format": "uuid" + "items": { + "type": "string" + }, + "type": "array" }, { "type": "null" } ], - "title": "Alert Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "query": { - "type": "string", - "title": "Query" - }, - "cron": { - "type": "string", - "title": "Cron" + "title": "Reverse String Guarantee", + "description": "If defined, the search will only occur on articles that do not contain strings in this list." }, - "model": { + "entity_guarantee": { "anyOf": [ { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" }, { "type": "null" } ], - "title": "Model" + "title": "Entity Guarantee", + "description": "Entity guarantee to filter by. This is a list of strings, where each string includes entity type and entity value separated by a colon. The first element is the entity type and the second element is the entity value. For example ['Location:Paris', 'Person:John']" }, - "subject": { + "reverse_entity_guarantee": { "anyOf": [ { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" }, { "type": "null" } ], - "title": "Subject" + "title": "Reverse Entity Guarantee", + "description": "Reverse entity guarantee to filter by. This is a list of strings, where each string includes entity type and entity value separated by a colon. The first element is the entity type and the second element is the entity value. For example ['Location:Paris', 'Person:John']" }, - "sender": { + "entity_guarantee_op": { "type": "string", - "title": "Sender" + "enum": [ + "AND", + "OR" + ], + "title": "Entity Guarantee Op", + "description": "Operator to use for entity guarantee list.", + "default": "OR" }, - "logo_url": { + "languages": { "anyOf": [ { - "type": "string" + "items": { + "type": "string", + "enum": [ + "sq", + "ar", + "az", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "eo", + "fi", + "fr", + "gl", + "de", + "el", + "he", + "hi", + "hu", + "is", + "id", + "ia", + "it", + "ja", + "kk", + "km", + "ko", + "ky", + "ms", + "mt", + "mhr", + "mn", + "no", + "or", + "pl", + "pt", + "pa", + "ro", + "ru", + "sr", + "sk", + "sl", + "es", + "sv", + "ta", + "te", + "th", + "tr", + "uk", + "vi", + "unknown" + ] + }, + "type": "array" }, { "type": "null" } ], - "title": "Logo Url" + "title": "Languages", + "description": "Languages to filter by. This is the two-letter 'set 1' of the ISO 639-1 standard. For example: English is 'en'." }, - "reply_to": { + "countries": { "anyOf": [ { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" }, { "type": "null" } ], - "title": "Reply To" + "title": "Countries", + "description": "Countries to filter by, this is the two-letter ISO country codeFor example: United States is 'US', France is 'FR', Sweden is 'SE'." }, - "audience_id": { + "countries_blacklist": { "anyOf": [ { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" }, { "type": "null" } ], - "title": "Audience Id" + "title": "Countries Blacklist", + "description": "Countries to blacklist, this is the two-letter ISO country code. For example: United States is 'US', France is 'FR', Sweden is 'SE'." }, - "resend_api_key": { + "continents": { "anyOf": [ { - "type": "string" + "items": { + "type": "string", + "enum": [ + "Africa", + "Asia", + "Oceania", + "Europe", + "Middle East", + "North America", + "South America" + ] + }, + "type": "array" }, { "type": "null" } ], - "title": "Resend Api Key" - }, - "public": { - "type": "boolean", - "title": "Public", - "default": true - }, - "active": { - "type": "boolean", - "title": "Active", - "default": true + "title": "Continents", + "description": "Continents to filter by." }, - "expires_at": { + "sentiment": { "anyOf": [ { "type": "string", - "format": "date-time" + "enum": [ + "negative", + "neutral", + "positive" + ] }, { "type": "null" } ], - "title": "Expires At" + "title": "Sentiment", + "description": "Sentiment to filter articles by." } }, "type": "object", - "required": [ - "id", - "user_id", - "name", - "query", - "cron", - "model", - "subject", - "sender", - "logo_url", - "reply_to", - "audience_id", - "resend_api_key" - ], - "title": "NewsletterResponse" + "title": "MCPFilterParams" + }, + "MessageStartEvent": { + "properties": { + "type": { + "type": "string", + "const": "message_start", + "title": "Type", + "default": "message_start" + }, + "role": { + "type": "string", + "const": "assistant", + "title": "Role", + "default": "assistant" + } + }, + "type": "object", + "title": "MessageStartEvent" + }, + "MessageStopEvent": { + "properties": { + "type": { + "type": "string", + "const": "message_stop", + "title": "Type", + "default": "message_stop" + } + }, + "type": "object", + "title": "MessageStopEvent" }, "OrganizationProfile": { "properties": { @@ -23681,142 +22101,52 @@ "title": "OrganizationProfile" }, "OrganizationProfileSubscription": { - "properties": { - "status": { - "type": "string", - "title": "Status" - }, - "plan": { - "type": "string", - "title": "Plan" - }, - "period_start": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Period Start" - }, - "period_end": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Period End" - } - }, - "type": "object", - "required": [ - "status", - "plan" - ], - "title": "OrganizationProfileSubscription" - }, - "PaginatedResponse_AlertLog_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AlertLog" - }, - "type": "array", - "title": "Items" - }, - "count": { - "type": "integer", - "title": "Count" - }, - "next_page": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Next Page" - }, - "previous_page": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Previous Page" - } - }, - "type": "object", - "required": [ - "items", - "count", - "next_page", - "previous_page" - ], - "title": "PaginatedResponse[AlertLog]" - }, - "PaginatedResponse_AlertResponse_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AlertResponse" - }, - "type": "array", - "title": "Items" + "properties": { + "status": { + "type": "string", + "title": "Status" }, - "count": { - "type": "integer", - "title": "Count" + "plan": { + "type": "string", + "title": "Plan" }, - "next_page": { + "period_start": { "anyOf": [ { - "type": "integer" + "type": "string", + "format": "date-time" }, { "type": "null" } ], - "title": "Next Page" + "title": "Period Start" }, - "previous_page": { + "period_end": { "anyOf": [ { - "type": "integer" + "type": "string", + "format": "date-time" }, { "type": "null" } ], - "title": "Previous Page" + "title": "Period End" } }, "type": "object", "required": [ - "items", - "count", - "next_page", - "previous_page" + "status", + "plan" ], - "title": "PaginatedResponse[AlertResponse]" + "title": "OrganizationProfileSubscription" }, - "PaginatedResponse_NewsletterPublicResponse_": { + "PaginatedResponse_AlertLog_": { "properties": { "items": { "items": { - "$ref": "#/components/schemas/NewsletterPublicResponse" + "$ref": "#/components/schemas/AlertLog" }, "type": "array", "title": "Items" @@ -23855,13 +22185,13 @@ "next_page", "previous_page" ], - "title": "PaginatedResponse[NewsletterPublicResponse]" + "title": "PaginatedResponse[AlertLog]" }, - "PaginatedResponse_NewsletterResponse_": { + "PaginatedResponse_AlertResponse_": { "properties": { "items": { "items": { - "$ref": "#/components/schemas/NewsletterResponse" + "$ref": "#/components/schemas/AlertResponse" }, "type": "array", "title": "Items" @@ -23900,7 +22230,7 @@ "next_page", "previous_page" ], - "title": "PaginatedResponse[NewsletterResponse]" + "title": "PaginatedResponse[AlertResponse]" }, "PaginatedResponse_ReadDomainResponse_": { "properties": { @@ -25315,69 +23645,6 @@ ], "title": "SeriesConfig" }, - "SourceReportItem": { - "properties": { - "bson_date": { - "type": "string", - "format": "date-time", - "title": "Bson Date" - }, - "n_bucket": { - "type": "integer", - "title": "N Bucket" - }, - "n_selected": { - "type": "integer", - "title": "N Selected" - }, - "bucket_counts": { - "additionalProperties": { - "type": "integer" - }, - "type": "object", - "title": "Bucket Counts" - }, - "selected_counts": { - "additionalProperties": { - "type": "integer" - }, - "type": "object", - "title": "Selected Counts" - }, - "bucket_pct": { - "additionalProperties": { - "type": "number" - }, - "type": "object", - "title": "Bucket Pct" - }, - "selected_pct": { - "additionalProperties": { - "type": "number" - }, - "type": "object", - "title": "Selected Pct" - } - }, - "type": "object", - "required": [ - "bson_date", - "n_bucket", - "n_selected", - "bucket_counts", - "selected_counts", - "bucket_pct", - "selected_pct" - ], - "title": "SourceReportItem" - }, - "SourceReportResponse": { - "items": { - "$ref": "#/components/schemas/SourceReportItem" - }, - "type": "array", - "title": "SourceReportResponse" - }, "Sources": { "items": { "oneOf": [ @@ -26024,7 +24291,8 @@ }, "hit_count": { "type": "integer", - "title": "Hit Count" + "title": "Hit Count", + "description": "Raw event count for the selected ranking metric" } }, "type": "object", @@ -26337,297 +24605,114 @@ ], "description": "Configuration for actions to trigger for the alert. Available actions are: WebhookAction, EmailAction, ResendBroadcastAction, GoogleDocsAction" }, - "always_trigger": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Always Trigger", - "description": "Whether to always trigger the actions when sources are scanned. This skips the check for if the alert conditions are satisfied and run triggers immediately. Defaults to False." - }, - "repeat": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Repeat", - "description": "Whether to repeat the alert. Default is True. If False, the alert will be disabled after it triggers once." - }, - "active": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Active", - "description": "Whether the alert is active or not. Default is True." - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At", - "description": "The expiration date for the alert. Default is None. If set, the alert will be disabled after this date." - }, - "report": { - "anyOf": [ - { - "$ref": "#/components/schemas/LegacyReportRequest" - }, - { - "$ref": "#/components/schemas/DeepNewsReportRequest" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/LegacyReportRequest" - }, - { - "$ref": "#/components/schemas/DeepNewsReportRequest" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Report", - "description": "Configuration for generating a written report when the alert triggers. If report is a list, the individual reports will be concatenated into one report in the order they are defined. If not specified, no report is generated. Use ReportRequest(identifier='deepnews', ...) for DeepNews reports.Use ReportRequest(...) or ReportRequest(identifier='legacy', ...) for legacy reports (DEPRECATED). Requests without identifier default to 'deepnews'. Only DeepNews reports can be used in list." - }, - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Title", - "description": "The title of the alert. If not provided, no title will be used.", - "example": "Alert for US President's statements on the economy" - }, - "share_link": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Share Link", - "description": "The newsplunker share link to update when the alert triggers." - } - }, - "type": "object", - "title": "UpdateAlertRequest" - }, - "UpdateNewsletterRequest": { - "properties": { - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name", - "description": "The name of the newsletter.", - "example": "Daily Economy News" - }, - "query": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Query", - "description": "The natural language query to run for the newsletter.", - "example": "Send me the latest news on the economy." - }, - "cron": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cron", - "description": "The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples", - "example": "0 0 * * *" - }, - "model": { - "anyOf": [ - { - "type": "string", - "enum": [ - "gpt-4o", - "gpt-4o-mini", - "claude-3-5-sonnet-latest", - "meta-llama/Meta-Llama-3.1-405B-Instruct", - "meta-llama/Meta-Llama-3.3-70B-Instruct" - ] - }, - { - "type": "null" - } - ], - "title": "Model", - "description": "The model to use for the newsletter.", - "example": "gpt-4o-mini" - }, - "subject": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Subject", - "description": "The subject of the newsletter. If not provided it will be auto generated.", - "example": "Your Daily Economy News" - }, - "sender": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Sender", - "description": "The sender of the newsletter.", - "example": "Your Name " - }, - "logo_url": { + "always_trigger": { "anyOf": [ { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" + "type": "boolean" }, { "type": "null" } ], - "title": "Logo Url", - "description": "The logo URL for the newsletter.", - "example": "https://example.com/logo.png" + "title": "Always Trigger", + "description": "Whether to always trigger the actions when sources are scanned. This skips the check for if the alert conditions are satisfied and run triggers immediately. Defaults to False." }, - "reply_to": { + "repeat": { "anyOf": [ { - "type": "string" + "type": "boolean" }, { "type": "null" } ], - "title": "Reply To", - "description": "The reply-to address for the newsletter. If not provided, the sender will be used.", - "example": "Your Name " + "title": "Repeat", + "description": "Whether to repeat the alert. Default is True. If False, the alert will be disabled after it triggers once." }, - "audience_id": { + "active": { "anyOf": [ { - "type": "string" + "type": "boolean" }, { "type": "null" } ], - "title": "Audience Id", - "description": "The audience ID to use for the newsletter. If not provided a new audience will be created.", - "example": "123e4567-e89b-12d3-a456-426614174000" + "title": "Active", + "description": "Whether the alert is active or not. Default is True." }, - "resend_api_key": { + "expires_at": { "anyOf": [ { - "type": "string" + "type": "string", + "format": "date-time" }, { "type": "null" } ], - "title": "Resend Api Key", - "description": "The resend API key to use for the newsletter. If not provided, the newsletter will not be sent.", - "example": "re_123456789" + "title": "Expires At", + "description": "The expiration date for the alert. Default is None. If set, the alert will be disabled after this date." }, - "public": { + "report": { "anyOf": [ { - "type": "boolean" + "$ref": "#/components/schemas/LegacyReportRequest" + }, + { + "$ref": "#/components/schemas/DeepNewsReportRequest" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/LegacyReportRequest" + }, + { + "$ref": "#/components/schemas/DeepNewsReportRequest" + } + ] + }, + "type": "array" }, { "type": "null" } ], - "title": "Public", - "description": "Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown." + "title": "Report", + "description": "Configuration for generating a written report when the alert triggers. If report is a list, the individual reports will be concatenated into one report in the order they are defined. If not specified, no report is generated. Use ReportRequest(identifier='deepnews', ...) for DeepNews reports.Use ReportRequest(...) or ReportRequest(identifier='legacy', ...) for legacy reports (DEPRECATED). Requests without identifier default to 'deepnews'. Only DeepNews reports can be used in list." }, - "active": { + "title": { "anyOf": [ { - "type": "boolean" + "type": "string" }, { "type": "null" } ], - "title": "Active", - "description": "Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent." + "title": "Title", + "description": "The title of the alert. If not provided, no title will be used.", + "example": "Alert for US President's statements on the economy" }, - "expires_at": { + "share_link": { "anyOf": [ { "type": "string", - "format": "date-time" + "maxLength": 2083, + "minLength": 1, + "format": "uri" }, { "type": "null" } ], - "title": "Expires At", - "description": "The expiration date for the alert. Default is None. If set, the alert will be disabled after this date." + "title": "Share Link", + "description": "The newsplunker share link to update when the alert triggers." } }, "type": "object", - "title": "UpdateNewsletterRequest" + "title": "UpdateAlertRequest" }, "UpsertApiKeyRequest": { "properties": { @@ -27409,30 +25494,6 @@ } ] }, - "abc__APIErrorModel__109": { - "properties": { - "code": { - "type": "integer", - "title": "Code" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "code", - "detail" - ], - "title": "APIErrorModel", - "examples": [ - { - "code": 405000, - "detail": "Method Not Allowed" - } - ] - }, "abc__APIErrorModel__11": { "properties": { "code": { @@ -27457,174 +25518,6 @@ } ] }, - "abc__APIErrorModel__110": { - "properties": { - "code": { - "type": "integer", - "title": "Code" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "code", - "detail" - ], - "title": "APIErrorModel", - "examples": [ - { - "code": 403000, - "detail": "Forbidden" - } - ] - }, - "abc__APIErrorModel__111": { - "properties": { - "code": { - "type": "integer", - "title": "Code" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "code", - "detail" - ], - "title": "APIErrorModel", - "examples": [ - { - "code": 401000, - "detail": "Unauthorized" - } - ] - }, - "abc__APIErrorModel__112": { - "properties": { - "code": { - "type": "integer", - "title": "Code" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "code", - "detail" - ], - "title": "APIErrorModel", - "examples": [ - { - "code": 400000, - "detail": "Bad Request" - } - ] - }, - "abc__APIErrorModel__113": { - "properties": { - "code": { - "type": "integer", - "title": "Code" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "code", - "detail" - ], - "title": "APIErrorModel", - "examples": [ - { - "code": 405000, - "detail": "Method Not Allowed" - } - ] - }, - "abc__APIErrorModel__114": { - "properties": { - "code": { - "type": "integer", - "title": "Code" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "code", - "detail" - ], - "title": "APIErrorModel", - "examples": [ - { - "code": 403000, - "detail": "Forbidden" - } - ] - }, - "abc__APIErrorModel__115": { - "properties": { - "code": { - "type": "integer", - "title": "Code" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "code", - "detail" - ], - "title": "APIErrorModel", - "examples": [ - { - "code": 401000, - "detail": "Unauthorized" - } - ] - }, - "abc__APIErrorModel__116": { - "properties": { - "code": { - "type": "integer", - "title": "Code" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "code", - "detail" - ], - "title": "APIErrorModel", - "examples": [ - { - "code": 400000, - "detail": "Bad Request" - } - ] - }, "abc__APIErrorModel__12": { "properties": { "code": { diff --git a/src/generated/operations.json b/src/generated/operations.json index 75317b8..996503b 100644 --- a/src/generated/operations.json +++ b/src/generated/operations.json @@ -1,8 +1,8 @@ { - "generatedAt": "schema-version:0.31.1", - "schemaVersion": "0.31.1", + "generatedAt": "schema-version:0.32.1", + "schemaVersion": "0.32.1", "schemaUrl": "https://api.asknews.app/openapi.json", - "schemaSha256": "b09b6faf711728bbd63da39cc7029a726517cde48ea0f6bad35d2883cf648258", + "schemaSha256": "906eb24cff694ba3049a18b15e1b12d1bfeee19487570be9e6a1b17e962bf602", "operations": [ { "operationId": "create_alert", @@ -1285,10 +1285,14 @@ "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", + "claude-opus-5-5", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-sol", + "gpt-6-astra", "deepseek", "deepseek-basic", "deepseek-r1-0528", @@ -1753,12 +1757,14 @@ "claude-opus-4-5-20251101", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "claude-sonnet-4-6", "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-astra", "meta-llama/Meta-Llama-3.1-405B-Instruct", "meta-llama/Meta-Llama-3.3-70B-Instruct" ], @@ -2396,10 +2402,14 @@ "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", + "claude-opus-5-5", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-sol", + "gpt-6-astra", "deepseek", "deepseek-basic", "deepseek-r1-0528", @@ -2547,12 +2557,14 @@ "claude-opus-4-5-20251101", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "claude-sonnet-4-6", "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-astra", "meta-llama/Meta-Llama-3.1-405B-Instruct", "meta-llama/Meta-Llama-3.3-70B-Instruct" ], @@ -3190,10 +3202,14 @@ "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", + "claude-opus-5-5", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-sol", + "gpt-6-astra", "deepseek", "deepseek-basic", "deepseek-r1-0528", @@ -4851,10 +4867,14 @@ "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", + "claude-opus-5-5", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-sol", + "gpt-6-astra", "deepseek", "deepseek-basic", "deepseek-r1-0528", @@ -5356,12 +5376,14 @@ "claude-opus-4-5-20251101", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "claude-sonnet-4-6", "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-astra", "meta-llama/Meta-Llama-3.1-405B-Instruct", "meta-llama/Meta-Llama-3.3-70B-Instruct" ], @@ -5999,10 +6021,14 @@ "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", + "claude-opus-5-5", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-sol", + "gpt-6-astra", "deepseek", "deepseek-basic", "deepseek-r1-0528", @@ -6141,12 +6167,14 @@ "claude-opus-4-5-20251101", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "claude-sonnet-4-6", "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-astra", "meta-llama/Meta-Llama-3.1-405B-Instruct", "meta-llama/Meta-Llama-3.3-70B-Instruct" ], @@ -6784,10 +6812,14 @@ "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", + "claude-opus-5-5", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-sol", + "gpt-6-astra", "deepseek", "deepseek-basic", "deepseek-r1-0528", @@ -6948,76 +6980,6 @@ "requestBody": null, "safety": "mutating" }, - { - "operationId": "get_asset_sentiment", - "tag": "analytics", - "command": "get-asset-sentiment", - "method": "GET", - "path": "/v1/analytics/finance/sentiment", - "summary": "Get a timeseries of finance news sentiment for assets", - "description": "Get the news sentiment for a given asset during a provided period of time.\n\nThis endpoint is good for narrow AI, like using in combination with a regressor\nto forecast prices etc.", - "parameters": [ - { - "name": "asset", - "location": "query", - "required": true, - "description": "The asset name to query for sentiment.", - "type": "string", - "allowedValues": [ - "bitcoin", - "ethereum", - "cardano", - "uniswap", - "ripple", - "solana", - "polkadot", - "polygon", - "chainlink", - "tether", - "dogecoin", - "monero", - "tron", - "binance", - "aave", - "tesla", - "microsoft", - "amazon" - ] - }, - { - "name": "metric", - "location": "query", - "required": false, - "description": "The metric to obtain. Weighted metrics account for page-rank of original source. Higher page rank sources are weighted more heavily.", - "type": "string", - "defaultValue": "news_positive", - "allowedValues": [ - "news_positive", - "news_negative", - "news_total", - "news_positive_weighted", - "news_negative_weighted", - "news_total_weighted" - ] - }, - { - "name": "date_from", - "location": "query", - "required": false, - "description": "The start date in ISO format", - "type": "string" - }, - { - "name": "date_to", - "location": "query", - "required": false, - "description": "The end date in ISO format", - "type": "string" - } - ], - "requestBody": null, - "safety": "read-only" - }, { "operationId": "autofilter", "tag": "autofilter", @@ -7129,37 +7091,6 @@ }, "safety": "mutating" }, - { - "operationId": "create_charts_endpoint", - "tag": "charts", - "command": "create-charts-endpoint", - "method": "POST", - "path": "/v1/chat/charts", - "summary": "Create a chart", - "description": "Create charts.", - "parameters": [], - "requestBody": { - "required": true, - "contentTypes": [ - "application/json" - ], - "schema": { - "properties": { - "query": { - "type": "string", - "title": "Query", - "description": "The chart query to create" - } - }, - "type": "object", - "required": [ - "query" - ], - "title": "CreateChartRequest" - } - }, - "safety": "high-cost" - }, { "operationId": "deep_news", "tag": "chat", @@ -7255,10 +7186,14 @@ "claude-sonnet-5", "claude-opus-4-8", "claude-opus-5", + "claude-opus-5-5", "claude-opus-4-6", "claude-fable-5", + "claude-fable-5-1", "gpt-5.6-terra", "gpt-5.6-sol", + "gpt-6-sol", + "gpt-6-astra", "deepseek", "deepseek-basic", "deepseek-r1-0528", @@ -7815,8 +7750,8 @@ "command": "top-n-articles-for-domains", "method": "GET", "path": "/v1/distribution/articles/top_n_for_domains", - "summary": "Get the top N articles by hits for domains", - "description": "Get the top N domain articles by hits.", + "summary": "Get the top N articles by metric for domains", + "description": "Get the top N domain articles ranked by the selected metric.", "parameters": [ { "name": "domain_names", @@ -7858,6 +7793,19 @@ "required": false, "description": "End date to filter by (timestamp in seconds since epoch)", "type": "string" + }, + { + "name": "metric", + "location": "query", + "required": false, + "description": "Metric used to rank and count the returned articles", + "type": "string", + "defaultValue": "surface", + "allowedValues": [ + "surface", + "citation", + "grounded" + ] } ], "requestBody": null, @@ -8448,70 +8396,6 @@ "requestBody": null, "safety": "read-only" }, - { - "operationId": "get_sources_report", - "tag": "news", - "command": "get-sources-report", - "method": "GET", - "path": "/v1/sources", - "summary": "Get the sources underlying AskNews", - "description": "This endpoint is primarly used for transparency and monitoring the\ndiversity of the data.\n\nVisualized at `https://asknews.app/transparency`.\n\nGet the distribution of sources/languages/countries underlying AskNews content.", - "parameters": [ - { - "name": "n_points", - "location": "query", - "required": false, - "description": "Number of points to return", - "type": "integer", - "defaultValue": 100 - }, - { - "name": "start_timestamp", - "location": "query", - "required": false, - "description": "Start timestamp to filter by", - "type": "string" - }, - { - "name": "end_timestamp", - "location": "query", - "required": false, - "description": "End timestamp to filter by", - "type": "string" - }, - { - "name": "metric", - "location": "query", - "required": false, - "description": "Metric to filter by", - "type": "string", - "defaultValue": "countries_diversity", - "allowedValues": [ - "duplication", - "countries_diversity", - "languages_diversity", - "sources_diversity", - "bucket_loss" - ] - }, - { - "name": "sampling", - "location": "query", - "required": false, - "description": "Sampling to use", - "type": "string", - "defaultValue": "1h", - "allowedValues": [ - "5m", - "1h", - "4h", - "1d" - ] - } - ], - "requestBody": null, - "safety": "read-only" - }, { "operationId": "search_news", "tag": "news", @@ -8879,682 +8763,6 @@ "requestBody": null, "safety": "read-only" }, - { - "operationId": "delete_newsletter", - "tag": "newsletters", - "command": "delete-newsletter", - "method": "DELETE", - "path": "/v1/chat/newsletters/{newsletter_id}", - "summary": "Delete a newsletter", - "description": "Delete a newsletter.", - "parameters": [ - { - "name": "newsletter_id", - "location": "path", - "required": true, - "description": "The newsletter ID", - "type": "string", - "format": "uuid" - } - ], - "requestBody": null, - "safety": "mutating" - }, - { - "operationId": "delete_newsletter_contact", - "tag": "newsletters", - "command": "delete-newsletter-contact", - "method": "DELETE", - "path": "/v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}", - "summary": "Delete a newsletter contact", - "description": "Delete a newsletter contact.", - "parameters": [ - { - "name": "newsletter_id", - "location": "path", - "required": true, - "description": "The newsletter ID", - "type": "string", - "format": "uuid" - }, - { - "name": "contact_id", - "location": "path", - "required": true, - "description": "The contact ID", - "type": "string" - } - ], - "requestBody": null, - "safety": "mutating" - }, - { - "operationId": "get_newsletter", - "tag": "newsletters", - "command": "get-newsletter", - "method": "GET", - "path": "/v1/chat/newsletters/{newsletter_id}", - "summary": "Get a newsletter", - "description": "Get a newsletter.", - "parameters": [ - { - "name": "newsletter_id", - "location": "path", - "required": true, - "description": "The newsletter ID", - "type": "string", - "format": "uuid" - } - ], - "requestBody": null, - "safety": "read-only" - }, - { - "operationId": "get_newsletter_contact", - "tag": "newsletters", - "command": "get-newsletter-contact", - "method": "GET", - "path": "/v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}", - "summary": "Get a newsletter contact", - "description": "Get a newsletter contact.", - "parameters": [ - { - "name": "newsletter_id", - "location": "path", - "required": true, - "description": "The newsletter ID", - "type": "string", - "format": "uuid" - }, - { - "name": "contact_id", - "location": "path", - "required": true, - "description": "The contact ID", - "type": "string" - } - ], - "requestBody": null, - "safety": "read-only" - }, - { - "operationId": "get_newsletter_contacts", - "tag": "newsletters", - "command": "get-newsletter-contacts", - "method": "GET", - "path": "/v1/chat/newsletters/{newsletter_id}/contacts", - "summary": "Get newsletter contacts", - "description": "Get newsletter contacts.", - "parameters": [ - { - "name": "newsletter_id", - "location": "path", - "required": true, - "description": "The newsletter ID", - "type": "string", - "format": "uuid" - } - ], - "requestBody": null, - "safety": "read-only" - }, - { - "operationId": "get_newsletters", - "tag": "newsletters", - "command": "get-newsletters", - "method": "GET", - "path": "/v1/chat/newsletters", - "summary": "Get all created newsletters", - "description": "Get all created newsletters.", - "parameters": [], - "requestBody": null, - "safety": "read-only" - }, - { - "operationId": "get_public_newsletters", - "tag": "newsletters", - "command": "get-public-newsletters", - "method": "GET", - "path": "/v1/chat/newsletters/public", - "summary": "Get all public newsletters", - "description": "Get all public newsletters.", - "parameters": [ - { - "name": "page", - "location": "query", - "required": false, - "description": "The page number to get", - "type": "integer", - "defaultValue": 1 - }, - { - "name": "per_page", - "location": "query", - "required": false, - "description": "The number of items per page", - "type": "integer", - "defaultValue": 10 - }, - { - "name": "all", - "location": "query", - "required": false, - "description": "Whether to get all the public newsletters", - "type": "boolean", - "defaultValue": false - } - ], - "requestBody": null, - "safety": "read-only" - }, - { - "operationId": "patch_newsletter_contact", - "tag": "newsletters", - "command": "patch-newsletter-contact", - "method": "PATCH", - "path": "/v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}", - "summary": "Update a newsletter contact", - "description": "Update a newsletter contact.", - "parameters": [ - { - "name": "newsletter_id", - "location": "path", - "required": true, - "description": "The newsletter ID", - "type": "string", - "format": "uuid" - }, - { - "name": "contact_id", - "location": "path", - "required": true, - "description": "The contact ID", - "type": "string" - } - ], - "requestBody": { - "required": true, - "contentTypes": [ - "application/json" - ], - "schema": { - "properties": { - "email": { - "type": "string", - "title": "Email" - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "First Name" - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Last Name" - }, - "unsubscribed": { - "type": "boolean", - "title": "Unsubscribed", - "default": false - } - }, - "type": "object", - "required": [ - "email" - ], - "title": "NewsletterContactRequest" - } - }, - "safety": "mutating" - }, - { - "operationId": "post_newsletter", - "tag": "newsletters", - "command": "post-newsletter", - "method": "POST", - "path": "/v1/chat/newsletters", - "summary": "Create a newsletter", - "description": "Create a newsletter.", - "parameters": [], - "requestBody": { - "required": true, - "contentTypes": [ - "application/json" - ], - "schema": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The name of the newsletter.", - "example": "Daily Economy News" - }, - "query": { - "type": "string", - "title": "Query", - "description": "The natural language query to run for the newsletter.", - "example": "Send me the latest news on the economy." - }, - "cron": { - "type": "string", - "title": "Cron", - "description": "The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples", - "example": "0 0 * * *" - }, - "model": { - "type": "string", - "enum": [ - "gpt-4o", - "gpt-4o-mini", - "claude-3-5-sonnet-latest", - "meta-llama/Meta-Llama-3.1-405B-Instruct", - "meta-llama/Meta-Llama-3.3-70B-Instruct" - ], - "title": "Model", - "description": "The model to use for the newsletter.", - "example": "gpt-4o-mini" - }, - "subject": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Subject", - "description": "The subject of the newsletter. If not provided it will be auto generated.", - "example": "Your Daily Economy News" - }, - "sender": { - "type": "string", - "title": "Sender", - "description": "The sender of the newsletter.", - "example": "Your Name " - }, - "logo_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Url", - "description": "The logo URL for the newsletter.", - "example": "https://example.com/logo.png" - }, - "reply_to": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Reply To", - "description": "The reply-to address for the newsletter. If not provided, the sender will be used.", - "example": "Your Name " - }, - "audience_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Audience Id", - "description": "The audience ID to use for the newsletter. If not provided a new audience will be created.", - "example": "123e4567-e89b-12d3-a456-426614174000" - }, - "resend_api_key": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Resend Api Key", - "description": "The resend API key to use for the newsletter. If not provided, the newsletter will not be sent.", - "example": "re_123456789" - }, - "public": { - "type": "boolean", - "title": "Public", - "description": "Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown.", - "default": true - }, - "active": { - "type": "boolean", - "title": "Active", - "description": "Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent.", - "default": true - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At", - "description": "The expiration date for the alert. Default is None. If set, the alert will be disabled after this date." - } - }, - "type": "object", - "required": [ - "name", - "query", - "cron", - "model", - "sender" - ], - "title": "CreateNewsletterRequest" - } - }, - "safety": "mutating" - }, - { - "operationId": "post_newsletter_contacts", - "tag": "newsletters", - "command": "post-newsletter-contacts", - "method": "POST", - "path": "/v1/chat/newsletters/{newsletter_id}/contacts", - "summary": "Create a newsletter contact", - "description": "Create a newsletter contact.", - "parameters": [ - { - "name": "newsletter_id", - "location": "path", - "required": true, - "description": "The newsletter ID", - "type": "string", - "format": "uuid" - } - ], - "requestBody": { - "required": true, - "contentTypes": [ - "application/json" - ], - "schema": { - "properties": { - "email": { - "type": "string", - "title": "Email" - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "First Name" - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Last Name" - }, - "unsubscribed": { - "type": "boolean", - "title": "Unsubscribed", - "default": false - } - }, - "type": "object", - "required": [ - "email" - ], - "title": "NewsletterContactRequest" - } - }, - "safety": "mutating" - }, - { - "operationId": "put_newsletter", - "tag": "newsletters", - "command": "put-newsletter", - "method": "PUT", - "path": "/v1/chat/newsletters/{newsletter_id}", - "summary": "Update a newsletter", - "description": "Update a newsletter.", - "parameters": [ - { - "name": "newsletter_id", - "location": "path", - "required": true, - "description": "The newsletter ID", - "type": "string", - "format": "uuid" - } - ], - "requestBody": { - "required": true, - "contentTypes": [ - "application/json" - ], - "schema": { - "properties": { - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name", - "description": "The name of the newsletter.", - "example": "Daily Economy News" - }, - "query": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Query", - "description": "The natural language query to run for the newsletter.", - "example": "Send me the latest news on the economy." - }, - "cron": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cron", - "description": "The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples", - "example": "0 0 * * *" - }, - "model": { - "anyOf": [ - { - "type": "string", - "enum": [ - "gpt-4o", - "gpt-4o-mini", - "claude-3-5-sonnet-latest", - "meta-llama/Meta-Llama-3.1-405B-Instruct", - "meta-llama/Meta-Llama-3.3-70B-Instruct" - ] - }, - { - "type": "null" - } - ], - "title": "Model", - "description": "The model to use for the newsletter.", - "example": "gpt-4o-mini" - }, - "subject": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Subject", - "description": "The subject of the newsletter. If not provided it will be auto generated.", - "example": "Your Daily Economy News" - }, - "sender": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Sender", - "description": "The sender of the newsletter.", - "example": "Your Name " - }, - "logo_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Url", - "description": "The logo URL for the newsletter.", - "example": "https://example.com/logo.png" - }, - "reply_to": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Reply To", - "description": "The reply-to address for the newsletter. If not provided, the sender will be used.", - "example": "Your Name " - }, - "audience_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Audience Id", - "description": "The audience ID to use for the newsletter. If not provided a new audience will be created.", - "example": "123e4567-e89b-12d3-a456-426614174000" - }, - "resend_api_key": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Resend Api Key", - "description": "The resend API key to use for the newsletter. If not provided, the newsletter will not be sent.", - "example": "re_123456789" - }, - "public": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Public", - "description": "Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown." - }, - "active": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Active", - "description": "Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent." - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At", - "description": "The expiration date for the alert. Default is None. If set, the alert will be disabled after this date." - } - }, - "type": "object", - "title": "UpdateNewsletterRequest" - } - }, - "safety": "mutating" - }, { "operationId": "ping", "tag": "ping", diff --git a/test/operations.test.ts b/test/operations.test.ts index f624d58..71c0661 100644 --- a/test/operations.test.ts +++ b/test/operations.test.ts @@ -5,7 +5,7 @@ describe("operation manifest access", () => { test("looks up and groups generated operations", () => { expect(getOperation("search_news").path).toBe("/v1/news/search"); expect(operationsByTag().get("news")?.length).toBeGreaterThan(0); - expect(manifest.operations.length).toBe(46); + expect(manifest.operations.length).toBe(32); }); test("rejects an unknown operation", () => {