Search News#

Full-text news search with filters. Supports keyword-based search across article titles and content.

Request Path#

GET
https://web3.okx.com/api/v6/dex/market/social/news/search

Request Parameters#

ParameterTypeRequiredDescription
keywordstringYesFull-text search keyword, supports token names, project names, and free-form text. Case-insensitive.
sortBystringNoSort order: 1=latest (descending by publish time), 2=hot (descending by popularity). Default 1.
sentimentstringNoSocialSentimentEnum code to filter by sentiment: 1=bullish, 2=bearish, 3=neutral. Omit to return all sentiments.
importancestringNoSocialImportanceEnum code to filter by article importance: 1=high, 2=medium, 3=low. Omit to return all importance levels.
platformstringNoNews source domain, e.g. coindesk.com. Retrieve the full list via GET /social/news/platforms. Omit to return data from all sources.
tokenSymbolsstringNoComma-separated list of token symbols, e.g. BTC,ETH. Case-insensitive. Omit to search across all tokens. Maximum 20 symbols.
beginstringNoQuery start timestamp (milliseconds). Defaults to current time − 72 hours; maximum lookback of 180 days.
endstringNoQuery end timestamp (milliseconds). Defaults to current time (now).
detailLevelstringNoResponse detail level: 1=summary (title + summary only), 2=full (also returns full article content). Default 1.
limitstringNoNumber of results per page, range [1, 50], default 10.
cursorstringNoPagination cursor. Omit on first request; pass the cursor from the previous response to fetch the next page. A null cursor indicates no more data.
languagestringNoResponse language in BCP-47 format, e.g. en_US, zh_CN. Default en_US.

Response Parameters#

FieldTypeDescription
cursorstringNext-page cursor; null indicates no more data
articlesarrayList of news articles matching the search
>idstringUnique article ID, can be used as the id parameter of GET /social/news/detail
>titlestringArticle title
>summarystringArticle summary
>contentstringFull article content; only returned when detailLevel=2
>sourceUrlstringOriginal article URL
>sourcestringFirst platform domain of the news source, e.g. coindesk.com
>timestampstringArticle publish time, Unix millisecond timestamp
>tokenSymbolsarrayList of token symbols mentioned in the article
>importancestringArticle importance level: high, medium, or low
>tokenSymbolSentimentsarrayPer-token sentiment analysis for this article
>>sentimentstringSentiment label: bullish / bearish / neutral
>>tokenSymbolstringToken symbol

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/dex/market/social/news/search?keyword=ethereum&sortBy=1&limit=10&detailLevel=1&language=en_US' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'

Response Example#

json
{
    "code": "0",
    "msg": "",
    "data": {
        "cursor": "eyJsYXN0SWQiOiIxNzM4MDAwMDAwMDAzIn0",
        "articles": [
            {
                "id": "NEWS_20241018_020",
                "title": "Ethereum Foundation Announces New Developer Grants Program",
                "summary": "The Ethereum Foundation has launched a new round of developer grants targeting infrastructure and tooling improvements.",
                "content": "",
                "sourceUrl": "https://decrypt.co/ethereum-foundation-grants",
                "source": "decrypt.co",
                "timestamp": "1697631000000",
                "tokenSymbols": ["ETH"],
                "importance": "medium",
                "tokenSymbolSentiments": [
                    {
                        "tokenSymbol": "ETH",
                        "sentiment": "bullish"
                    }
                ]
            },
            {
                "id": "NEWS_20241018_021",
                "title": "Ethereum Staking Deposits Exceed 30 Million ETH",
                "summary": "The total amount of ETH staked on the Beacon Chain has surpassed 30 million, representing over 25% of the total supply.",
                "content": "",
                "sourceUrl": "https://coindesk.com/tech/2024/10/18/ethereum-staking",
                "source": "coindesk.com",
                "timestamp": "1697620000000",
                "tokenSymbols": ["ETH"],
                "importance": "high",
                "tokenSymbolSentiments": [
                    {
                        "tokenSymbol": "ETH",
                        "sentiment": "bullish"
                    }
                ]
            }
        ]
    }
}