Back to Home
Get Started View Full Docs
Clean JSON Responses
Simple, consistent JSON structure. No unnecessary data, just the information you need.
Overview
Every NewsMesh API response follows a consistent, predictable structure. We've designed our responses to be easy to parse and integrate into any application, with no surprises or unnecessary complexity.
All responses are UTF-8 encoded JSON with consistent field names, types, and error formats across all endpoints.
Article Object
Every article in our API includes these fields:
{ "article_id": "4d5a309dfceb13e6fdb34fd1410fe22e", "title": "Article Headline Here", "description": "Brief summary of the article content...", "link": "https://source.com/original-article", "media_url": "https://source.com/featured-image.jpg", "published_date": "2025-12-24T10:30:00+00:00", "source": "News Source Name", "category": "technology", "topics": ["topic1", "topic2", "topic3"], "people": ["Person Name", "Another Person"], "author": ["Author Name"] }
Field Reference
| Field | Type | Description |
|---|---|---|
article_id | string | Unique identifier (32-char hex) |
title | string | Article headline |
description | string | Brief summary or excerpt |
link | string | URL to original article |
media_url | string | null | Featured image URL (if available) |
published_date | string | ISO 8601 timestamp with timezone |
source | string | News outlet name |
category | string | Primary category |
topics | array | Related topic tags |
people | array | People mentioned in article |
author | array | null | Article authors (if available) |
List Response Format
Endpoints that return multiple articles wrap them in a data array with pagination:
{ "data": [ { /* article object */ }, { /* article object */ }, { /* article object */ } ], "next_cursor": "eyJwdWJsaXNoZWRfZGF0ZSI6Li4ufQ==" }
When there are no more results, next_cursor will be null.
Error Response Format
All errors follow a consistent structure:
{ "status": "error", "code": "invalidApiKey", "message": "The provided API key is invalid or has been revoked." }
| Field | Description |
|---|---|
status | Always "error" for error responses |
code | Machine-readable error code (camelCase) |
message | Human-readable description |
Common Error Codes
| HTTP | Code | Meaning |
|---|---|---|
| 400 | queryMissing | Search query 'q' is required |
| 401 | apiKeyMissing | No API key provided |
| 401 | invalidApiKey | Invalid or revoked API key |
| 429 | rateLimitExceeded | Too many requests |
| 429 | monthlyLimitExceeded | Monthly quota reached |