TrendPulse API

A small JSON API for IT news and trends

← Dashboard OpenAPI JSON ↗
REST · JSON · read-only

News data, ready to use.

Fetch current stories or search the archive with a plain HTTP GET request. The browse endpoint is public; no API key is needed for read access.

GET/api/newsTry it ↗
01

Make your first request

Use the server address where TrendPulse is running.

Terminal
curl --get 'http://localhost:4000/api/news' --data-urlencode 'limit=5' --data-urlencode 'sort=new'

This returns a JSON object containing items, a result total, pagination details, and aggregate stats.

FILTER

Shape the results

Combine query parameters to find stories relevant to your application.

q
Full-text search for title and summary
theme
Theme id, such as ai or sec
days
Limit by age in days
sort
new, heat, rating, likes, score
limit
Page size (up to 100)
offset
Skip results for pagination
EXAMPLE

Search AI stories

Filter to AI-related articles from the last week and sort by trend heat.

Terminal
curl --get 'http://localhost:4000/api/news' --data-urlencode 'q=language model' --data-urlencode 'theme=ai' --data-urlencode 'days=7' --data-urlencode 'sort=heat' --data-urlencode 'limit=10'
02

Understand the response

Each story is a consistent JSON object; fields may be null when a source does not provide them.

titleHeadline text
urlOriginal story URL
summaryStory description or excerpt
publishedAtPublish time in epoch milliseconds
primaryThemeClassified theme id
heatTrend score based on recency and engagement
score / commentsSource engagement counts
review / llmRatingAI review, when available
Example response (shortened)
{
  "items": [
    {
      "id": "…",
      "title": "A new development in AI",
      "url": "https://example.com/story",
      "sourceId": "hn-ai",
      "summary": "A short story excerpt…",
      "publishedAt": 1793059200000,
      "primaryTheme": "ai",
      "heat": 84.2,
      "score": 120,
      "comments": 34,
      "review": null
    }
  ],
  "total": 123,
  "limit": 1,
  "offset": 0,
  "stats": { "…": "aggregate values" }
}