REST API

The KITE 2.0 REST API provides programmatic access to aggregated financial news from 38+ sources. All endpoints return JSON and require authentication via an API key.

Base URL

https://kite-api.gtdigital.dev

Authentication

All API requests require a valid API key. To get a key, create an account and generate one from your Account → API Keys page.

Include your key in the X-API-Key header with every request:

bash
curl -H "X-API-Key: kite_your_key_here" https://kite-api.gtdigital.dev/api/news
javascript
const response = await fetch('https://kite-api.gtdigital.dev/api/news', {
  headers: { 'X-API-Key': 'kite_your_key_here' }
});

Requests without a valid key receive a 401 Unauthorized response:

json
{
  "error": "Missing API key. Include an X-API-Key header."
}

Endpoints Overview

MethodEndpointDescription
GET/api/newsFetch news items with filtering and pagination
GET/api/news/:idFetch a single news item by ID
GET/api/sourcesList all available news sources
GET/api/categoriesList all available news categories

Endpoints

GET /api/news

Fetch news items with optional server-side filtering, keyword matching, and pagination. Combines all filter parameters with AND logic.

Query Parameters

ParameterTypeDefaultDescription
sourcestring--Comma-separated source names to filter by (e.g. "BBC News,CNBC")
categorystring--Comma-separated categories: financial_news, central_banks, regulators
keywordsstring--Comma-separated keywords to match against title, description, tickers, and tags
searchstring--Free-text search across title, source, description, author, tickers, and tags
tickersstring--Comma-separated ticker symbols to filter by (e.g. "AAPL,BTC")
companiesstring--Comma-separated company names to match against title and description (e.g. "Apple,Tesla")
fromISO 8601--Filter items published on or after this date
toISO 8601--Filter items published on or before this date
pageinteger1Page number for pagination
perPageinteger50Items per page (max 200)
sortstring-publishedSort field. Prefix with - for descending (e.g. "-created", "source")

Example Request

javascript
// Fetch the latest 20 Bitcoin-related news from financial sources
const response = await fetch(
  'https://kite-api.gtdigital.dev/api/news?category=financial_news&keywords=Bitcoin&perPage=20',
  { headers: { 'X-API-Key': 'kite_your_key_here' } }
);
const data = await response.json();

console.log(data.items);       // Array of NewsItem objects
console.log(data.totalItems);  // Total matching items
console.log(data.totalPages);  // Total pages available
bash
# Fetch news from BBC and CNBC, published after Jan 1 2025
curl -H "X-API-Key: kite_your_key_here" \
  "https://kite-api.gtdigital.dev/api/news?source=BBC%20News,CNBC&from=2025-01-01T00:00:00Z"

# Search for Federal Reserve mentions across all fields
curl -H "X-API-Key: kite_your_key_here" \
  "https://kite-api.gtdigital.dev/api/news?search=federal%20reserve&perPage=10"

# Filter by specific ticker symbols
curl -H "X-API-Key: kite_your_key_here" \
  "https://kite-api.gtdigital.dev/api/news?tickers=AAPL,TSLA&sort=-published"

Response

json
{
  "items": [
    {
      "id": "abc123xyz",
      "title": "Fed Holds Rates Steady Amid Inflation Concerns",
      "url": "https://example.com/article",
      "description": "The Federal Reserve held interest rates...",
      "published": "2025-05-01T14:00:00.000Z",
      "source": "BBC News",
      "category": "central_banks",
      "guid": "https://example.com/article-guid",
      "author": "Jane Smith",
      "tags": ["federal reserve", "interest rates"],
      "tickers": ["SPY"],
      "article_type": "news",
      "image_url": "https://example.com/image.jpg",
      "speaker": "",
      "speaker_title": "",
      "institution": "",
      "event_location": "",
      "base_currency": "",
      "target_currency": "",
      "exchange_rate": "",
      "created": "2025-05-01T14:05:00.000Z",
      "updated": "2025-05-01T14:05:00.000Z"
    }
  ],
  "page": 1,
  "perPage": 50,
  "totalItems": 1234,
  "totalPages": 25
}
GET /api/news/:id

Fetch a single news item by its unique record ID.

Path Parameters

ParameterTypeDefaultDescription
idstring--The unique PocketBase record ID

Example Request

javascript
const response = await fetch('https://kite-api.gtdigital.dev/api/news/abc123xyz', {
  headers: { 'X-API-Key': 'kite_your_key_here' }
});
const data = await response.json();
console.log(data.item.title);

Error Response (404)

json
{
  "error": "News item not found"
}
GET /api/sources

List all available feed sources with their category. Useful for building dynamic filter UIs.

Example Request

javascript
const response = await fetch('https://kite-api.gtdigital.dev/api/sources', {
  headers: { 'X-API-Key': 'kite_your_key_here' }
});
const data = await response.json();

// Group sources by category
const grouped = Object.groupBy(data.sources, s => s.category);
console.log(grouped);

Response

json
{
  "sources": [
    { "name": "BBC News", "category": "financial_news" },
    { "name": "Bloomberg Markets", "category": "financial_news" },
    { "name": "CoinDesk", "category": "financial_news" },
    { "name": "Fed - All Press", "category": "central_banks" },
    { "name": "Bank of England - News", "category": "central_banks" },
    { "name": "FCA", "category": "regulators" }
  ]
}
GET /api/categories

List all available news categories with their human-readable labels.

Example Request

bash
curl -H "X-API-Key: kite_your_key_here" https://kite-api.gtdigital.dev/api/categories

Response

json
{
  "categories": [
    { "id": "financial_news", "label": "Financial News" },
    { "id": "central_banks", "label": "Central Banks" },
    { "id": "regulators", "label": "Regulators" }
  ]
}

NewsItem Schema

Every news item returned by the API contains the following fields. Fields may be empty strings or empty arrays when not applicable to a particular source.

ParameterTypeDefaultDescription
idstring--Unique record ID
titlestring--Article headline
urlstring--Link to the original article
descriptionstring--Short summary or snippet
publishedISO 8601--Article publication date
sourcestring--Feed source name (e.g. "Bloomberg Markets")
categorystring--One of: financial_news, central_banks, regulators
guidstring--Unique identifier from the RSS feed
authorstring--Author name(s)
tagsstring[]--Array of category/tag strings from the feed
tickersstring[]--Extracted stock/crypto ticker symbols
article_typestring--Feed-specific article type
image_urlstring--Thumbnail or featured image URL
speakerstring--Speaker name (central bank speeches)
speaker_titlestring--Speaker job title
institutionstring--Institution abbreviation (e.g. "RBA", "Fed")
event_locationstring--Venue for speeches/events
base_currencystring--Base currency code (exchange rates)
target_currencystring--Target currency code (exchange rates)
exchange_ratestring--Numeric exchange rate value
createdISO 8601--Record creation timestamp
updatedISO 8601--Record last update timestamp

Error Handling

All error responses follow a consistent format:

json
{
  "error": "Description of what went wrong"
}

Status Codes

CodeMeaning
200Success
400Bad request (invalid parameters)
401Unauthorized (missing or invalid API key)
404Resource not found
500Internal server error

Rate Limiting

There are currently no rate limits enforced. Please be respectful with request frequency. For real-time updates, use the WebSocket API instead of polling.