Response Structure
The REST API returns news data in a paginated format with the following structure:Top-Level Fields
items
(array)Array of news article objects
nextCursor
(string, nullable)Pagination cursor for the next page. Only present when
hasMore
is true
hasMore
(boolean)Whether additional pages are available
Example API Calls
Get Recent News Articles
Get the latest 5 articles to see the data format:Get High-Quality Articles Only
Filter for articles with importance score 7+ to see richer data:Test Pagination
Get first page, then use cursor for next page:News Article Structure
Each article in theitems
array follows this structure based on the official API:
Field Descriptions
Core Identifiers
_id
(string, required)Unique article identifier. Use this for deduplication and referencing.
title
(string, required)Primary article headline, usually in English
koTitle
(string, optional)Korean translation of the title
Content & Source
url
(string, required)Link to the original article on byul.ai
source
(string, required)News source identifier. Always returns
"byul.ai"
content
(string, optional)Full or summarized article content when available. This field may be omitted for some news items.
koContent
(string, optional)Korean content or summary when available. This field may be omitted for some news items.
Timestamps
date
(string, required)Article publication date in ISO 8601 format (UTC)
timestamp
(integer, required)Unix timestamp of the article date
You can filter by date range using
startDate
and/or endDate
query parameters. Both must be ISO 8601 UTC timestamps. When both are provided, startDate
must be less than or equal to endDate
.Market Data
importanceScore
(integer, required)Market importance score from 0-10, where:
- 0-3: Low impact
- 4-6: Medium impact
- 7-8: High impact
- 9-10: Breaking news / Major market events
category
(string, required)News category classification:
"earnings"
- Earnings reports and financial results"fed"
- Federal Reserve and central bank news"global"
- General economic and market news"crypto"
- Cryptocurrency and blockchain news"markets"
- Stock market and trading news
symbols
(array of strings, optional)Related stock symbols. May be empty array
[]
for general news.
sentiment
(string, optional)Sentiment analysis result:
"positive"
- Bullish/positive market impact"negative"
- Bearish/negative market impact"neutral"
- No clear directional impact
Data Types and Validation
Field Types
Field | Type | Required | Format | Validation |
---|---|---|---|---|
_id | string | Yes | MongoDB ObjectId | 24 hex characters |
title | string | Yes | Text | Max 500 characters |
koTitle | string | No | Text | Max 500 characters |
content | string | No | Text | May be omitted; when present, contains article content/summary |
koContent | string | No | Text | May be omitted; Korean content/summary when available |
url | string | Yes | URL | Valid HTTPS URL |
date | string | Yes | ISO 8601 | UTC timezone |
source | string | Yes | Text | Always “byul.ai” |
timestamp | integer | Yes | Unix timestamp | Positive integer |
importanceScore | integer | Yes | Number | 0-10 range |
category | string | Yes | Enum | See categories above |
symbols | array | No | String array | Stock symbols |
sentiment | string | No | Enum | positive/negative/neutral |
Example Validation
Working with the Data
Extracting Key Information
Filtering High-Impact News
Grouping by Category
Symbol-Specific News
Pagination Handling
Data Consistency
The news article structure is identical between REST API and WebSocket responses, ensuring consistent data handling across both interfaces. Key consistency points:- Field names and types are identical
importanceScore
is always an integer (0-10)sentiment
is always a string enum- Timestamp formats are consistent (ISO 8601 for dates, Unix for timestamp)
- Symbol arrays use same format