---
title: "Get News"
method: GET
path: "/api/news"
tags: ["news"]
---

# Get News

`GET /api/news`

## Request

- Base URL: `https://api.halalterminal.com`
- URL: `https://api.halalterminal.com/api/news`
- Auth: API key in header `X-API-Key`

Retrieve a paginated list of Islamic finance and market news articles.

Returns news articles from all configured sources, optionally filtered by
source, category, or free-text search query. Results are sorted by
publication date (most recent first) and include sentiment scores.

**curl example:**
```bash
curl -X GET "http://localhost:8000/api/news?category=islamic_finance&page=1&page_size=10"
```

**Python requests example:**
```python
import requests

resp = requests.get(
    "http://localhost:8000/api/news",
    params={"category": "islamic_finance", "page": 1, "page_size": 10},
)
data = resp.json()
for article in data["articles"]:
    print(article["title"], article["sentiment"])
```

## Query parameters

- `source` string, nullable: Filter by news source name.
- `category` string, nullable: Filter by article category.
- `q` string, nullable: Free-text search query.
- `page` integer: Page number, 1-indexed.
- `page_size` integer: Number of articles per page.

## Response `200`

Paginated list of news articles matching the filters

- NewsListResponse: Paginated list of news articles.
  - `count` integer, required: Number of articles in the current page
  - `page` integer, required: Current page number (1-indexed)
  - `page_size` integer, required: Maximum number of articles per page
  - `total` integer, required: Total number of articles matching the query
  - `articles` NewsArticleResponse[], required: List of news articles for this page
    - `title` string, required: Headline of the news article
    - `link` string, required: URL to the full article
    - `summary` string, nullable: Brief summary or excerpt of the article content
    - `published` string, nullable: ISO 8601 publication timestamp
    - `source_id` string, required: Unique identifier for the news source
    - `source_name` string, required: Human-readable name of the news source
    - `category` string, nullable: Topic category, e.g. 'islamic_finance', 'market', 'regulation'
    - `thumbnail_url` string, nullable: URL to a thumbnail image for the article
    - `sentiment` string, nullable: Sentiment label: 'positive', 'negative', or 'neutral'
    - `sentiment_score` number, nullable: Numerical sentiment score from -1.0 to 1.0
    - `relevance_score` number, nullable: Relevance score from 0.0 to 1.0 indicating how closely the article matches the query
    - `freshness_score` number, nullable: Freshness score from 0.0 to 1.0 based on recency of publication
    - `compliance_relevance` string, nullable: Whether the article describes a corporate event likely to move the Shariah verdict (debt issuance, M&A, dividend policy, distress). One of 'high' / 'medium' / 'low'. Per-article tag, set even when the request omits the compliance_relevance filter.
    - `compliance_categories` string[], nullable: Specific verdict-moving event categories detected: 'debt_issuance', 'm_and_a', 'dividend_change', 'equity_action', 'distress'. Empty when nothing was detected.
    - `compliance_score` integer, nullable: Raw compliance-relevance score (0+); higher = more verdict-moving signals matched

## Other responses

- `401`: Authentication required
- `404`: Resource not found
- `422`: Validation Error
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/halalterminal/apis/halal-terminal-api.md) · [All operations](https://skmtc.dev/halalterminal/apis/halal-terminal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/halalterminal/apis/halal-terminal-api/revisions/78768b250943?raw)
