Back to Home

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

FieldTypeDescription
article_idstringUnique identifier (32-char hex)
titlestringArticle headline
descriptionstringBrief summary or excerpt
linkstringURL to original article
media_urlstring | nullFeatured image URL (if available)
published_datestringISO 8601 timestamp with timezone
sourcestringNews outlet name
categorystringPrimary category
topicsarrayRelated topic tags
peoplearrayPeople mentioned in article
authorarray | nullArticle 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."
}
FieldDescription
statusAlways "error" for error responses
codeMachine-readable error code (camelCase)
messageHuman-readable description

Common Error Codes

HTTPCodeMeaning
400queryMissingSearch query 'q' is required
401apiKeyMissingNo API key provided
401invalidApiKeyInvalid or revoked API key
429rateLimitExceededToo many requests
429monthlyLimitExceededMonthly quota reached
Get Started View Full Docs