{
  "openapi": "3.1.0",
  "info": {
    "title": "NewsData.io API",
    "version": "1.0.0",
    "summary": "JSON REST API for newsdata.io (API version 1 and version 2) — latest news, archive, crypto news, financial-market news, source directory, article counts, and a real-time WebSocket news stream.",
    "description": "REST API returning JSON. Every read endpoint is `GET`; the two state-changing WebSocket management endpoints use `POST` (`/2/websocket/register`) and `DELETE` (`/2/websocket/delete`). All parameters — including for `POST`/`DELETE` — are sent in the query string, never in a request body.\n\n**API versions.** Two versions are served side by side, with the same API key, credit balance and rate limits: version 1 (paths starting with `/1/`) and version 2 (paths starting with `/2/`: `/2/news`, `/2/market`, `/2/crypto`, `/2/count/news`, `/2/count/market`, `/2/count/crypto`, `/2/sources` and the WebSocket management endpoints `/2/websocket/register`, `/2/websocket/fetch` and `/2/websocket/delete`). Version 2 uses snake_case parameter names: `q_in_title`, `q_in_meta`, `source_url`, `exclude_source_url`, `source_priority`, `exclude_country`, `exclude_category`, `exclude_language`, `exclude_field`, `remove_duplicate`, and `content` instead of `full_content`. The version 1 names are rejected there with 422 `UnsupportedParameter`. Version 2 responses use the envelope `{status, total_results, results, next_page}`, group article fields under `media`, `source` and `ai`, and give dates in RFC 3339 (`published_at`, `fetched_at`). `/2/news` covers both the `/1/latest` and the `/1/archive` use cases: without dates it searches the last 30 days (from 00:00 UTC 30 days ago); with `from_date`/`to_date` it searches any range within your plan's history. Errors use the same envelope and codes on both versions. The real-time WebSocket stream is part of version 2 only: queries are registered with the version 2 parameter names, and streamed articles use the version 2 article layout.\n\n**Authentication.** Send your API key either as the `apikey` query-string parameter or as the `X-ACCESS-KEY` HTTP header. One of the two is required. Parameter names are case-insensitive, except on the WebSocket stream (`wss://ws.newsdata.io/ws/event`), which expects them in lowercase and accepts the key only as the `apikey` query parameter.\n\n**Credits & rate limits.** Each call costs a fixed number of API credits (`/latest`, `/crypto`, `/market`, `/sources` = 1 credit; `/archive` = 5 credits; `/count`, `/crypto/count`, `/market/count` = 50 credits). On version 2, `/2/news`, `/2/market` and `/2/crypto` cost 1 credit per call, or 5 credits on paid plans when the searched range starts before 00:00 UTC 30 days ago; `/2/sources` costs 1 credit and each `/2/count/*` call 50 credits; the `/2/websocket/*` management endpoints are free — instead, each article delivered over the WebSocket stream costs 1 credit per connected device. Requests are also rate-limited per account: 30 requests per 15 minutes on the free plan and 1,800 per 15 minutes on paid plans (custom plans can have their own limit); beyond it, calls return 429 `RateLimitExceeded`. Very rapid bursts of requests are limited separately and return 429 `TooManyRequests`. Version 1 and version 2 requests count toward the same limits. The response headers `X-RateLimit-Remaining` and `X-API-Limit-Remaining` report your remaining request budget and remaining API credits. If a credit limit is set on an API key, calls made with that key are also refused with `ApiKeyLimitExceeded` once it is used up, and `X-APIKEY-Limit-Remaining` reports the credits left under it.\n\n**Plan-based limits.** Some limits depend on your plan: the number of values allowed per filter (default 5), the maximum search-query length (default 100 characters), and the page size (default 50 on paid plans, 10 on the free plan).\n\n**Filter compatibility.** Some filters cannot be combined: use at most one of `q`, `qInTitle`, `qInMeta`; at most one of `domainurl`, `excludedomainurl`; `country` or `excludecountry`; `category` or `excludecategory`; `language` or `excludelanguage`; `timeframe` or `from_date`/`to_date`. The `id` and `url` filters must be used alone. On version 2 the same rules apply under the version 2 names (at most one of `q`, `q_in_title`, `q_in_meta`; `source_url` or `exclude_source_url`; `country` or `exclude_country`; `category` or `exclude_category`; `language` or `exclude_language`; `timeframe` or `from_date`/`to_date`), except that `id` and `url` can be combined with `from_date`/`to_date`.\n\n**Pagination.** With the default sort (`pubdatedesc` / `pubdateasc`), pass the `nextPage` value from the previous response as the `page` parameter. With `sort=relevancy|source|fetched_at`, pass a page number instead (up to 10,000 results in total). On version 2 the value to pass back is `next_page`.\n\n**Real-time WebSocket stream.** Plans with WebSocket access can register standing queries with `/2/websocket/register` and receive matching articles, in the version 2 article layout, the moment they are collected by connecting to `wss://ws.newsdata.io/ws/event`. See the WebSocket endpoints in the *Version 2* section.",
    "termsOfService": "https://newsdata.io/terms",
    "contact": {
      "name": "NewsData.io support",
      "url": "https://newsdata.io/contact",
      "email": "support@newsdata.io"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://newsdata.io/terms"
    }
  },
  "externalDocs": {
    "description": "Official documentation",
    "url": "https://newsdata.io/documentation"
  },
  "servers": [
    {
      "url": "https://newsdata.io/api",
      "description": "Production"
    }
  ],
  "tags": [
    { "name": "Version 1", "description": "API version 1, under `https://newsdata.io/api/1/`: latest news (`/1/latest`), the historical news archive (`/1/archive`), cryptocurrency news (`/1/crypto`), financial-market news annotated with stock tickers (`/1/market`), the directory of available news sources (`/1/sources`), and article counts and time-bucketed histograms (`/1/count`, `/1/crypto/count`, `/1/market/count`)." },
    { "name": "Version 2", "description": "API version 2, under `https://newsdata.io/api/2/`: news articles (`/2/news`) from the last 30 days by default or any date range within your plan's history, financial-market news annotated with market ids and stock tickers (`/2/market`), cryptocurrency news (`/2/crypto`), article counts with a total plus monthly, daily or hourly buckets (`/2/count/news`, `/2/count/market`, `/2/count/crypto`), the directory of available news sources (`/2/sources`), and the real-time news stream: register standing queries (`/2/websocket/register`, `/2/websocket/fetch`, `/2/websocket/delete`), then receive matching articles, in the version 2 article layout, over a WebSocket connection (`/ws/event`) the moment they are collected." }
  ],
  "security": [
    { "ApiKeyQuery": [] },
    { "ApiKeyHeader": [] }
  ],
  "paths": {
    "/1/latest": {
      "get": {
        "tags": ["Version 1"],
        "operationId": "getLatest",
        "summary": "Latest news articles",
        "description": "Returns the most recent news articles from the past 48 hours. On the free plan, articles are available with a 12-hour delay. Paid plans can narrow the window with the `timeframe` parameter. This endpoint does not accept `from_date` / `to_date`.\n\nConsumes **1** API credit per call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/Q" },
          { "$ref": "#/components/parameters/QInTitle" },
          { "$ref": "#/components/parameters/QInMeta" },
          { "$ref": "#/components/parameters/Country" },
          { "$ref": "#/components/parameters/ExcludeCountry" },
          { "$ref": "#/components/parameters/Category" },
          { "$ref": "#/components/parameters/ExcludeCategory" },
          { "$ref": "#/components/parameters/Language" },
          { "$ref": "#/components/parameters/ExcludeLanguage" },
          { "$ref": "#/components/parameters/DomainUrl" },
          { "$ref": "#/components/parameters/ExcludeDomainUrl" },
          { "$ref": "#/components/parameters/PriorityDomain" },
          { "$ref": "#/components/parameters/Id" },
          { "$ref": "#/components/parameters/Url" },
          { "$ref": "#/components/parameters/Timeframe" },
          { "$ref": "#/components/parameters/Timezone" },
          { "$ref": "#/components/parameters/Image" },
          { "$ref": "#/components/parameters/Video" },
          { "$ref": "#/components/parameters/FullContent" },
          { "$ref": "#/components/parameters/RemoveDuplicate" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Region" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/Size" },
          { "$ref": "#/components/parameters/Page" },
          { "$ref": "#/components/parameters/Sort" },
          { "$ref": "#/components/parameters/ExcludeField" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ArticleListEnvelope" },
                "examples": { "responseShape": { "$ref": "#/components/examples/ArticleListExample" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/1/archive": {
      "get": {
        "tags": ["Version 1"],
        "operationId": "getArchive",
        "summary": "Historical news archive",
        "description": "Search past news articles by date range. Available on plans with archive access; how far back you can search depends on your plan. Without `from_date`/`to_date`, your plan's whole history up to now is searched. At least one of the following parameters is required: `q`, `qInTitle`, `qInMeta`, `country`, `category`, `language`, `domainurl`, `prioritydomain`, `id`, `url`, `image`, `video`, `full_content`.\n\nConsumes **5** API credits per call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/Q" },
          { "$ref": "#/components/parameters/QInTitle" },
          { "$ref": "#/components/parameters/QInMeta" },
          { "$ref": "#/components/parameters/Country" },
          { "$ref": "#/components/parameters/ExcludeCountry" },
          { "$ref": "#/components/parameters/Category" },
          { "$ref": "#/components/parameters/ExcludeCategory" },
          { "$ref": "#/components/parameters/Language" },
          { "$ref": "#/components/parameters/ExcludeLanguage" },
          { "$ref": "#/components/parameters/DomainUrl" },
          { "$ref": "#/components/parameters/ExcludeDomainUrl" },
          { "$ref": "#/components/parameters/PriorityDomain" },
          { "$ref": "#/components/parameters/Id" },
          { "$ref": "#/components/parameters/Url" },
          { "$ref": "#/components/parameters/FromDate" },
          { "$ref": "#/components/parameters/ToDate" },
          { "$ref": "#/components/parameters/Timezone" },
          { "$ref": "#/components/parameters/Image" },
          { "$ref": "#/components/parameters/Video" },
          { "$ref": "#/components/parameters/FullContent" },
          { "$ref": "#/components/parameters/RemoveDuplicate" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Region" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/Size" },
          { "$ref": "#/components/parameters/Page" },
          { "$ref": "#/components/parameters/Sort" },
          { "$ref": "#/components/parameters/ExcludeField" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ArticleListEnvelope" },
                "examples": { "responseShape": { "$ref": "#/components/examples/ArticleListExample" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/1/crypto": {
      "get": {
        "tags": ["Version 1"],
        "operationId": "getCrypto",
        "summary": "Cryptocurrency news articles",
        "description": "Returns cryptocurrency news articles. Available on plans with crypto access. On the free plan, articles cover the last 7 days with a 12-hour delay, and `from_date`, `to_date`, and `timeframe` cannot be used. On paid plans, use either `from_date`/`to_date` or `timeframe` (not both); without them, your plan's whole history up to now is searched.\n\nConsumes **1** API credit per call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/Q" },
          { "$ref": "#/components/parameters/QInTitle" },
          { "$ref": "#/components/parameters/QInMeta" },
          { "$ref": "#/components/parameters/Coin" },
          { "$ref": "#/components/parameters/Language" },
          { "$ref": "#/components/parameters/ExcludeLanguage" },
          { "$ref": "#/components/parameters/DomainUrl" },
          { "$ref": "#/components/parameters/ExcludeDomainUrl" },
          { "$ref": "#/components/parameters/PriorityDomain" },
          { "$ref": "#/components/parameters/Id" },
          { "$ref": "#/components/parameters/Url" },
          { "$ref": "#/components/parameters/FromDate" },
          { "$ref": "#/components/parameters/ToDate" },
          { "$ref": "#/components/parameters/Timeframe" },
          { "$ref": "#/components/parameters/Timezone" },
          { "$ref": "#/components/parameters/Image" },
          { "$ref": "#/components/parameters/Video" },
          { "$ref": "#/components/parameters/FullContent" },
          { "$ref": "#/components/parameters/RemoveDuplicate" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Size" },
          { "$ref": "#/components/parameters/Page" },
          { "$ref": "#/components/parameters/SortCrypto" },
          { "$ref": "#/components/parameters/ExcludeField" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/CryptoArticleListEnvelope" },
                "examples": { "responseShape": { "$ref": "#/components/examples/CryptoArticleListExample" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/1/market": {
      "get": {
        "tags": ["Version 1"],
        "operationId": "getMarket",
        "summary": "Financial-market news articles",
        "description": "Returns financial-market news articles tagged with stock ticker symbols. Available on plans with market access. On the free plan, articles cover the last 7 days with a 12-hour delay, and `from_date`, `to_date`, and `timeframe` cannot be used. On paid plans, use either `from_date`/`to_date` or `timeframe` (not both); when no dates are given, articles from the last 48 hours are returned.\n\nConsumes **1** API credit per call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/Q" },
          { "$ref": "#/components/parameters/QInTitle" },
          { "$ref": "#/components/parameters/QInMeta" },
          { "$ref": "#/components/parameters/MarketId" },
          { "$ref": "#/components/parameters/Country" },
          { "$ref": "#/components/parameters/ExcludeCountry" },
          { "$ref": "#/components/parameters/Language" },
          { "$ref": "#/components/parameters/ExcludeLanguage" },
          { "$ref": "#/components/parameters/DomainUrl" },
          { "$ref": "#/components/parameters/ExcludeDomainUrl" },
          { "$ref": "#/components/parameters/PriorityDomain" },
          { "$ref": "#/components/parameters/Id" },
          { "$ref": "#/components/parameters/Url" },
          { "$ref": "#/components/parameters/FromDate" },
          { "$ref": "#/components/parameters/ToDate" },
          { "$ref": "#/components/parameters/Timeframe" },
          { "$ref": "#/components/parameters/Timezone" },
          { "$ref": "#/components/parameters/Image" },
          { "$ref": "#/components/parameters/Video" },
          { "$ref": "#/components/parameters/FullContent" },
          { "$ref": "#/components/parameters/RemoveDuplicate" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/Size" },
          { "$ref": "#/components/parameters/Page" },
          { "$ref": "#/components/parameters/Sort" },
          { "$ref": "#/components/parameters/ExcludeField" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/MarketArticleListEnvelope" },
                "examples": { "responseShape": { "$ref": "#/components/examples/MarketArticleListExample" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/1/sources": {
      "get": {
        "tags": ["Version 1"],
        "operationId": "getSources",
        "summary": "News sources",
        "description": "Returns up to 100 news sources matching the filters, chosen and ordered at random.\n\nConsumes **1** API credit per call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/Country" },
          { "$ref": "#/components/parameters/Category" },
          { "$ref": "#/components/parameters/Language" },
          { "$ref": "#/components/parameters/DomainUrl" },
          { "$ref": "#/components/parameters/PriorityDomain" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SourceListEnvelope" },
                "examples": { "responseShape": { "$ref": "#/components/examples/SourceListExample" } }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/1/count": {
      "get": {
        "tags": ["Version 1"],
        "operationId": "getCount",
        "summary": "News article count",
        "description": "Returns the number of news articles matching the filters. With `interval=all` (default) a single total is returned; with `interval=hour` or `interval=day` a count-per-hour/day breakdown is returned. `from_date` and `to_date` are required, and at least one of the following parameters as well: `q`, `qInTitle`, `qInMeta`, `country`, `category`, `language`, `domainurl`, `prioritydomain`, `image`, `video`, `full_content`. Available on plans with count access.\n\nConsumes **50** API credits per call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/Q" },
          { "$ref": "#/components/parameters/QInTitle" },
          { "$ref": "#/components/parameters/QInMeta" },
          { "$ref": "#/components/parameters/Country" },
          { "$ref": "#/components/parameters/ExcludeCountry" },
          { "$ref": "#/components/parameters/Category" },
          { "$ref": "#/components/parameters/ExcludeCategory" },
          { "$ref": "#/components/parameters/Language" },
          { "$ref": "#/components/parameters/ExcludeLanguage" },
          { "$ref": "#/components/parameters/DomainUrl" },
          { "$ref": "#/components/parameters/ExcludeDomainUrl" },
          { "$ref": "#/components/parameters/PriorityDomain" },
          { "$ref": "#/components/parameters/FromDateCount" },
          { "$ref": "#/components/parameters/ToDateCount" },
          { "$ref": "#/components/parameters/Image" },
          { "$ref": "#/components/parameters/Video" },
          { "$ref": "#/components/parameters/FullContent" },
          { "$ref": "#/components/parameters/RemoveDuplicate" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Region" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/Interval" },
          { "$ref": "#/components/parameters/SizeCount" },
          { "$ref": "#/components/parameters/PageCount" },
          { "$ref": "#/components/parameters/SortCount" }
        ],
        "responses": {
          "200": {
            "description": "Success. The shape depends on the `interval` parameter.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    { "$ref": "#/components/schemas/CountSummaryEnvelope" },
                    { "$ref": "#/components/schemas/CountHistogramEnvelope" }
                  ]
                },
                "examples": {
                  "intervalAll": { "$ref": "#/components/examples/CountSummaryExample" },
                  "intervalHourOrDay": { "$ref": "#/components/examples/CountHistogramExample" }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/1/crypto/count": {
      "get": {
        "tags": ["Version 1"],
        "operationId": "getCryptoCount",
        "summary": "Cryptocurrency article count",
        "description": "Returns the number of cryptocurrency news articles matching the filters. With `interval=all` (default) a single total is returned; with `interval=hour` or `interval=day` a count-per-hour/day breakdown is returned. `from_date` and `to_date` are required. Available on plans with count access.\n\nConsumes **50** API credits per call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/Q" },
          { "$ref": "#/components/parameters/QInTitle" },
          { "$ref": "#/components/parameters/QInMeta" },
          { "$ref": "#/components/parameters/Coin" },
          { "$ref": "#/components/parameters/Language" },
          { "$ref": "#/components/parameters/ExcludeLanguage" },
          { "$ref": "#/components/parameters/DomainUrl" },
          { "$ref": "#/components/parameters/ExcludeDomainUrl" },
          { "$ref": "#/components/parameters/PriorityDomain" },
          { "$ref": "#/components/parameters/FromDateCount" },
          { "$ref": "#/components/parameters/ToDateCount" },
          { "$ref": "#/components/parameters/Image" },
          { "$ref": "#/components/parameters/Video" },
          { "$ref": "#/components/parameters/FullContent" },
          { "$ref": "#/components/parameters/RemoveDuplicate" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Interval" },
          { "$ref": "#/components/parameters/SizeCount" },
          { "$ref": "#/components/parameters/PageCount" },
          { "$ref": "#/components/parameters/SortCount" }
        ],
        "responses": {
          "200": {
            "description": "Success. The shape depends on the `interval` parameter.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    { "$ref": "#/components/schemas/CountSummaryEnvelope" },
                    { "$ref": "#/components/schemas/CountHistogramEnvelope" }
                  ]
                },
                "examples": {
                  "intervalAll": { "$ref": "#/components/examples/CountSummaryExample" },
                  "intervalHourOrDay": { "$ref": "#/components/examples/CountHistogramExample" }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/1/market/count": {
      "get": {
        "tags": ["Version 1"],
        "operationId": "getMarketCount",
        "summary": "Financial-market article count",
        "description": "Returns the number of financial-market news articles matching the filters. With `interval=all` (default) a single total is returned; with `interval=hour` or `interval=day` a count-per-hour/day breakdown is returned. `from_date` and `to_date` are required. Available on plans with count access.\n\nConsumes **50** API credits per call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/Q" },
          { "$ref": "#/components/parameters/QInTitle" },
          { "$ref": "#/components/parameters/QInMeta" },
          { "$ref": "#/components/parameters/MarketId" },
          { "$ref": "#/components/parameters/Country" },
          { "$ref": "#/components/parameters/ExcludeCountry" },
          { "$ref": "#/components/parameters/Language" },
          { "$ref": "#/components/parameters/ExcludeLanguage" },
          { "$ref": "#/components/parameters/DomainUrl" },
          { "$ref": "#/components/parameters/ExcludeDomainUrl" },
          { "$ref": "#/components/parameters/PriorityDomain" },
          { "$ref": "#/components/parameters/FromDateCount" },
          { "$ref": "#/components/parameters/ToDateCount" },
          { "$ref": "#/components/parameters/Image" },
          { "$ref": "#/components/parameters/Video" },
          { "$ref": "#/components/parameters/FullContent" },
          { "$ref": "#/components/parameters/RemoveDuplicate" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/Interval" },
          { "$ref": "#/components/parameters/SizeCount" },
          { "$ref": "#/components/parameters/PageCount" },
          { "$ref": "#/components/parameters/SortCount" }
        ],
        "responses": {
          "200": {
            "description": "Success. The shape depends on the `interval` parameter.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    { "$ref": "#/components/schemas/CountSummaryEnvelope" },
                    { "$ref": "#/components/schemas/CountHistogramEnvelope" }
                  ]
                },
                "examples": {
                  "intervalAll": { "$ref": "#/components/examples/CountSummaryExample" },
                  "intervalHourOrDay": { "$ref": "#/components/examples/CountHistogramExample" }
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/news": {
      "get": {
        "tags": ["Version 2"],
        "operationId": "getNewsV2",
        "summary": "News articles",
        "description": "Returns news articles in the version 2 layout. Without `from_date`, `to_date` or `timeframe`, articles published in the last 30 days are searched (from 00:00 UTC 30 days ago up to now). Paid plans can set `from_date`/`to_date` anywhere within their plan's history (an older date returns 403) or narrow the window with `timeframe` (up to 30 days; not together with dates). On the free plan only those last 30 days are available, with a 12-hour delay: dates inside that window are allowed, `timeframe` is not. `id` and `url` can be combined with `from_date`/`to_date` only.\n\nConsumes **1** API credit per call, or **5** on paid plans when the searched range starts before 00:00 UTC 30 days ago (an explicit `from_date`, or your plan's history start when only `to_date` is sent).",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/QV2" },
          { "$ref": "#/components/parameters/QInTitleV2" },
          { "$ref": "#/components/parameters/QInMetaV2" },
          { "$ref": "#/components/parameters/CountryV2" },
          { "$ref": "#/components/parameters/ExcludeCountryV2" },
          { "$ref": "#/components/parameters/CategoryV2" },
          { "$ref": "#/components/parameters/ExcludeCategoryV2" },
          { "$ref": "#/components/parameters/LanguageV2" },
          { "$ref": "#/components/parameters/ExcludeLanguageV2" },
          { "$ref": "#/components/parameters/SourceUrlV2" },
          { "$ref": "#/components/parameters/ExcludeSourceUrlV2" },
          { "$ref": "#/components/parameters/SourcePriorityV2" },
          { "$ref": "#/components/parameters/IdV2" },
          { "$ref": "#/components/parameters/UrlV2" },
          { "$ref": "#/components/parameters/FromDateV2" },
          { "$ref": "#/components/parameters/ToDateV2" },
          { "$ref": "#/components/parameters/TimeframeV2" },
          { "$ref": "#/components/parameters/TimezoneV2" },
          { "$ref": "#/components/parameters/ImageV2" },
          { "$ref": "#/components/parameters/VideoV2" },
          { "$ref": "#/components/parameters/ContentV2" },
          { "$ref": "#/components/parameters/RemoveDuplicateV2" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Region" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/Size" },
          { "$ref": "#/components/parameters/PageV2" },
          { "$ref": "#/components/parameters/SortV2" },
          { "$ref": "#/components/parameters/ExcludeFieldV2" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ArticleListEnvelopeV2" },
                "examples": { "responseShape": { "$ref": "#/components/examples/ArticleListExampleV2" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/market": {
      "get": {
        "tags": ["Version 2"],
        "operationId": "getMarketV2",
        "summary": "Financial-market news articles",
        "description": "Returns financial-market news articles in the version 2 layout; only articles tagged with stock symbols are returned, with their `market_id` and `ticker` values. Dates and plans work as on `/2/news`: without `from_date`, `to_date` or `timeframe` the last 30 days are searched; paid plans can search their plan's history with `from_date`/`to_date` or use `timeframe` (up to 30 days); the free plan gets the last 30 days with a 12-hour delay and no `timeframe`. Available on plans with market access.\n\nConsumes **1** API credit per call, or **5** on paid plans when the searched range starts before 00:00 UTC 30 days ago.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/QV2" },
          { "$ref": "#/components/parameters/QInTitleV2" },
          { "$ref": "#/components/parameters/QInMetaV2" },
          { "$ref": "#/components/parameters/MarketId" },
          { "$ref": "#/components/parameters/CountryV2" },
          { "$ref": "#/components/parameters/ExcludeCountryV2" },
          { "$ref": "#/components/parameters/LanguageV2" },
          { "$ref": "#/components/parameters/ExcludeLanguageV2" },
          { "$ref": "#/components/parameters/SourceUrlV2" },
          { "$ref": "#/components/parameters/ExcludeSourceUrlV2" },
          { "$ref": "#/components/parameters/SourcePriorityV2" },
          { "$ref": "#/components/parameters/IdV2" },
          { "$ref": "#/components/parameters/UrlV2" },
          { "$ref": "#/components/parameters/FromDateV2" },
          { "$ref": "#/components/parameters/ToDateV2" },
          { "$ref": "#/components/parameters/TimeframeV2" },
          { "$ref": "#/components/parameters/TimezoneV2" },
          { "$ref": "#/components/parameters/ImageV2" },
          { "$ref": "#/components/parameters/VideoV2" },
          { "$ref": "#/components/parameters/ContentV2" },
          { "$ref": "#/components/parameters/RemoveDuplicateV2" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/Size" },
          { "$ref": "#/components/parameters/PageV2" },
          { "$ref": "#/components/parameters/SortV2" },
          { "$ref": "#/components/parameters/ExcludeFieldV2" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/MarketArticleListEnvelopeV2" },
                "examples": { "responseShape": { "$ref": "#/components/examples/MarketArticleListExampleV2" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/crypto": {
      "get": {
        "tags": ["Version 2"],
        "operationId": "getCryptoV2",
        "summary": "Cryptocurrency news articles",
        "description": "Returns cryptocurrency news articles in the version 2 layout, with the coins they mention in `coin`. Dates and plans work as on `/2/news`: without `from_date`, `to_date` or `timeframe` the last 30 days are searched; paid plans can search their plan's history with `from_date`/`to_date` or use `timeframe` (up to 30 days); the free plan gets the last 30 days with a 12-hour delay and no `timeframe`. Available on plans with crypto access.\n\nConsumes **1** API credit per call, or **5** on paid plans when the searched range starts before 00:00 UTC 30 days ago.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/QV2" },
          { "$ref": "#/components/parameters/QInTitleV2" },
          { "$ref": "#/components/parameters/QInMetaV2" },
          { "$ref": "#/components/parameters/Coin" },
          { "$ref": "#/components/parameters/LanguageV2" },
          { "$ref": "#/components/parameters/ExcludeLanguageV2" },
          { "$ref": "#/components/parameters/SourceUrlV2" },
          { "$ref": "#/components/parameters/ExcludeSourceUrlV2" },
          { "$ref": "#/components/parameters/SourcePriorityV2" },
          { "$ref": "#/components/parameters/IdV2" },
          { "$ref": "#/components/parameters/UrlV2" },
          { "$ref": "#/components/parameters/FromDateV2" },
          { "$ref": "#/components/parameters/ToDateV2" },
          { "$ref": "#/components/parameters/TimeframeV2" },
          { "$ref": "#/components/parameters/TimezoneV2" },
          { "$ref": "#/components/parameters/ImageV2" },
          { "$ref": "#/components/parameters/VideoV2" },
          { "$ref": "#/components/parameters/ContentV2" },
          { "$ref": "#/components/parameters/RemoveDuplicateV2" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Size" },
          { "$ref": "#/components/parameters/PageV2" },
          { "$ref": "#/components/parameters/SortCryptoV2" },
          { "$ref": "#/components/parameters/ExcludeFieldV2" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/CryptoArticleListEnvelopeV2" },
                "examples": { "responseShape": { "$ref": "#/components/examples/CryptoArticleListExampleV2" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/count/news": {
      "get": {
        "tags": ["Version 2"],
        "operationId": "getNewsCountV2",
        "summary": "News article count",
        "description": "Returns how many news articles match the filters: `total_results` over the whole date range (the same on every page), plus one `{date_time, count}` entry per `interval` bucket (`month`, `day` or `hour`, in UTC; `day` by default; empty buckets included). Dates work as on `/2/news` and are optional: without `from_date`, `to_date` or `timeframe` the last 30 days are counted; `from_date`/`to_date` can go back as far as your plan's history allows, and `timeframe` up to 30 days. At least one of the following parameters is required: `q`, `q_in_title`, `q_in_meta`, `country`, `category`, `language`, `source_url`, `source_priority`, `image`, `video`, `content`. Available on plans with count access.\n\nConsumes **50** API credits per call; each page is a separate call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/QV2" },
          { "$ref": "#/components/parameters/QInTitleV2" },
          { "$ref": "#/components/parameters/QInMetaV2" },
          { "$ref": "#/components/parameters/CountryV2" },
          { "$ref": "#/components/parameters/ExcludeCountryV2" },
          { "$ref": "#/components/parameters/CategoryV2" },
          { "$ref": "#/components/parameters/ExcludeCategoryV2" },
          { "$ref": "#/components/parameters/LanguageV2" },
          { "$ref": "#/components/parameters/ExcludeLanguageV2" },
          { "$ref": "#/components/parameters/SourceUrlV2" },
          { "$ref": "#/components/parameters/ExcludeSourceUrlV2" },
          { "$ref": "#/components/parameters/SourcePriorityV2" },
          { "$ref": "#/components/parameters/FromDateCountV2" },
          { "$ref": "#/components/parameters/ToDateCountV2" },
          { "$ref": "#/components/parameters/TimeframeV2" },
          { "$ref": "#/components/parameters/ImageV2" },
          { "$ref": "#/components/parameters/VideoV2" },
          { "$ref": "#/components/parameters/ContentV2" },
          { "$ref": "#/components/parameters/RemoveDuplicateV2" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Region" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/IntervalV2" },
          { "$ref": "#/components/parameters/SizeCountV2" },
          { "$ref": "#/components/parameters/PageCountV2" },
          { "$ref": "#/components/parameters/SortCount" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/CountEnvelopeV2" },
                "examples": { "responseShape": { "$ref": "#/components/examples/CountExampleV2" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/count/market": {
      "get": {
        "tags": ["Version 2"],
        "operationId": "getMarketCountV2",
        "summary": "Financial-market article count",
        "description": "Returns how many financial-market news articles match the filters: `total_results` over the whole date range (the same on every page), plus one `{date_time, count}` entry per `interval` bucket (`month`, `day` or `hour`, in UTC; `day` by default; empty buckets included). Dates work as on `/2/market` and are optional: without `from_date`, `to_date` or `timeframe` the last 30 days are counted. Available on plans with count and market access.\n\nConsumes **50** API credits per call; each page is a separate call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/QV2" },
          { "$ref": "#/components/parameters/QInTitleV2" },
          { "$ref": "#/components/parameters/QInMetaV2" },
          { "$ref": "#/components/parameters/MarketId" },
          { "$ref": "#/components/parameters/CountryV2" },
          { "$ref": "#/components/parameters/ExcludeCountryV2" },
          { "$ref": "#/components/parameters/LanguageV2" },
          { "$ref": "#/components/parameters/ExcludeLanguageV2" },
          { "$ref": "#/components/parameters/SourceUrlV2" },
          { "$ref": "#/components/parameters/ExcludeSourceUrlV2" },
          { "$ref": "#/components/parameters/SourcePriorityV2" },
          { "$ref": "#/components/parameters/FromDateCountV2" },
          { "$ref": "#/components/parameters/ToDateCountV2" },
          { "$ref": "#/components/parameters/TimeframeV2" },
          { "$ref": "#/components/parameters/ImageV2" },
          { "$ref": "#/components/parameters/VideoV2" },
          { "$ref": "#/components/parameters/ContentV2" },
          { "$ref": "#/components/parameters/RemoveDuplicateV2" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/IntervalV2" },
          { "$ref": "#/components/parameters/SizeCountV2" },
          { "$ref": "#/components/parameters/PageCountV2" },
          { "$ref": "#/components/parameters/SortCount" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/CountEnvelopeV2" },
                "examples": { "responseShape": { "$ref": "#/components/examples/CountExampleV2" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/count/crypto": {
      "get": {
        "tags": ["Version 2"],
        "operationId": "getCryptoCountV2",
        "summary": "Cryptocurrency article count",
        "description": "Returns how many cryptocurrency news articles match the filters: `total_results` over the whole date range (the same on every page), plus one `{date_time, count}` entry per `interval` bucket (`month`, `day` or `hour`, in UTC; `day` by default; empty buckets included). Dates work as on `/2/crypto` and are optional: without `from_date`, `to_date` or `timeframe` the last 30 days are counted. Available on plans with count and crypto access.\n\nConsumes **50** API credits per call; each page is a separate call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/QV2" },
          { "$ref": "#/components/parameters/QInTitleV2" },
          { "$ref": "#/components/parameters/QInMetaV2" },
          { "$ref": "#/components/parameters/Coin" },
          { "$ref": "#/components/parameters/LanguageV2" },
          { "$ref": "#/components/parameters/ExcludeLanguageV2" },
          { "$ref": "#/components/parameters/SourceUrlV2" },
          { "$ref": "#/components/parameters/ExcludeSourceUrlV2" },
          { "$ref": "#/components/parameters/SourcePriorityV2" },
          { "$ref": "#/components/parameters/FromDateCountV2" },
          { "$ref": "#/components/parameters/ToDateCountV2" },
          { "$ref": "#/components/parameters/TimeframeV2" },
          { "$ref": "#/components/parameters/ImageV2" },
          { "$ref": "#/components/parameters/VideoV2" },
          { "$ref": "#/components/parameters/ContentV2" },
          { "$ref": "#/components/parameters/RemoveDuplicateV2" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/IntervalV2" },
          { "$ref": "#/components/parameters/SizeCountV2" },
          { "$ref": "#/components/parameters/PageCountV2" },
          { "$ref": "#/components/parameters/SortCount" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/CountEnvelopeV2" },
                "examples": { "responseShape": { "$ref": "#/components/examples/CountExampleV2" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/sources": {
      "get": {
        "tags": ["Version 2"],
        "operationId": "getSourcesV2",
        "summary": "News sources",
        "description": "Returns up to 100 news sources matching the filters, in the version 2 layout: picked at random, then listed best-ranked first (lowest `priority` first, sources without a priority last). Without filters, only sources that have a country, a category and a language are listed. A source matches a list filter when it covers any of its values. Sources are not paginated, so the response has no `next_page`.\n\nConsumes **1** API credit per call.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/CountryV2" },
          { "$ref": "#/components/parameters/CategoryV2" },
          { "$ref": "#/components/parameters/LanguageV2" },
          { "$ref": "#/components/parameters/SourceUrlV2" },
          { "$ref": "#/components/parameters/SourcePriorityV2" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" },
              "X-RateLimit-Remaining":  { "$ref": "#/components/headers/XRateLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SourceListEnvelopeV2" },
                "examples": { "responseShape": { "$ref": "#/components/examples/SourceListExampleV2" } }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/websocket/register": {
      "post": {
        "tags": ["Version 2"],
        "operationId": "registerWebsocketQueryV2",
        "summary": "Register a real-time query",
        "description": "Registers a standing query for the real-time WebSocket stream and returns its `registration_id`. Use that id to connect to the stream at `wss://ws.newsdata.io/ws/event` and to manage the registration with `/2/websocket/fetch` and `/2/websocket/delete`. Available on plans with WebSocket access.\n\nThe parameters take the version 2 names and the same values, limits and plan rules as on `/2/news`; version 1 names such as `qInTitle`, `domainurl` or `full_content` return 422 `UnsupportedParameter`, and dates, `timeframe`, `size`, `page`, `sort`, `id` and `url` are not accepted. At least one of the following parameters is required: `q`, `q_in_title`, `q_in_meta`, `country`, `category`, `language`, `source_url`, `source_priority`, `image`, `video`, `content`. `exclude_field`, `timezone`, and `content`, `image` or `video` set to `0` shape the articles delivered over the stream, as they shape `/2/news` results.\n\nRegistering the same set of parameters and values again, in any order, returns **409** with the existing `registration_id`. Each account can keep a limited number of active registrations at a time: 1 on the Free plan, and on paid plans the number the plan allows; requests beyond the limit return **429**. Registrations that no client has connected to for 30 days are deleted automatically, as are all registrations of an account that loses WebSocket access.\n\nRegistering consumes no API credits, but requires at least 1 API credit remaining. Each article later delivered over the WebSocket stream consumes **1** API credit per connected device.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/QV2" },
          { "$ref": "#/components/parameters/QInTitleV2" },
          { "$ref": "#/components/parameters/QInMetaV2" },
          { "$ref": "#/components/parameters/CountryV2" },
          { "$ref": "#/components/parameters/ExcludeCountryV2" },
          { "$ref": "#/components/parameters/CategoryV2" },
          { "$ref": "#/components/parameters/ExcludeCategoryV2" },
          { "$ref": "#/components/parameters/LanguageV2" },
          { "$ref": "#/components/parameters/ExcludeLanguageV2" },
          { "$ref": "#/components/parameters/SourceUrlV2" },
          { "$ref": "#/components/parameters/ExcludeSourceUrlV2" },
          { "$ref": "#/components/parameters/SourcePriorityV2" },
          { "$ref": "#/components/parameters/TimezoneV2" },
          { "$ref": "#/components/parameters/ImageV2" },
          { "$ref": "#/components/parameters/VideoV2" },
          { "$ref": "#/components/parameters/ContentV2" },
          { "$ref": "#/components/parameters/RemoveDuplicateV2" },
          { "$ref": "#/components/parameters/Sentiment" },
          { "$ref": "#/components/parameters/SentimentScore" },
          { "$ref": "#/components/parameters/Tag" },
          { "$ref": "#/components/parameters/Region" },
          { "$ref": "#/components/parameters/Organization" },
          { "$ref": "#/components/parameters/Creator" },
          { "$ref": "#/components/parameters/Datatype" },
          { "$ref": "#/components/parameters/ExcludeFieldV2" }
        ],
        "responses": {
          "200": {
            "description": "Query registered.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/WebsocketRegisterEnvelope" },
                "examples": { "responseShape": { "$ref": "#/components/examples/WebsocketRegisterExample" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "409": { "$ref": "#/components/responses/Conflict" },
          "422": { "$ref": "#/components/responses/UnprocessableEntity" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/websocket/fetch": {
      "get": {
        "tags": ["Version 2"],
        "operationId": "getWebsocketQueriesV2",
        "summary": "List registered real-time queries",
        "description": "Returns every active WebSocket query registration of your account (`total_results` carries the count), each with its `registration_id`, `active_clients` — the number of devices currently connected to the stream for it, `last_used` — when a client last connected to it (RFC 3339, UTC), `news_type` — the type of news it streams, and `query` — the parameters it was registered with. Available on plans with WebSocket access.\n\nConsumes no API credits.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/WebsocketQueryListEnvelope" },
                "examples": { "responseShape": { "$ref": "#/components/examples/WebsocketQueryListExample" } }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/2/websocket/delete": {
      "delete": {
        "tags": ["Version 2"],
        "operationId": "deleteWebsocketQueryV2",
        "summary": "Delete a registered real-time query",
        "description": "Deletes one WebSocket query registration by its `registration_id`; articles stop being delivered for it. Available on plans with WebSocket access.\n\nConsumes no API credits.",
        "parameters": [
          { "$ref": "#/components/parameters/ApiKey" },
          { "$ref": "#/components/parameters/RegistrationId" }
        ],
        "responses": {
          "200": {
            "description": "Registration deleted.",
            "headers": {
              "X-API-Limit-Remaining":  { "$ref": "#/components/headers/XApiLimitRemaining" },
              "X-APIKEY-Limit-Remaining": { "$ref": "#/components/headers/XApiKeyLimitRemaining" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/WebsocketDeleteEnvelope" },
                "examples": { "responseShape": { "$ref": "#/components/examples/WebsocketDeleteExample" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },

    "/ws/event": {
      "servers": [
        { "url": "wss://ws.newsdata.io", "description": "Production WebSocket server" }
      ],
      "get": {
        "tags": ["Version 2"],
        "operationId": "connectWebsocketStream",
        "summary": "Real-time news stream (WebSocket)",
        "description": "WebSocket endpoint — described here as its HTTP handshake because OpenAPI cannot model WebSocket traffic. Connect with a WebSocket client:\n\n`wss://ws.newsdata.io/ws/event?apikey=YOUR_API_KEY&registration_id=YOUR_REGISTRATION_ID`\n\nWhenever newly collected articles match the registered query, the server pushes one JSON message per batch: `{\"status\": \"success\", \"total_results\": N, \"results\": [ ... ]}`, where each result is an article in the same version 2 layout as `/2/news` results. Fields listed in the registration's `exclude_field` are left out; `content`, `media.image_url` and `media.video_url` are `null` when the registration has `content=0`, `image=0` or `video=0`; and `published_at`/`fetched_at` are RFC 3339 times in the registration's `timezone` (UTC, shown as `Z`, otherwise). Client-to-server messages are ignored — the socket is receive-only. One message carries a whole batch of articles and can be larger than 1 MiB; some WebSocket clients refuse messages over 1 MiB by default and close the connection (for example Python's `websockets`), so raise or remove that limit (`max_size=None` in `websockets`).\n\nRefusals are sent over the WebSocket itself, not as an HTTP error: the connection opens, the server sends one error message in the same shape as REST errors, `{\"status\": \"error\", \"results\": {\"message\": \"...\", \"code\": \"...\"}}`, and then closes the connection with that `code` as the close reason.\n\n- Refused with close code `1008` when `apikey` or `registration_id` is missing or malformed (`Unauthorized` for `apikey`, `InvalidRequest` for `registration_id`), when they don't match an active registration of an account with WebSocket access (`Unauthorized`), when the account has no API credits left (`ApiLimitExceeded`, or `ApiKeyLimitExceeded` when the credit limit set on the API key is used up), or when a connection would go beyond the allowed simultaneous devices per `registration_id`, 5 by default (`DeviceLimitExceeded`).\n- Each delivered article consumes **1** API credit per connected device. When the credits run out, open connections are closed with `1008` (`ApiLimitExceeded` or `ApiKeyLimitExceeded`).\n- Open connections whose API key, registration or WebSocket access is removed are closed with `1008` (`Unauthorized`).\n- If the server fails, the connection is closed with `1011` (`ServerError`).\n- A client that reads too slowly is disconnected with `1013` (`SendTimeout`), without an error message.\n\nAfter a `1008` close, fix what the error message names before reconnecting; for `DeviceLimitExceeded`, close another connection or wait, since a connection that dropped without closing frees its slot within a few minutes. After a `1011` or `1013` close or a network drop, reconnect with backoff.",
        "security": [ { "ApiKeyQuery": [] } ],
        "parameters": [
          { "$ref": "#/components/parameters/ApiKeyQueryOnly" },
          { "$ref": "#/components/parameters/RegistrationId" }
        ],
        "responses": {
          "101": {
            "description": "WebSocket connection established. The schema below describes the JSON messages subsequently pushed over the socket (a `101` response itself has no body).",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/WebsocketNewsMessage" },
                "examples": { "messageShape": { "$ref": "#/components/examples/WebsocketNewsMessageExample" } }
              }
            }
          }
        }
      }
    }
  },

  "components": {
    "securitySchemes": {
      "ApiKeyQuery": {
        "type": "apiKey",
        "in": "query",
        "name": "apikey",
        "description": "API key passed as a query-string parameter."
      },
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-ACCESS-KEY",
        "description": "API key passed as an HTTP header. Used when `apikey` is not supplied in the query string."
      }
    },

    "parameters": {
      "ApiKey": {
        "name": "apikey",
        "in": "query",
        "required": false,
        "description": "Your API key. Alternatively send it in the `X-ACCESS-KEY` HTTP header. One of the two MUST be present.",
        "schema": { "type": "string" },
        "examples": { "default": { "value": "pub_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } }
      },
      "Q": {
        "name": "q",
        "in": "query",
        "required": false,
        "description": "Search articles by keywords or phrases (matches title, description, content, keywords, and URL). All words must match unless joined with `OR`; supports the `AND`, `OR` and `NOT` operators, quoted phrases and parentheses. Characters such as `*`, `?`, `+`, `-`, `:` and `/` have no special meaning (no wildcards). A query with invalid syntax, e.g. unbalanced quotes or parentheses, returns 400 `MalformedQuery`. Maximum length depends on your plan (default 100 characters). Use only one of `q`, `qInTitle`, `qInMeta`.",
        "schema": { "type": "string", "maxLength": 100 },
        "examples": {
          "keyword": { "value": "elections" },
          "operator": { "value": "elections AND results" }
        }
      },
      "QInTitle": {
        "name": "qInTitle",
        "in": "query",
        "required": false,
        "description": "Search articles by keywords in the title only, with the same syntax as `q`. Maximum length depends on your plan (default 100 characters). Use only one of `q`, `qInTitle`, `qInMeta`.",
        "schema": { "type": "string", "maxLength": 100 }
      },
      "QInMeta": {
        "name": "qInMeta",
        "in": "query",
        "required": false,
        "description": "Search articles by keywords in the title, description, keywords, and URL, with the same syntax as `q`. Maximum length depends on your plan (default 100 characters). Use only one of `q`, `qInTitle`, `qInMeta`.",
        "schema": { "type": "string", "maxLength": 100 }
      },
      "Country": {
        "name": "country",
        "in": "query",
        "required": false,
        "description": "Filter by country. Comma-separated ISO 3166-1 alpha-2 country codes or country names (e.g. `in` or `india`), up to your plan's filter limit (default 5). Cannot be combined with `excludecountry`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": {
          "single": { "value": "us" },
          "multiple": { "value": "us,gb,in" }
        }
      },
      "ExcludeCountry": {
        "name": "excludecountry",
        "in": "query",
        "required": false,
        "description": "Exclude countries. Comma-separated ISO country codes or country names (e.g. `in` or `india`), up to your plan's filter limit (default 5). Cannot be combined with `country`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "Category": {
        "name": "category",
        "in": "query",
        "required": false,
        "description": "Filter by category. Comma-separated category names, up to your plan's filter limit (default 5). Cannot be combined with `excludecategory`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": { "default": { "value": "business,technology" } }
      },
      "ExcludeCategory": {
        "name": "excludecategory",
        "in": "query",
        "required": false,
        "description": "Exclude categories. Comma-separated category names, up to your plan's filter limit (default 5). Cannot be combined with `category`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "Language": {
        "name": "language",
        "in": "query",
        "required": false,
        "description": "Filter by language. Comma-separated ISO 639-1 language codes or language names (e.g. `en` or `english`), up to your plan's filter limit (default 5). Cannot be combined with `excludelanguage`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": { "default": { "value": "en,hi" } }
      },
      "ExcludeLanguage": {
        "name": "excludelanguage",
        "in": "query",
        "required": false,
        "description": "Exclude languages. Comma-separated language codes or language names (e.g. `en` or `english`), up to your plan's filter limit (default 5). Cannot be combined with `language`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "DomainUrl": {
        "name": "domainurl",
        "in": "query",
        "required": false,
        "description": "Filter by news source URL. Use the source's exact URL: host plus path, e.g. `bbc.com`, `vice.com/de`, `fr.investing.com` (scheme, `www.` and a trailing `/` are optional). A value that doesn't match a source exactly returns 422 with the matching source URLs under `recommendations`. Comma-separated, up to your plan's filter limit (default 5). Cannot be combined with `excludedomainurl`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": { "default": { "value": "bbc.com,cnn.com" } }
      },
      "ExcludeDomainUrl": {
        "name": "excludedomainurl",
        "in": "query",
        "required": false,
        "description": "Exclude news sources by URL. Use the source's exact URL: host plus path, e.g. `bbc.com`, `vice.com/de`, `fr.investing.com` (scheme, `www.` and a trailing `/` are optional). A value that doesn't match a source exactly returns 422 with the matching source URLs under `recommendations`. Comma-separated, up to your plan's filter limit (default 5). Cannot be combined with `domainurl`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "PriorityDomain": {
        "name": "prioritydomain",
        "in": "query",
        "required": false,
        "description": "Restrict results to news sources by rank (quality and popularity): `top` keeps only the highest-ranked sources, `medium` adds mid-ranked sources, and `low` adds lower-ranked sources as well.",
        "schema": { "type": "string", "enum": ["top", "medium", "low"] }
      },
      "Id": {
        "name": "id",
        "in": "query",
        "required": false,
        "description": "Fetch specific articles by their `article_id`. Comma-separated, up to your plan's page-size limit (default 50 paid, 10 free). Must be used alone — cannot be combined with any other filter.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string", "minLength": 32, "maxLength": 32 }, "maxItems": 50 }
      },
      "Url": {
        "name": "url",
        "in": "query",
        "required": false,
        "description": "Fetch a single article by its URL. Send the full URL, including `http://` or `https://` (otherwise 422 `MalformedUrl`); tracking parameters such as `utm_*` are ignored. Maximum length 512. Must be used alone — cannot be combined with any other filter.",
        "schema": { "type": "string", "format": "uri", "maxLength": 512 }
      },
      "FromDate": {
        "name": "from_date",
        "in": "query",
        "required": false,
        "description": "Get articles published on or after this date. Format `YYYY-MM-DD` (from 00:00:00) or `YYYY-MM-DD HH:MM:SS`, in UTC. Cannot be a future date or later than `to_date`. How far back you can search depends on your plan; an older date returns 403. Cannot be combined with `timeframe`.",
        "schema": { "type": "string" },
        "examples": {
          "date": { "value": "2026-05-01" },
          "dateTime": { "value": "2026-05-01 06:00:00" }
        }
      },
      "ToDate": {
        "name": "to_date",
        "in": "query",
        "required": false,
        "description": "Get articles published on or before this date. Format `YYYY-MM-DD` (up to 23:59:59 of that day, or up to now for today) or `YYYY-MM-DD HH:MM:SS`, in UTC. Cannot be a future date. Cannot be combined with `timeframe`.",
        "schema": { "type": "string" },
        "examples": {
          "date": { "value": "2026-05-31" },
          "dateTime": { "value": "2026-05-31 18:00:00" }
        }
      },
      "Timeframe": {
        "name": "timeframe",
        "in": "query",
        "required": false,
        "description": "Get articles from the last N hours or minutes. A plain number means hours (1-48); add an `m` suffix for minutes (1-2880), e.g. `15m`. Paid plans only. Cannot be combined with `from_date`/`to_date`.",
        "schema": { "type": "string", "pattern": "^[0-9]+[mM]?$" },
        "examples": {
          "hours": { "value": "24" },
          "minutes": { "value": "15m" }
        }
      },
      "Timezone": {
        "name": "timezone",
        "in": "query",
        "required": false,
        "description": "Show `pubDate` and `fetched_at` in this timezone (IANA name, e.g. `Asia/Kolkata`). Defaults to `UTC`. It does not change how `from_date`/`to_date` are read; those are always UTC.",
        "schema": { "type": "string", "default": "UTC" },
        "examples": { "default": { "value": "Asia/Kolkata" } }
      },
      "Image": {
        "name": "image",
        "in": "query",
        "required": false,
        "description": "Set to `1` to return only articles that include an image, or `0` to return the `image_url` field as `null`.",
        "schema": { "type": "string", "enum": ["0", "1"] }
      },
      "Video": {
        "name": "video",
        "in": "query",
        "required": false,
        "description": "Set to `1` to return only articles that include a video, or `0` to return the `video_url` field as `null`.",
        "schema": { "type": "string", "enum": ["0", "1"] }
      },
      "FullContent": {
        "name": "full_content",
        "in": "query",
        "required": false,
        "description": "Set to `1` to return only articles that include full content, or `0` to return the `content` field as `null`. Available on plans with full-content access, where `content` is included by default.",
        "schema": { "type": "string", "enum": ["0", "1"] }
      },
      "RemoveDuplicate": {
        "name": "removeduplicate",
        "in": "query",
        "required": false,
        "description": "Set to `1` to exclude duplicate articles.",
        "schema": { "type": "string", "enum": ["0", "1"] }
      },
      "Sentiment": {
        "name": "sentiment",
        "in": "query",
        "required": false,
        "description": "Filter articles by sentiment.",
        "schema": { "type": "string", "enum": ["positive", "neutral", "negative"] }
      },
      "SentimentScore": {
        "name": "sentiment_score",
        "in": "query",
        "required": false,
        "description": "Minimum sentiment confidence (1-100) for the chosen `sentiment`. Requires the `sentiment` parameter.",
        "schema": { "type": "number", "minimum": 1, "maximum": 100 }
      },
      "Tag": {
        "name": "tag",
        "in": "query",
        "required": false,
        "description": "Filter by AI-classified topic tags (e.g. `politics,technology`; the crypto endpoints use the crypto tag set, e.g. `blockchain,mining`). Comma-separated, up to your plan's filter limit (default 5).",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "Region": {
        "name": "region",
        "in": "query",
        "required": false,
        "description": "Filter by AI-extracted geographic region. Join sub-regions with `-` to require them together (e.g. `paris-france`). Comma-separated, up to your plan's filter limit (default 5). Available on Corporate plans.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "Organization": {
        "name": "organization",
        "in": "query",
        "required": false,
        "description": "Filter by AI-extracted organization names. Comma-separated, up to your plan's filter limit (default 5). Available on Corporate plans.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "Creator": {
        "name": "creator",
        "in": "query",
        "required": false,
        "description": "Filter by article author / byline. Comma-separated, up to your plan's filter limit (default 5); all values together can be at most your plan's maximum query length (default 100 characters).",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "Datatype": {
        "name": "datatype",
        "in": "query",
        "required": false,
        "description": "Filter by content type, e.g. `news`, `blog`, `podcast`. Comma-separated, up to your plan's filter limit (default 5).",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "Size": {
        "name": "size",
        "in": "query",
        "required": false,
        "description": "Number of articles per page: 1 to 50 on paid plans, 1 to 10 on the free plan. Defaults to your plan's maximum.",
        "schema": { "type": "integer", "minimum": 1, "maximum": 50 }
      },
      "Page": {
        "name": "page",
        "in": "query",
        "required": false,
        "description": "Pagination. With the default sort, pass the `nextPage` value from the previous response. With `sort=relevancy|source|fetched_at`, pass a page number instead.",
        "schema": { "type": "string" },
        "examples": {
          "cursor": { "value": "1749547200000000000" },
          "pageNumber": { "value": "2" }
        }
      },
      "Sort": {
        "name": "sort",
        "in": "query",
        "required": false,
        "description": "Result ordering: `pubdatedesc` (default, newest first), `pubdateasc`, `relevancy` (requires `q`/`qInTitle`/`qInMeta`), `source` (highest-ranked sources first), or `fetched_at` (most recently collected first). `relevancy`, `source`, and `fetched_at` are limited to the first 10,000 results. `fetched_at` is available on `/latest`, `/archive`, and `/market` only.",
        "schema": {
          "type": "string",
          "enum": ["pubdatedesc", "pubdateasc", "relevancy", "source", "fetched_at"],
          "default": "pubdatedesc"
        }
      },
      "ExcludeField": {
        "name": "excludefield",
        "in": "query",
        "required": false,
        "description": "Comma-separated list of response fields to leave out of each article. `article_id` cannot be excluded.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" } },
        "examples": { "default": { "value": "content,keywords" } }
      },
      "Coin": {
        "name": "coin",
        "in": "query",
        "required": false,
        "description": "Filter by cryptocurrency. Comma-separated coin ticker symbols, up to your plan's filter limit (default 5).",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": { "default": { "value": "btc,eth" } }
      },
      "SortCrypto": {
        "name": "sort",
        "in": "query",
        "required": false,
        "description": "Result ordering: `pubdatedesc` (default, newest first), `pubdateasc`, `relevancy` (requires `q`/`qInTitle`/`qInMeta`), or `source` (highest-ranked sources first). `relevancy` and `source` are limited to the first 10,000 results.",
        "schema": {
          "type": "string",
          "enum": ["pubdatedesc", "pubdateasc", "relevancy", "source"],
          "default": "pubdatedesc"
        }
      },
      "MarketId": {
        "name": "market_id",
        "in": "query",
        "required": false,
        "description": "Filter by market identifier (`market_id`, the unique symbol id). Comma-separated, up to your plan's filter limit (default 5).",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": { "default": { "value": "aapl-us-vy,msft-us-vy" } }
      },
      "FromDateCount": {
        "name": "from_date",
        "in": "query",
        "required": true,
        "description": "Count articles published on or after this date. Format `YYYY-MM-DD` (from 00:00:00) or `YYYY-MM-DD HH:MM:SS`, in UTC. Cannot be a future date or later than `to_date`. How far back you can go depends on your plan; an older date returns 403.",
        "schema": { "type": "string" },
        "examples": {
          "date": { "value": "2026-05-01" },
          "dateTime": { "value": "2026-05-01 06:00:00" }
        }
      },
      "ToDateCount": {
        "name": "to_date",
        "in": "query",
        "required": true,
        "description": "Count articles published on or before this date. Format `YYYY-MM-DD` (up to 23:59:59 of that day, or up to now for today) or `YYYY-MM-DD HH:MM:SS`, in UTC. Cannot be a future date.",
        "schema": { "type": "string" },
        "examples": {
          "date": { "value": "2026-05-31" },
          "dateTime": { "value": "2026-05-31 18:00:00" }
        }
      },
      "Interval": {
        "name": "interval",
        "in": "query",
        "required": false,
        "description": "How to count: `all` (default) returns a single total; `hour` or `day` returns a count-per-hour or count-per-day breakdown.",
        "schema": { "type": "string", "enum": ["all", "hour", "day"], "default": "all" }
      },
      "SizeCount": {
        "name": "size",
        "in": "query",
        "required": false,
        "description": "Number of histogram entries per page when `interval=hour` or `day`: 1 to 50 on paid plans, 1 to 10 on the free plan.",
        "schema": { "type": "integer", "minimum": 1, "maximum": 50 }
      },
      "PageCount": {
        "name": "page",
        "in": "query",
        "required": false,
        "description": "Pagination for the histogram. Pass the `nextPage` value from the previous response.",
        "schema": { "type": "string" }
      },
      "SortCount": {
        "name": "sort",
        "in": "query",
        "required": false,
        "description": "Ordering of the histogram: `pubdatedesc` (default, newest first) or `pubdateasc`.",
        "schema": { "type": "string", "enum": ["pubdatedesc", "pubdateasc"], "default": "pubdatedesc" }
      },
      "ApiKeyQueryOnly": {
        "name": "apikey",
        "in": "query",
        "required": true,
        "description": "Your API key, passed as a query-string parameter. This endpoint does not accept the `X-ACCESS-KEY` header.",
        "schema": { "type": "string" },
        "examples": { "default": { "value": "pub_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } }
      },
      "RegistrationId": {
        "name": "registration_id",
        "in": "query",
        "required": true,
        "description": "The `registration_id` returned by `/2/websocket/register` (32-character identifier).",
        "schema": { "type": "string", "minLength": 32, "maxLength": 32 },
        "examples": { "default": { "value": "9b2d1e8a7c4f4b6e9d3a5c7e1f2a4b6c" } }
      },
      "QV2": {
        "name": "q",
        "in": "query",
        "required": false,
        "description": "Search articles by keywords or phrases (matches title, description, content, keywords, and URL). All words must match unless joined with `OR`; supports the `AND`, `OR` and `NOT` operators, quoted phrases and parentheses. Characters such as `*`, `?`, `+`, `-`, `:` and `/` have no special meaning (no wildcards). A query with invalid syntax, e.g. unbalanced quotes or parentheses, returns 400 `MalformedQuery`. Maximum length depends on your plan (default 100 characters). Use only one of `q`, `q_in_title`, `q_in_meta`.",
        "schema": { "type": "string", "maxLength": 100 },
        "examples": {
          "keyword": { "value": "elections" },
          "operator": { "value": "elections AND results" }
        }
      },
      "QInTitleV2": {
        "name": "q_in_title",
        "in": "query",
        "required": false,
        "description": "Search articles by keywords in the title only, with the same syntax as `q`. Maximum length depends on your plan (default 100 characters). Use only one of `q`, `q_in_title`, `q_in_meta`.",
        "schema": { "type": "string", "maxLength": 100 }
      },
      "QInMetaV2": {
        "name": "q_in_meta",
        "in": "query",
        "required": false,
        "description": "Search articles by keywords in the title, description, keywords, and URL, with the same syntax as `q`. Maximum length depends on your plan (default 100 characters). Use only one of `q`, `q_in_title`, `q_in_meta`.",
        "schema": { "type": "string", "maxLength": 100 }
      },
      "CountryV2": {
        "name": "country",
        "in": "query",
        "required": false,
        "description": "Filter by country. Comma-separated ISO 3166-1 alpha-2 country codes or country names (e.g. `in` or `india`), up to your plan's filter limit (default 5). Cannot be combined with `exclude_country`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": {
          "single": { "value": "us" },
          "multiple": { "value": "us,gb,in" }
        }
      },
      "ExcludeCountryV2": {
        "name": "exclude_country",
        "in": "query",
        "required": false,
        "description": "Exclude countries. Comma-separated ISO country codes or country names (e.g. `in` or `india`), up to your plan's filter limit (default 5). Cannot be combined with `country`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "CategoryV2": {
        "name": "category",
        "in": "query",
        "required": false,
        "description": "Filter by category. Comma-separated category names, up to your plan's filter limit (default 5). Cannot be combined with `exclude_category`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": { "default": { "value": "business,technology" } }
      },
      "ExcludeCategoryV2": {
        "name": "exclude_category",
        "in": "query",
        "required": false,
        "description": "Exclude categories. Comma-separated category names, up to your plan's filter limit (default 5). Cannot be combined with `category`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "LanguageV2": {
        "name": "language",
        "in": "query",
        "required": false,
        "description": "Filter by language. Comma-separated ISO 639-1 language codes or language names (e.g. `en` or `english`), up to your plan's filter limit (default 5). Cannot be combined with `exclude_language`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": { "default": { "value": "en,hi" } }
      },
      "ExcludeLanguageV2": {
        "name": "exclude_language",
        "in": "query",
        "required": false,
        "description": "Exclude languages. Comma-separated language codes or language names (e.g. `en` or `english`), up to your plan's filter limit (default 5). Cannot be combined with `language`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "SourceUrlV2": {
        "name": "source_url",
        "in": "query",
        "required": false,
        "description": "Filter by news source URL. Use the source's exact URL: host plus path, e.g. `bbc.com`, `vice.com/de`, `fr.investing.com` (scheme, `www.` and a trailing `/` are optional), so an article's `source.url` or a `/2/sources` result's `url` can be sent as it is. A value that doesn't match a source exactly returns 422 with the matching source URLs under `recommendations`. Comma-separated, up to your plan's filter limit (default 5). Cannot be combined with `exclude_source_url`. On `/2/crypto` and `/2/count/crypto` crypto sources are accepted as well.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 },
        "examples": { "default": { "value": "bbc.com,cnn.com" } }
      },
      "ExcludeSourceUrlV2": {
        "name": "exclude_source_url",
        "in": "query",
        "required": false,
        "description": "Exclude news sources by URL. Use the source's exact URL: host plus path, e.g. `bbc.com`, `vice.com/de`, `fr.investing.com` (scheme, `www.` and a trailing `/` are optional). A value that doesn't match a source exactly returns 422 with the matching source URLs under `recommendations`. Comma-separated, up to your plan's filter limit (default 5). Cannot be combined with `source_url`.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 5 }
      },
      "SourcePriorityV2": {
        "name": "source_priority",
        "in": "query",
        "required": false,
        "description": "Restrict results to news sources by rank (quality and popularity): `top` keeps only the highest-ranked sources, `medium` adds mid-ranked sources, and `low` adds lower-ranked sources as well.",
        "schema": { "type": "string", "enum": ["top", "medium", "low"] }
      },
      "IdV2": {
        "name": "id",
        "in": "query",
        "required": false,
        "description": "Fetch specific articles by their `id`. Comma-separated, up to your plan's page-size limit (default 50 paid, 10 free). Can be combined only with `from_date` and `to_date`; without them only the last 30 days are searched, so add them to find older articles.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string", "minLength": 32, "maxLength": 32 }, "maxItems": 50 }
      },
      "UrlV2": {
        "name": "url",
        "in": "query",
        "required": false,
        "description": "Fetch a single article by its URL. Send the full URL, including `http://` or `https://` (otherwise 422 `MalformedUrl`); tracking parameters such as `utm_*` are ignored. Maximum length 512. Can be combined only with `from_date` and `to_date`; without them only the last 30 days are searched.",
        "schema": { "type": "string", "format": "uri", "maxLength": 512 }
      },
      "FromDateV2": {
        "name": "from_date",
        "in": "query",
        "required": false,
        "description": "Get articles published on or after this date. Format `YYYY-MM-DD` (from 00:00:00) or `YYYY-MM-DD HH:MM:SS`, in UTC. Without `from_date`, `to_date` and `timeframe`, the last 30 days are searched (from 00:00 UTC 30 days ago). Paid plans can go back as far as their plan's history allows; an older date returns 403. On the free plan the date must fall within those last 30 days and at least 12 hours before now. A `from_date` earlier than 00:00 UTC 30 days ago makes the call cost 5 credits instead of 1. Cannot be a future date or later than `to_date`. Cannot be combined with `timeframe`.",
        "schema": { "type": "string" },
        "examples": {
          "date": { "value": "2026-05-01" },
          "dateTime": { "value": "2026-05-01 06:00:00" }
        }
      },
      "ToDateV2": {
        "name": "to_date",
        "in": "query",
        "required": false,
        "description": "Get articles published on or before this date. Format `YYYY-MM-DD` (up to 23:59:59 of that day, but never past the latest time allowed) or `YYYY-MM-DD HH:MM:SS`, in UTC. The latest time allowed, and the default, is now on paid plans and 12 hours ago on the free plan; a later date returns 422. On paid plans, `to_date` without `from_date` searches from your plan's history start, which usually costs 5 credits. Cannot be combined with `timeframe`.",
        "schema": { "type": "string" },
        "examples": {
          "date": { "value": "2026-05-31" },
          "dateTime": { "value": "2026-05-31 18:00:00" }
        }
      },
      "FromDateCountV2": {
        "name": "from_date",
        "in": "query",
        "required": false,
        "description": "Count articles published on or after this date. Format `YYYY-MM-DD` (from 00:00:00) or `YYYY-MM-DD HH:MM:SS`, in UTC. Optional: without `from_date`, `to_date` and `timeframe`, the last 30 days are counted (from 00:00 UTC 30 days ago). How far back you can go depends on your plan; an older date returns 403. Cannot be a future date or later than `to_date`. Cannot be combined with `timeframe`.",
        "schema": { "type": "string" },
        "examples": {
          "date": { "value": "2026-05-01" },
          "dateTime": { "value": "2026-05-01 06:00:00" }
        }
      },
      "ToDateCountV2": {
        "name": "to_date",
        "in": "query",
        "required": false,
        "description": "Count articles published on or before this date. Format `YYYY-MM-DD` (up to 23:59:59 of that day, or up to now for today) or `YYYY-MM-DD HH:MM:SS`, in UTC. Optional; defaults to now. With `to_date` but no `from_date`, counting starts at your plan's history start. Cannot be a future date. Cannot be combined with `timeframe`.",
        "schema": { "type": "string" },
        "examples": {
          "date": { "value": "2026-05-31" },
          "dateTime": { "value": "2026-05-31 18:00:00" }
        }
      },
      "TimeframeV2": {
        "name": "timeframe",
        "in": "query",
        "required": false,
        "description": "Get articles from the last N hours or minutes. A plain number means hours (1-720); add an `m` suffix for minutes (1-43200), e.g. `15m`. At most 30 days. Paid plans only. Cannot be combined with `from_date`/`to_date`.",
        "schema": { "type": "string", "pattern": "^[0-9]+[mM]?$" },
        "examples": {
          "hours": { "value": "24" },
          "minutes": { "value": "15m" }
        }
      },
      "TimezoneV2": {
        "name": "timezone",
        "in": "query",
        "required": false,
        "description": "Show `published_at` and `fetched_at` in this timezone (IANA name, e.g. `Asia/Kolkata`), as RFC 3339 times with that zone's offset, e.g. `2026-10-22T11:45:00+05:30`. Defaults to `UTC`, shown as `Z`. It does not change how `from_date`/`to_date` are read; those are always UTC.",
        "schema": { "type": "string", "default": "UTC" },
        "examples": { "default": { "value": "Asia/Kolkata" } }
      },
      "ImageV2": {
        "name": "image",
        "in": "query",
        "required": false,
        "description": "Set to `1` to return only articles that include an image, or `0` to return `media.image_url` as `null`. On the count endpoints `0` has no effect.",
        "schema": { "type": "string", "enum": ["0", "1"] }
      },
      "VideoV2": {
        "name": "video",
        "in": "query",
        "required": false,
        "description": "Set to `1` to return only articles that include a video, or `0` to return `media.video_url` as `null`. On the count endpoints `0` has no effect.",
        "schema": { "type": "string", "enum": ["0", "1"] }
      },
      "ContentV2": {
        "name": "content",
        "in": "query",
        "required": false,
        "description": "Set to `1` to return only articles that include full content, or `0` to return the `content` field as `null`. Available on plans with full-content access, where `content` is included by default; other plans get 403. On the count endpoints `0` has no effect.",
        "schema": { "type": "string", "enum": ["0", "1"] }
      },
      "RemoveDuplicateV2": {
        "name": "remove_duplicate",
        "in": "query",
        "required": false,
        "description": "Set to `1` to exclude duplicate articles.",
        "schema": { "type": "string", "enum": ["0", "1"] }
      },
      "SortV2": {
        "name": "sort",
        "in": "query",
        "required": false,
        "description": "Result ordering: `pubdatedesc` (default, newest first), `pubdateasc`, `relevancy` (requires `q`/`q_in_title`/`q_in_meta`), `source` (highest-ranked sources first), or `fetched_at` (most recently collected first). `relevancy`, `source`, and `fetched_at` are limited to the first 10,000 results.",
        "schema": {
          "type": "string",
          "enum": ["pubdatedesc", "pubdateasc", "relevancy", "source", "fetched_at"],
          "default": "pubdatedesc"
        }
      },
      "SortCryptoV2": {
        "name": "sort",
        "in": "query",
        "required": false,
        "description": "Result ordering: `pubdatedesc` (default, newest first), `pubdateasc`, `relevancy` (requires `q`/`q_in_title`/`q_in_meta`), or `source` (highest-ranked sources first). `relevancy` and `source` are limited to the first 10,000 results.",
        "schema": {
          "type": "string",
          "enum": ["pubdatedesc", "pubdateasc", "relevancy", "source"],
          "default": "pubdatedesc"
        }
      },
      "PageV2": {
        "name": "page",
        "in": "query",
        "required": false,
        "description": "Pagination. With the default sort, pass the `next_page` value from the previous response. With `sort=relevancy|source|fetched_at`, pass a page number instead.",
        "schema": { "type": "string" },
        "examples": {
          "cursor": { "value": "1749547200000000000" },
          "pageNumber": { "value": "2" }
        }
      },
      "ExcludeFieldV2": {
        "name": "exclude_field",
        "in": "query",
        "required": false,
        "description": "Comma-separated list of response fields to leave out of each article: a top-level field (e.g. `content`), a whole group (`media`, `source` or `ai`), or one field of a group (e.g. `ai.summary`). `id` cannot be excluded.",
        "explode": false,
        "style": "form",
        "schema": { "type": "array", "items": { "type": "string" } },
        "examples": { "default": { "value": "content,keyword,ai.summary" } }
      },
      "IntervalV2": {
        "name": "interval",
        "in": "query",
        "required": false,
        "description": "Bucket size: `month`, `day` (default) or `hour`. Buckets start at the first of the month, at midnight or on the full hour, in UTC.",
        "schema": { "type": "string", "enum": ["month", "day", "hour"], "default": "day" }
      },
      "SizeCountV2": {
        "name": "size",
        "in": "query",
        "required": false,
        "description": "Number of buckets per page, from 1 to your plan's page size (50 on paid plans). Defaults to the maximum.",
        "schema": { "type": "integer", "minimum": 1, "maximum": 50 }
      },
      "PageCountV2": {
        "name": "page",
        "in": "query",
        "required": false,
        "description": "Pagination of the buckets. Pass the `next_page` value from the previous response.",
        "schema": { "type": "string" },
        "examples": { "default": { "value": "1790640000000000000" } }
      }
    },

    "headers": {
      "XApiLimitRemaining": {
        "description": "API credits remaining on your plan.",
        "schema": { "type": "integer", "minimum": 0 }
      },
      "XApiKeyLimitRemaining": {
        "description": "API credits remaining under the credit limit set on this API key. Only sent when a credit limit is set on the API key used; your plan's credits (`X-API-Limit-Remaining`) still apply, whichever runs out first.",
        "schema": { "type": "integer", "minimum": 0 }
      },
      "XRateLimitRemaining": {
        "description": "Requests remaining in the current 15-minute rate-limit window.",
        "schema": { "type": "integer", "minimum": 0 }
      },
      "RetryAfter": {
        "description": "Sent with 429 `RateLimitExceeded`: the number of seconds to wait before retrying.",
        "schema": { "type": "integer", "minimum": 0 }
      }
    },

    "schemas": {
      "ErrorCode": {
        "type": "string",
        "description": "Error code. Like `message`, it is translated when the request's `Accept-Language` header selects a supported language (hi, es, ur, de, ru, zh, ja, ar, fr, id, pt, bn); the values below are the English codes, returned by default.",
        "enum": [
          "Unauthorized",
          "ServerError",
          "TooManyRequests",
          "InvalidRequest",
          "AccessDenied",
          "ServiceUnavailable",
          "NotFound",
          "UnsupportedFilter",
          "FilterLimitExceed",
          "UnsupportedParameter",
          "TooManyQueryFilter",
          "UnsupportedDateFormat",
          "UnsupportedQueryLength",
          "RateLimitExceeded",
          "ApiLimitExceeded",
          "ApiKeyLimitExceeded",
          "RegistrationLimitExceeded",
          "MalformedUrl",
          "MaxPageLimitExceeded",
          "MalformedQuery",
          "Conflict"
        ]
      },

      "ErrorDetail": {
        "type": "object",
        "description": "Error details.",
        "required": ["message", "code"],
        "properties": {
          "message": { "type": "string", "description": "Human-readable error description." },
          "code": { "$ref": "#/components/schemas/ErrorCode" }
        }
      },

      "InvalidFilterDetail": {
        "type": "object",
        "description": "Error details returned when a filter value is not supported. The rejected value(s) are listed, comma-separated, under `invalid_<parameter>`, named after the parameter you sent (e.g. `invalid_excludecountry` on version 1, `invalid_exclude_country` on version 2); `recommendations` may offer close matches.",
        "properties": {
          "message": { "type": "string" },
          "code": { "$ref": "#/components/schemas/ErrorCode" },
          "invalid_domainurl": { "type": "string" },
          "invalid_excludedomainurl": { "type": "string" },
          "invalid_country": { "type": "string" },
          "invalid_excludecountry": { "type": "string" },
          "invalid_category": { "type": "string" },
          "invalid_excludecategory": { "type": "string" },
          "invalid_language": { "type": "string" },
          "invalid_excludelanguage": { "type": "string" },
          "invalid_datatype": { "type": "string" },
          "invalid_excludefield": { "type": "string" },
          "invalid_id": { "type": "string" },
          "invalid_tag": { "type": "string" },
          "invalid_region": { "type": "string" },
          "invalid_coin": { "type": "string" },
          "invalid_market_id": { "type": "string" },
          "invalid_source_url": { "type": "string" },
          "invalid_exclude_source_url": { "type": "string" },
          "invalid_exclude_country": { "type": "string" },
          "invalid_exclude_category": { "type": "string" },
          "invalid_exclude_language": { "type": "string" },
          "invalid_exclude_field": { "type": "string" },
          "recommendations": {
            "type": "object",
            "description": "Close matches keyed by the rejected value (an empty list when there are none). For `market_id` each match is a ticker object; for `country`, `excludecountry`, `exclude_country`, `language`, `excludelanguage`, `exclude_language` and `coin` each match is a `{code, name}` object (e.g. `usa` → `us`, `eng` → `en`, `bitcoin` → `btc`); for `tag` each match is an `{id, name}` object (e.g. `ai` → `artificial_intelligence`); for `category`, `excludecategory` and `exclude_category` each match is a valid category (e.g. `sprots` → `sports`, `movie` → `entertainment`); for `domainurl`, `excludedomainurl`, `source_url` and `exclude_source_url` each match is a source URL (host plus path, e.g. `vice.com/de`).",
            "additionalProperties": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": ["ticker", "id"],
                    "properties": {
                      "ticker": { "type": "string" },
                      "country": { "type": "string" },
                      "exchangeName": { "type": "string" },
                      "id": { "type": "string", "description": "The unique identifier to use as `market_id`." }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["code", "name"],
                    "properties": {
                      "code": { "type": "string", "description": "The country, language or coin code to send." },
                      "name": { "type": "string" }
                    }
                  },
                  {
                    "type": "object",
                    "required": ["id", "name"],
                    "properties": {
                      "id": { "type": "string", "description": "The tag to send." },
                      "name": { "type": "string" }
                    }
                  },
                  { "type": "string" }
                ]
              }
            }
          }
        }
      },

      "ErrorEnvelope": {
        "type": "object",
        "description": "Standard error response. `results` contains the error message and code; for unsupported filter values it also lists the rejected value(s).",
        "required": ["status", "results"],
        "properties": {
          "status": { "type": "string", "const": "error" },
          "results": {
            "oneOf": [
              { "$ref": "#/components/schemas/ErrorDetail" },
              { "$ref": "#/components/schemas/InvalidFilterDetail" }
            ]
          }
        }
      },

      "SentimentStats": {
        "type": "object",
        "description": "Sentiment percentage breakdown. The three values sum to 100.",
        "required": ["negative", "neutral", "positive"],
        "properties": {
          "negative": { "type": "number", "minimum": 0, "maximum": 100 },
          "neutral": { "type": "number", "minimum": 0, "maximum": 100 },
          "positive": { "type": "number", "minimum": 0, "maximum": 100 }
        }
      },

      "Article": {
        "type": "object",
        "description": "A news article. Fields marked as plan-specific return a short notice string instead of their value on plans that do not include them. Any field except `article_id` may be `null`.",
        "required": ["article_id"],
        "properties": {
          "article_id": { "type": "string", "description": "Unique article identifier (32 characters)." },
          "link": { "type": ["string", "null"], "format": "uri", "description": "Article URL." },
          "title": { "type": ["string", "null"], "description": "Article title." },
          "description": { "type": ["string", "null"], "description": "Short article description." },
          "content": {
            "type": ["string", "null"],
            "description": "Full article text. Plan-specific (full-content access). Returned as `null` when `full_content=0`."
          },
          "keywords": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article keywords." },
          "creator": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article author(s)." },
          "language": { "type": ["string", "null"], "description": "Language name, e.g. 'english'." },
          "country": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Country names, e.g. 'india'." },
          "category": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article categories." },
          "datatype": { "type": "string", "description": "Content type, e.g. 'news', 'blog', 'podcast'." },
          "pubDate": { "type": ["string", "null"], "description": "Publish date, `YYYY-MM-DD HH:MM:SS`, in the requested `timezone`." },
          "pubDateTZ": { "type": "string", "description": "Timezone of the dates in this article. 'UTC' unless `timezone` was supplied." },
          "fetched_at": { "type": ["string", "null"], "description": "When the article was collected, `YYYY-MM-DD HH:MM:SS`, in the requested `timezone`." },
          "image_url": { "type": ["string", "null"], "format": "uri", "description": "Article image URL." },
          "video_url": { "type": ["string", "null"], "format": "uri", "description": "Article video URL." },
          "source_id": { "type": ["string", "null"], "description": "Source id." },
          "source_name": { "type": ["string", "null"], "description": "Source display name." },
          "source_priority": { "type": ["integer", "null"], "description": "Source ranking (lower = higher-ranked)." },
          "source_url": { "type": ["string", "null"], "format": "uri", "description": "Source website URL." },
          "source_icon": { "type": ["string", "null"], "format": "uri", "description": "Source icon URL." },
          "sentiment": {
            "description": "Overall sentiment: positive, neutral, or negative.",
            "anyOf": [
              { "type": "string", "enum": ["positive", "neutral", "negative"] },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "sentiment_stats": {
            "description": "Sentiment percentage breakdown.",
            "anyOf": [
              { "$ref": "#/components/schemas/SentimentStats" },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "ai_tag": {
            "description": "AI-classified topic tags.",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "ai_region": {
            "description": "AI-extracted regions, e.g. 'paris,france'. Plan-specific (Corporate).",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "ai_org": {
            "description": "AI-extracted organization names. Plan-specific (Corporate).",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "ai_summary": {
            "type": ["string", "null"],
            "description": "AI-generated article summary. Plan-specific."
          },
          "duplicate": { "type": "boolean", "description": "Whether the article is a duplicate of another article." }
        }
      },

      "ArticleListEnvelope": {
        "type": "object",
        "description": "Successful article list response.",
        "required": ["status", "totalResults", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "totalResults": { "type": "integer", "description": "Total number of articles matching the query (not just this page)." },
          "results": { "type": "array", "items": { "$ref": "#/components/schemas/Article" } },
          "nextPage": {
            "type": ["string", "null"],
            "description": "Pass this value as the `page` parameter to get the next page. `null` when there are no more results."
          }
        }
      },

      "CryptoArticle": {
        "type": "object",
        "description": "A cryptocurrency news article. Fields marked as plan-specific return a short notice string instead of their value on plans that do not include them. Any field except `article_id` may be `null`.",
        "required": ["article_id"],
        "properties": {
          "article_id": { "type": "string", "description": "Unique article identifier (32 characters)." },
          "link": { "type": ["string", "null"], "format": "uri", "description": "Article URL." },
          "title": { "type": ["string", "null"], "description": "Article title." },
          "description": { "type": ["string", "null"], "description": "Short article description." },
          "content": {
            "type": ["string", "null"],
            "description": "Full article text. Plan-specific (full-content access). Returned as `null` when `full_content=0`."
          },
          "keywords": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article keywords." },
          "creator": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article author(s)." },
          "coin": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Cryptocurrencies the article mentions, by ticker symbol." },
          "language": { "type": ["string", "null"], "description": "Language name, e.g. 'english'." },
          "pubDate": { "type": ["string", "null"], "description": "Publish date, `YYYY-MM-DD HH:MM:SS`, in the requested `timezone`." },
          "pubDateTZ": { "type": "string", "description": "Timezone of the dates in this article. 'UTC' unless `timezone` was supplied." },
          "fetched_at": { "type": ["string", "null"], "description": "When the article was collected, `YYYY-MM-DD HH:MM:SS`, in the requested `timezone`." },
          "image_url": { "type": ["string", "null"], "format": "uri", "description": "Article image URL." },
          "video_url": { "type": ["string", "null"], "format": "uri", "description": "Article video URL." },
          "source_id": { "type": ["string", "null"], "description": "Source id." },
          "source_name": { "type": ["string", "null"], "description": "Source display name." },
          "source_priority": { "type": ["integer", "null"], "description": "Source ranking (lower = higher-ranked)." },
          "source_url": { "type": ["string", "null"], "format": "uri", "description": "Source website URL." },
          "source_icon": { "type": ["string", "null"], "format": "uri", "description": "Source icon URL." },
          "sentiment": {
            "description": "Overall sentiment: positive, neutral, or negative.",
            "anyOf": [
              { "type": "string", "enum": ["positive", "neutral", "negative"] },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "sentiment_stats": {
            "description": "Sentiment percentage breakdown.",
            "anyOf": [
              { "$ref": "#/components/schemas/SentimentStats" },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "ai_tag": {
            "description": "AI-classified topic tags (crypto-specific tag set).",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "duplicate": { "type": "boolean", "description": "Whether the article is a duplicate of another article." }
        }
      },

      "CryptoArticleListEnvelope": {
        "type": "object",
        "description": "Successful crypto article list response.",
        "required": ["status", "totalResults", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "totalResults": { "type": "integer", "description": "Total number of articles matching the query (not just this page)." },
          "results": { "type": "array", "items": { "$ref": "#/components/schemas/CryptoArticle" } },
          "nextPage": {
            "type": ["string", "null"],
            "description": "Pass this value as the `page` parameter to get the next page. `null` when there are no more results."
          }
        }
      },

      "MarketArticle": {
        "type": "object",
        "description": "A financial-market news article. Fields marked as plan-specific return a short notice string instead of their value on plans that do not include them. Any field except `article_id` may be `null`.",
        "required": ["article_id"],
        "properties": {
          "article_id": { "type": "string", "description": "Unique article identifier (32 characters)." },
          "link": { "type": ["string", "null"], "format": "uri", "description": "Article URL." },
          "title": { "type": ["string", "null"], "description": "Article title." },
          "description": { "type": ["string", "null"], "description": "Short article description." },
          "content": {
            "type": ["string", "null"],
            "description": "Full article text. Plan-specific (full-content access). Returned as `null` when `full_content=0`."
          },
          "keywords": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article keywords." },
          "creator": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article author(s)." },
          "symbol": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Stock ticker symbols the article mentions." },
          "market_id": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Unique market identifiers for the tickers in `symbol` — the values accepted by the `market_id` filter." },
          "language": { "type": ["string", "null"], "description": "Language name, e.g. 'english'." },
          "country": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Country names, e.g. 'india'." },
          "datatype": { "type": "string", "description": "Content type, e.g. 'news', 'blog', 'podcast'." },
          "pubDate": { "type": ["string", "null"], "description": "Publish date, `YYYY-MM-DD HH:MM:SS`, in the requested `timezone`." },
          "pubDateTZ": { "type": "string", "description": "Timezone of the dates in this article. 'UTC' unless `timezone` was supplied." },
          "fetched_at": { "type": ["string", "null"], "description": "When the article was collected, `YYYY-MM-DD HH:MM:SS`, in the requested `timezone`." },
          "image_url": { "type": ["string", "null"], "format": "uri", "description": "Article image URL." },
          "video_url": { "type": ["string", "null"], "format": "uri", "description": "Article video URL." },
          "source_id": { "type": ["string", "null"], "description": "Source id." },
          "source_name": { "type": ["string", "null"], "description": "Source display name." },
          "source_priority": { "type": ["integer", "null"], "description": "Source ranking (lower = higher-ranked)." },
          "source_url": { "type": ["string", "null"], "format": "uri", "description": "Source website URL." },
          "source_icon": { "type": ["string", "null"], "format": "uri", "description": "Source icon URL." },
          "sentiment": {
            "description": "Overall sentiment: positive, neutral, or negative.",
            "anyOf": [
              { "type": "string", "enum": ["positive", "neutral", "negative"] },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "sentiment_stats": {
            "description": "Sentiment percentage breakdown.",
            "anyOf": [
              { "$ref": "#/components/schemas/SentimentStats" },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "ai_tag": {
            "description": "AI-classified topic tags.",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "ai_org": {
            "description": "AI-extracted organization names. Plan-specific (Corporate).",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "ai_summary": {
            "type": ["string", "null"],
            "description": "AI-generated article summary. Plan-specific."
          },
          "duplicate": { "type": "boolean", "description": "Whether the article is a duplicate of another article." }
        }
      },

      "MarketArticleListEnvelope": {
        "type": "object",
        "description": "Successful market article list response.",
        "required": ["status", "totalResults", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "totalResults": { "type": "integer", "description": "Total number of articles matching the query (not just this page)." },
          "results": { "type": "array", "items": { "$ref": "#/components/schemas/MarketArticle" } },
          "nextPage": {
            "type": ["string", "null"],
            "description": "Pass this value as the `page` parameter to get the next page. `null` when there are no more results."
          }
        }
      },

      "Source": {
        "type": "object",
        "description": "A news source.",
        "required": ["id"],
        "properties": {
          "id": { "type": "string", "description": "Source id." },
          "name": { "type": ["string", "null"], "description": "Source display name." },
          "url": { "type": ["string", "null"], "format": "uri", "description": "Source website URL." },
          "icon": { "type": ["string", "null"], "format": "uri", "description": "Source icon URL." },
          "priority": { "type": ["integer", "null"], "description": "Source ranking (lower = higher-ranked)." },
          "description": { "type": ["string", "null"], "description": "Short description of the source." },
          "category": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Categories the source covers." },
          "language": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Languages the source publishes in." },
          "country": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Countries the source covers." },
          "total_article": { "type": ["integer", "null"], "description": "Number of articles collected from this source." },
          "last_fetch": { "type": ["string", "null"], "description": "When the source was last fetched, `YYYY-MM-DD HH:MM:SS`." }
        }
      },

      "SourceListEnvelope": {
        "type": "object",
        "description": "Successful source list response.",
        "required": ["status", "totalResults", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "totalResults": { "type": "integer", "description": "Number of sources returned (maximum 100)." },
          "results": { "type": "array", "items": { "$ref": "#/components/schemas/Source" } },
          "nextPage": { "type": "null", "description": "Always `null` for this endpoint." }
        }
      },

      "CountSummaryEnvelope": {
        "type": "object",
        "description": "Count response when `interval=all` (default).",
        "required": ["status", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "results": {
            "type": "object",
            "required": ["count"],
            "properties": {
              "count": { "type": "integer", "description": "Total number of articles matching the filters." }
            }
          }
        }
      },

      "CountHistogramEnvelope": {
        "type": "object",
        "description": "Count response when `interval=hour` or `interval=day`.",
        "required": ["status", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["dateTime", "count"],
              "properties": {
                "dateTime": { "type": "string", "description": "Start of the hour/day, `YYYY-MM-DD HH:MM:SS` (UTC)." },
                "count": { "type": "integer", "description": "Number of articles in that hour/day." }
              }
            }
          },
          "nextPage": {
            "type": ["string", "null"],
            "description": "Pass this value as the `page` parameter to get the next page. `null` when there are no more results."
          }
        }
      },

      "WebsocketRegisterEnvelope": {
        "type": "object",
        "description": "Successful WebSocket query registration.",
        "required": ["status", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "results": {
            "type": "object",
            "required": ["message", "registration_id"],
            "properties": {
              "message": { "type": "string", "description": "Human-readable confirmation." },
              "registration_id": { "type": "string", "description": "Identifier of the registered query (32 characters). Use it to connect to the WebSocket stream and to delete the registration." }
            }
          }
        }
      },

      "WebsocketQueryListEnvelope": {
        "type": "object",
        "description": "Your account's active WebSocket query registrations (version 2 envelope, without `next_page`).",
        "required": ["status", "total_results", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "total_results": { "type": "integer", "description": "Number of active registrations on your account." },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["registration_id", "active_clients", "last_used", "news_type", "query"],
              "properties": {
                "registration_id": { "type": "string", "description": "Identifier of the registered query (32 characters)." },
                "active_clients": { "type": "integer", "description": "Number of devices currently connected to the stream for this registration." },
                "last_used": { "type": ["string", "null"], "format": "date-time", "description": "When a client last connected to the stream for this registration, in RFC 3339 in UTC, e.g. `2026-11-20T10:15:00Z`; `null` if none has yet." },
                "news_type": { "type": "string", "description": "Type of news the registration streams; currently always `news`." },
                "query": {
                  "type": "object",
                  "description": "The query parameters the registration was created with, as name/value pairs (comma-separated filters appear as arrays).",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },

      "WebsocketDeleteEnvelope": {
        "type": "object",
        "description": "Successful WebSocket registration deletion.",
        "required": ["status", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "results": {
            "type": "object",
            "required": ["message", "registration_id"],
            "properties": {
              "message": { "type": "string", "description": "Human-readable confirmation." },
              "registration_id": { "type": "string", "description": "Identifier of the deleted registration." }
            }
          }
        }
      },

      "WebsocketConflictEnvelope": {
        "type": "object",
        "description": "Returned when an identical query is already registered on your account. `registration_id` is the id of the existing registration.",
        "required": ["status", "results"],
        "properties": {
          "status": { "type": "string", "const": "error" },
          "results": {
            "type": "object",
            "required": ["message", "code", "registration_id"],
            "properties": {
              "message": { "type": "string" },
              "code": { "$ref": "#/components/schemas/ErrorCode" },
              "registration_id": { "type": "string" }
            }
          }
        }
      },

      "WebsocketNewsMessage": {
        "type": "object",
        "description": "A message pushed over the WebSocket connection when newly collected articles match the registered query. `results` uses the same version 2 article layout as `/2/news` results, minus any fields in the registration's `exclude_field`; `published_at`/`fetched_at` follow the registration's `timezone` (UTC otherwise).",
        "required": ["status", "total_results", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "total_results": { "type": "integer", "description": "Number of articles in this message." },
          "results": { "type": "array", "items": { "$ref": "#/components/schemas/ArticleV2" } }
        }
      },

      "SentimentV2": {
        "type": "object",
        "description": "Article sentiment (version 2): the overall label and its percentage breakdown.",
        "required": ["label", "score"],
        "properties": {
          "label": {
            "description": "Overall sentiment.",
            "anyOf": [
              { "type": "string", "enum": ["positive", "neutral", "negative"] },
              { "type": "null" }
            ]
          },
          "score": {
            "description": "Sentiment percentage breakdown; the three values sum to 100.",
            "anyOf": [
              { "$ref": "#/components/schemas/SentimentStats" },
              { "type": "null" }
            ]
          }
        }
      },

      "ArticleMediaV2": {
        "type": "object",
        "description": "Media links of an article (version 2).",
        "properties": {
          "image_url": { "type": ["string", "null"], "format": "uri", "description": "Article image URL. Returned as `null` when `image=0`." },
          "video_url": { "type": ["string", "null"], "format": "uri", "description": "Article video URL. Returned as `null` when `video=0`." }
        }
      },

      "ArticleSourceV2": {
        "type": "object",
        "description": "The news source that published the article (version 2).",
        "properties": {
          "name": { "type": ["string", "null"], "description": "Source display name." },
          "url": { "type": ["string", "null"], "format": "uri", "description": "Source website URL; send it as `source_url` to filter by this source." },
          "icon_url": { "type": ["string", "null"], "format": "uri", "description": "Source icon URL." },
          "priority": { "type": ["integer", "null"], "description": "Source ranking (lower = higher-ranked)." }
        }
      },

      "ArticleAiV2": {
        "type": "object",
        "description": "AI enrichment of a news article (version 2). Fields marked as plan-specific return a short notice string instead of their value on plans that do not include them.",
        "properties": {
          "summary": {
            "type": ["string", "null"],
            "description": "AI-generated article summary. Plan-specific."
          },
          "sentiment": {
            "description": "Overall sentiment and its percentage breakdown.",
            "anyOf": [
              { "$ref": "#/components/schemas/SentimentV2" },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "tag": {
            "description": "AI-classified topic tags.",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "region": {
            "description": "AI-extracted regions, e.g. 'paris,france'. Plan-specific (Corporate).",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "organization": {
            "description": "AI-extracted organization names. Plan-specific (Corporate).",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          }
        }
      },

      "ArticleV2": {
        "type": "object",
        "description": "A news article in the version 2 layout (`/2/news` and the WebSocket stream). Fields marked as plan-specific return a short notice string instead of their value on plans that do not include them. Fields named in `exclude_field` are left out. Any field except `id` may be `null`.",
        "required": ["id"],
        "properties": {
          "id": { "type": "string", "description": "Unique article identifier (32 characters); the value the `id` parameter accepts." },
          "title": { "type": ["string", "null"], "description": "Article title." },
          "meta_description": { "type": ["string", "null"], "description": "Short article description (meta description)." },
          "content": {
            "type": ["string", "null"],
            "description": "Full article text. Plan-specific (full-content access). Returned as `null` when `content=0`."
          },
          "url": { "type": ["string", "null"], "format": "uri", "description": "Article URL." },
          "published_at": { "type": ["string", "null"], "format": "date-time", "description": "Publish date and time in RFC 3339, e.g. `2026-10-22T06:15:00Z`; with `timezone`, in that zone, e.g. `2026-10-22T11:45:00+05:30`." },
          "fetched_at": { "type": ["string", "null"], "format": "date-time", "description": "When the article was collected, in RFC 3339, in the same zone as `published_at`." },
          "datatype": { "type": "string", "description": "Content type, e.g. 'news', 'blog', 'podcast'." },
          "language": { "type": ["string", "null"], "description": "Language name, e.g. 'english'." },
          "country": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Country names, e.g. 'india'." },
          "category": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article categories." },
          "keyword": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article keywords." },
          "creator": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article author(s)." },
          "duplicate": { "type": "boolean", "description": "Whether the article is a duplicate of another article." },
          "media": { "$ref": "#/components/schemas/ArticleMediaV2" },
          "source": { "$ref": "#/components/schemas/ArticleSourceV2" },
          "ai": { "$ref": "#/components/schemas/ArticleAiV2" }
        }
      },

      "ArticleListEnvelopeV2": {
        "type": "object",
        "description": "Successful article list response (version 2).",
        "required": ["status", "total_results", "results", "next_page"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "total_results": { "type": "integer", "description": "Total number of articles matching the query (not just this page)." },
          "results": { "type": "array", "items": { "$ref": "#/components/schemas/ArticleV2" } },
          "next_page": {
            "type": ["string", "null"],
            "description": "Pass this value as the `page` parameter to get the next page. `null` when there are no more results."
          }
        }
      },

      "MarketArticleAiV2": {
        "type": "object",
        "description": "AI enrichment of a financial-market article (version 2). Fields marked as plan-specific return a short notice string instead of their value on plans that do not include them.",
        "properties": {
          "summary": {
            "type": ["string", "null"],
            "description": "AI-generated article summary. Plan-specific."
          },
          "sentiment": {
            "description": "Overall sentiment and its percentage breakdown.",
            "anyOf": [
              { "$ref": "#/components/schemas/SentimentV2" },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "tag": {
            "description": "AI-classified topic tags.",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "organization": {
            "description": "AI-extracted organization names. Plan-specific (Corporate).",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          }
        }
      },

      "MarketArticleV2": {
        "type": "object",
        "description": "A financial-market news article in the version 2 layout (`/2/market`). Fields marked as plan-specific return a short notice string instead of their value on plans that do not include them. Fields named in `exclude_field` are left out. Any field except `id` may be `null`.",
        "required": ["id"],
        "properties": {
          "id": { "type": "string", "description": "Unique article identifier (32 characters); the value the `id` parameter accepts." },
          "title": { "type": ["string", "null"], "description": "Article title." },
          "meta_description": { "type": ["string", "null"], "description": "Short article description (meta description)." },
          "content": {
            "type": ["string", "null"],
            "description": "Full article text. Plan-specific (full-content access). Returned as `null` when `content=0`."
          },
          "url": { "type": ["string", "null"], "format": "uri", "description": "Article URL." },
          "published_at": { "type": ["string", "null"], "format": "date-time", "description": "Publish date and time in RFC 3339, e.g. `2026-10-22T06:15:00Z`; with `timezone`, in that zone, e.g. `2026-10-22T11:45:00+05:30`." },
          "fetched_at": { "type": ["string", "null"], "format": "date-time", "description": "When the article was collected, in RFC 3339, in the same zone as `published_at`." },
          "datatype": { "type": "string", "description": "Content type, e.g. 'news', 'blog', 'podcast'." },
          "language": { "type": ["string", "null"], "description": "Language name, e.g. 'english'." },
          "country": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Country names, e.g. 'india'." },
          "keyword": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article keywords." },
          "creator": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article author(s)." },
          "market_id": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Market identifiers of the securities the article mentions, one per security, in the same order as `ticker`: the values the `market_id` parameter accepts." },
          "ticker": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Stock ticker symbols the article mentions, in the same order as `market_id`." },
          "duplicate": { "type": "boolean", "description": "Whether the article is a duplicate of another article." },
          "media": { "$ref": "#/components/schemas/ArticleMediaV2" },
          "source": { "$ref": "#/components/schemas/ArticleSourceV2" },
          "ai": { "$ref": "#/components/schemas/MarketArticleAiV2" }
        }
      },

      "MarketArticleListEnvelopeV2": {
        "type": "object",
        "description": "Successful market article list response (version 2).",
        "required": ["status", "total_results", "results", "next_page"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "total_results": { "type": "integer", "description": "Total number of articles matching the query (not just this page)." },
          "results": { "type": "array", "items": { "$ref": "#/components/schemas/MarketArticleV2" } },
          "next_page": {
            "type": ["string", "null"],
            "description": "Pass this value as the `page` parameter to get the next page. `null` when there are no more results."
          }
        }
      },

      "CryptoArticleAiV2": {
        "type": "object",
        "description": "AI enrichment of a cryptocurrency article (version 2).",
        "properties": {
          "sentiment": {
            "description": "Overall sentiment and its percentage breakdown.",
            "anyOf": [
              { "$ref": "#/components/schemas/SentimentV2" },
              { "type": "string" },
              { "type": "null" }
            ]
          },
          "tag": {
            "description": "AI-classified topic tags (crypto-specific tag set).",
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "string" },
              { "type": "null" }
            ]
          }
        }
      },

      "CryptoArticleV2": {
        "type": "object",
        "description": "A cryptocurrency news article in the version 2 layout (`/2/crypto`). Fields marked as plan-specific return a short notice string instead of their value on plans that do not include them. Fields named in `exclude_field` are left out. Any field except `id` may be `null`.",
        "required": ["id"],
        "properties": {
          "id": { "type": "string", "description": "Unique article identifier (32 characters); the value the `id` parameter accepts." },
          "title": { "type": ["string", "null"], "description": "Article title." },
          "meta_description": { "type": ["string", "null"], "description": "Short article description (meta description)." },
          "content": {
            "type": ["string", "null"],
            "description": "Full article text. Plan-specific (full-content access). Returned as `null` when `content=0`."
          },
          "url": { "type": ["string", "null"], "format": "uri", "description": "Article URL." },
          "published_at": { "type": ["string", "null"], "format": "date-time", "description": "Publish date and time in RFC 3339, e.g. `2026-10-22T06:15:00Z`; with `timezone`, in that zone, e.g. `2026-10-22T11:45:00+05:30`." },
          "fetched_at": { "type": ["string", "null"], "format": "date-time", "description": "When the article was collected, in RFC 3339, in the same zone as `published_at`." },
          "language": { "type": ["string", "null"], "description": "Language name, e.g. 'english'." },
          "keyword": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article keywords." },
          "creator": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Article author(s)." },
          "coin": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Cryptocurrencies the article mentions, by ticker symbol (e.g. 'BTC')." },
          "duplicate": { "type": "boolean", "description": "Whether the article is a duplicate of another article." },
          "media": { "$ref": "#/components/schemas/ArticleMediaV2" },
          "source": { "$ref": "#/components/schemas/ArticleSourceV2" },
          "ai": { "$ref": "#/components/schemas/CryptoArticleAiV2" }
        }
      },

      "CryptoArticleListEnvelopeV2": {
        "type": "object",
        "description": "Successful crypto article list response (version 2).",
        "required": ["status", "total_results", "results", "next_page"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "total_results": { "type": "integer", "description": "Total number of articles matching the query (not just this page)." },
          "results": { "type": "array", "items": { "$ref": "#/components/schemas/CryptoArticleV2" } },
          "next_page": {
            "type": ["string", "null"],
            "description": "Pass this value as the `page` parameter to get the next page. `null` when there are no more results."
          }
        }
      },

      "CountEnvelopeV2": {
        "type": "object",
        "description": "Count response (version 2): the total over the whole date range plus one entry per `interval` bucket on this page.",
        "required": ["status", "total_results", "results", "next_page"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "total_results": { "type": "integer", "description": "Number of articles matching the filters over the whole `from_date` to `to_date` range; the same on every page." },
          "results": {
            "type": "array",
            "description": "One entry per bucket on this page, in the order set by `sort`; buckets without articles are included with `count` 0.",
            "items": {
              "type": "object",
              "required": ["date_time", "count"],
              "properties": {
                "date_time": { "type": "string", "format": "date-time", "description": "Start of the bucket in RFC 3339 UTC (the first of the month, midnight or the full hour), e.g. `2026-10-01T00:00:00Z`." },
                "count": { "type": "integer", "description": "Number of matching articles published in the bucket." }
              }
            }
          },
          "next_page": {
            "type": ["string", "null"],
            "description": "Pass this value as the `page` parameter to get the next buckets. `null` when there are no more."
          }
        }
      },

      "CodeNameV2": {
        "type": "object",
        "description": "A country or language: its code and its name.",
        "required": ["code", "name"],
        "properties": {
          "code": { "type": "string", "description": "ISO 3166-1 alpha-2 country code or ISO 639-1 language code, e.g. 'in', 'en'." },
          "name": { "type": "string", "description": "Country or language name, e.g. 'india', 'english'." }
        }
      },

      "SourceV2": {
        "type": "object",
        "description": "A news source (version 2). Its first four fields match an article's `source` object.",
        "properties": {
          "name": { "type": ["string", "null"], "description": "Source display name." },
          "url": { "type": ["string", "null"], "format": "uri", "description": "Source website URL; send it as `source_url` to filter by this source." },
          "icon_url": { "type": ["string", "null"], "format": "uri", "description": "Source icon URL." },
          "priority": { "type": ["integer", "null"], "description": "Source ranking (lower = higher-ranked)." },
          "description": { "type": ["string", "null"], "description": "Short description of the source." },
          "language": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/CodeNameV2" }, "description": "Languages the source publishes in." },
          "country": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/CodeNameV2" }, "description": "Countries the source covers." },
          "category": { "type": ["array", "null"], "items": { "type": "string" }, "description": "Categories the source covers, e.g. 'business'." },
          "stat": {
            "type": "object",
            "description": "Source statistics.",
            "properties": {
              "article_count": { "type": ["integer", "null"], "description": "Number of articles collected from this source." },
              "last_fetched_at": { "type": ["string", "null"], "format": "date-time", "description": "When the source was last fetched, in RFC 3339 UTC, e.g. `2026-10-22T06:10:00Z`." }
            }
          }
        }
      },

      "SourceListEnvelopeV2": {
        "type": "object",
        "description": "Successful source list response (version 2). It has no `next_page`: sources are not paginated.",
        "required": ["status", "total_results", "results"],
        "properties": {
          "status": { "type": "string", "const": "success" },
          "total_results": { "type": "integer", "description": "Number of sources returned (maximum 100)." },
          "results": { "type": "array", "items": { "$ref": "#/components/schemas/SourceV2" } }
        }
      }
    },

    "examples": {
      "ArticleListExample": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "totalResults": "integer",
          "results": [
            {
              "article_id": "string",
              "link": "string (URL)",
              "title": "string",
              "description": "string",
              "content": "string",
              "keywords": ["string"],
              "creator": ["string"],
              "language": "string",
              "country": ["string"],
              "category": ["string"],
              "datatype": "string",
              "pubDate": "string (YYYY-MM-DD HH:MM:SS)",
              "pubDateTZ": "string (timezone name)",
              "fetched_at": "string (YYYY-MM-DD HH:MM:SS)",
              "image_url": "string (URL)",
              "video_url": "string (URL)",
              "source_id": "string",
              "source_name": "string",
              "source_priority": "integer",
              "source_url": "string (URL)",
              "source_icon": "string (URL)",
              "sentiment": "string (positive | neutral | negative)",
              "sentiment_stats": { "negative": "number", "neutral": "number", "positive": "number" },
              "ai_tag": ["string"],
              "ai_region": ["string"],
              "ai_org": ["string"],
              "ai_summary": "string",
              "duplicate": "boolean"
            }
          ],
          "nextPage": "string | null"
        }
      },
      "CryptoArticleListExample": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "totalResults": "integer",
          "results": [
            {
              "article_id": "string",
              "link": "string (URL)",
              "title": "string",
              "description": "string",
              "content": "string",
              "keywords": ["string"],
              "creator": ["string"],
              "coin": ["string"],
              "language": "string",
              "pubDate": "string (YYYY-MM-DD HH:MM:SS)",
              "pubDateTZ": "string (timezone name)",
              "fetched_at": "string (YYYY-MM-DD HH:MM:SS)",
              "image_url": "string (URL)",
              "video_url": "string (URL)",
              "source_id": "string",
              "source_name": "string",
              "source_priority": "integer",
              "source_url": "string (URL)",
              "source_icon": "string (URL)",
              "sentiment": "string (positive | neutral | negative)",
              "sentiment_stats": { "negative": "number", "neutral": "number", "positive": "number" },
              "ai_tag": ["string"],
              "duplicate": "boolean"
            }
          ],
          "nextPage": "string | null"
        }
      },
      "MarketArticleListExample": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "totalResults": "integer",
          "results": [
            {
              "article_id": "string",
              "link": "string (URL)",
              "title": "string",
              "description": "string",
              "content": "string",
              "keywords": ["string"],
              "creator": ["string"],
              "symbol": ["string"],
              "market_id": ["string"],
              "language": "string",
              "country": ["string"],
              "datatype": "string",
              "pubDate": "string (YYYY-MM-DD HH:MM:SS)",
              "pubDateTZ": "string (timezone name)",
              "fetched_at": "string (YYYY-MM-DD HH:MM:SS)",
              "image_url": "string (URL)",
              "video_url": "string (URL)",
              "source_id": "string",
              "source_name": "string",
              "source_priority": "integer",
              "source_url": "string (URL)",
              "source_icon": "string (URL)",
              "sentiment": "string (positive | neutral | negative)",
              "sentiment_stats": { "negative": "number", "neutral": "number", "positive": "number" },
              "ai_tag": ["string"],
              "ai_org": ["string"],
              "ai_summary": "string",
              "duplicate": "boolean"
            }
          ],
          "nextPage": "string | null"
        }
      },
      "SourceListExample": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "totalResults": "integer",
          "results": [
            {
              "id": "string",
              "name": "string",
              "url": "string (URL)",
              "icon": "string (URL)",
              "priority": "integer",
              "description": "string",
              "category": ["string"],
              "language": ["string"],
              "country": ["string"],
              "total_article": "integer",
              "last_fetch": "string (YYYY-MM-DD HH:MM:SS)"
            }
          ],
          "nextPage": null
        }
      },
      "CountSummaryExample": {
        "summary": "Response shape with interval=all (field names and data types)",
        "value": {
          "status": "success",
          "results": { "count": "integer" }
        }
      },
      "CountHistogramExample": {
        "summary": "Response shape with interval=hour or day (field names and data types)",
        "value": {
          "status": "success",
          "results": [
            { "dateTime": "string (YYYY-MM-DD HH:MM:SS)", "count": "integer" }
          ],
          "nextPage": "string | null"
        }
      },
      "WebsocketRegisterExample": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "results": {
            "message": "string",
            "registration_id": "string (32 characters)"
          }
        }
      },
      "WebsocketQueryListExample": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "total_results": "integer",
          "results": [
            {
              "registration_id": "string (32 characters)",
              "active_clients": "integer",
              "last_used": "string (RFC 3339 in UTC, e.g. 2026-11-20T10:15:00Z) | null",
              "news_type": "string",
              "query": { "q": "string", "country": ["string"] }
            }
          ]
        }
      },
      "WebsocketDeleteExample": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "results": {
            "message": "string",
            "registration_id": "string (32 characters)"
          }
        }
      },
      "WebsocketNewsMessageExample": {
        "summary": "Pushed message shape (field names and data types)",
        "value": {
          "status": "success",
          "total_results": "integer",
          "results": [
            {
              "id": "string",
              "title": "string",
              "meta_description": "string",
              "content": "string",
              "url": "string (URL)",
              "published_at": "string (RFC 3339, e.g. 2026-10-22T06:15:00Z)",
              "fetched_at": "string (RFC 3339)",
              "datatype": "string",
              "language": "string",
              "country": ["string"],
              "category": ["string"],
              "keyword": ["string"],
              "creator": ["string"],
              "duplicate": "boolean",
              "media": { "image_url": "string (URL)", "video_url": "string (URL)" },
              "source": { "name": "string", "url": "string (URL)", "icon_url": "string (URL)", "priority": "integer" },
              "ai": {
                "summary": "string",
                "sentiment": {
                  "label": "string (positive | neutral | negative)",
                  "score": { "negative": "number", "neutral": "number", "positive": "number" }
                },
                "tag": ["string"],
                "region": ["string"],
                "organization": ["string"]
              }
            }
          ]
        }
      },
      "ArticleListExampleV2": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "total_results": "integer",
          "results": [
            {
              "id": "string",
              "title": "string",
              "meta_description": "string",
              "content": "string",
              "url": "string (URL)",
              "published_at": "string (RFC 3339, e.g. 2026-10-22T06:15:00Z)",
              "fetched_at": "string (RFC 3339)",
              "datatype": "string",
              "language": "string",
              "country": ["string"],
              "category": ["string"],
              "keyword": ["string"],
              "creator": ["string"],
              "duplicate": "boolean",
              "media": { "image_url": "string (URL)", "video_url": "string (URL)" },
              "source": { "name": "string", "url": "string (URL)", "icon_url": "string (URL)", "priority": "integer" },
              "ai": {
                "summary": "string",
                "sentiment": {
                  "label": "string (positive | neutral | negative)",
                  "score": { "negative": "number", "neutral": "number", "positive": "number" }
                },
                "tag": ["string"],
                "region": ["string"],
                "organization": ["string"]
              }
            }
          ],
          "next_page": "string | null"
        }
      },
      "MarketArticleListExampleV2": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "total_results": "integer",
          "results": [
            {
              "id": "string",
              "title": "string",
              "meta_description": "string",
              "content": "string",
              "url": "string (URL)",
              "published_at": "string (RFC 3339, e.g. 2026-10-22T06:15:00Z)",
              "fetched_at": "string (RFC 3339)",
              "datatype": "string",
              "language": "string",
              "country": ["string"],
              "keyword": ["string"],
              "creator": ["string"],
              "market_id": ["string"],
              "ticker": ["string"],
              "duplicate": "boolean",
              "media": { "image_url": "string (URL)", "video_url": "string (URL)" },
              "source": { "name": "string", "url": "string (URL)", "icon_url": "string (URL)", "priority": "integer" },
              "ai": {
                "summary": "string",
                "sentiment": {
                  "label": "string (positive | neutral | negative)",
                  "score": { "negative": "number", "neutral": "number", "positive": "number" }
                },
                "tag": ["string"],
                "organization": ["string"]
              }
            }
          ],
          "next_page": "string | null"
        }
      },
      "CryptoArticleListExampleV2": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "total_results": "integer",
          "results": [
            {
              "id": "string",
              "title": "string",
              "meta_description": "string",
              "content": "string",
              "url": "string (URL)",
              "published_at": "string (RFC 3339, e.g. 2026-10-22T06:15:00Z)",
              "fetched_at": "string (RFC 3339)",
              "language": "string",
              "keyword": ["string"],
              "creator": ["string"],
              "coin": ["string"],
              "duplicate": "boolean",
              "media": { "image_url": "string (URL)", "video_url": "string (URL)" },
              "source": { "name": "string", "url": "string (URL)", "icon_url": "string (URL)", "priority": "integer" },
              "ai": {
                "sentiment": {
                  "label": "string (positive | neutral | negative)",
                  "score": { "negative": "number", "neutral": "number", "positive": "number" }
                },
                "tag": ["string"]
              }
            }
          ],
          "next_page": "string | null"
        }
      },
      "CountExampleV2": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "total_results": "integer",
          "results": [
            { "date_time": "string (RFC 3339 UTC, e.g. 2026-10-01T00:00:00Z)", "count": "integer" }
          ],
          "next_page": "string | null"
        }
      },
      "SourceListExampleV2": {
        "summary": "Response shape (field names and data types)",
        "value": {
          "status": "success",
          "total_results": "integer",
          "results": [
            {
              "name": "string",
              "url": "string (URL)",
              "icon_url": "string (URL)",
              "priority": "integer",
              "description": "string",
              "language": [ { "code": "string", "name": "string" } ],
              "country": [ { "code": "string", "name": "string" } ],
              "category": ["string"],
              "stat": { "article_count": "integer", "last_fetched_at": "string (RFC 3339 UTC)" }
            }
          ]
        }
      }
    },

    "responses": {
      "BadRequest": {
        "description": "Invalid request — e.g. a required parameter is missing or the search query is malformed.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }
      },
      "Unauthorized": {
        "description": "Missing or invalid API key.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }
      },
      "Forbidden": {
        "description": "Your plan does not include access to this endpoint, parameter or date range, or the request's IP address or origin domain is not allowed for this API key.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }
      },
      "UnprocessableEntity": {
        "description": "A parameter or its value is not supported — e.g. a parameter the endpoint does not accept, an unknown value, too many values, an invalid date, or two parameters that cannot be used together.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }
      },
      "TooManyRequests": {
        "description": "Too many requests in a short period, rate limit exceeded, API credits exhausted, the API key's own credit limit reached, or the maximum number of WebSocket registrations reached.",
        "headers": {
          "Retry-After": { "$ref": "#/components/headers/RetryAfter" }
        },
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }
      },
      "ServerError": {
        "description": "Unexpected server error. Please try again later.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }
      },
      "ServiceUnavailable": {
        "description": "The endpoint is temporarily unavailable due to maintenance.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }
      },
      "Conflict": {
        "description": "An identical query is already registered on your account. `results.registration_id` carries the id of the existing registration.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebsocketConflictEnvelope" } } }
      },
      "NotFound": {
        "description": "The requested resource does not exist — e.g. the `registration_id` is not registered on your account.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }
      }
    }
  }
}
