News API Documentation
Learn how to integrate GrüneEule's News API
Overview
The News API provides access to all news from GrüneEule. With this API, you can retrieve news articles and display them in your own application.
<<<<<<< HEADThe API returns a list of news articles in JSON format. Each article contains an ID, title, date, a short description, an image, and a path to the full content.
Authentication
Currently, no authentication is required to access the News API. All endpoints are publicly accessible.
Endpoints
Get All News
Returns a list of all available news articles.
GET /api/news.json
Response Format
The API returns an array of news objects. Each object has the following properties:
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the news article |
| title | String | Title of the news article |
| date | String | Publication date in YYYY-MM-DD format |
| content | String | Short summary of the content |
| image | String | URL to the article's cover image |
| fullContentPath | String | URL to the Markdown file with the full content |
Example Response
[ { "id": 1, "title": "News Module Finally Ready!", "date":
"2025-07-22", "content": "We are pleased to introduce our new
news module!", "image":
"https://grueneeule.de/assets/img/news/1.png",
"fullContentPath":
"https://grueneeule.de/assets/data/news/1.md" }, { "id": 2,
"title": "tWfEE RELEASE NOW ONLINE", "date": "2025-07-23",
"content": "The tWfEE site has been released!", "image":
"https://grueneeule.de/assets/img/news/2.png",
"fullContentPath":
"https://grueneeule.de/assets/data/news/2.md" } ]
Code Examples
JavaScript (Fetch API)
fetch('https://grueneeule.de/api/news.json') .then(response
=> response.json()) .then(news => { console.log('News
loaded:', news); // Process the news data here }) .catch(error
=> { console.error('Error loading news:', error); });
Python
import requests import json response =
requests.get('https://grueneeule.de/api/news.json') if
response.status_code == 200: news = response.json()
print('News loaded:', news) else: print('Error fetching
news:', response.status_code)
PHP
$url = 'https://grueneeule.de/api/news.json'; $json =
file_get_contents($url); $news = json_decode($json, true); if
($news) { echo 'News loaded:'; print_r($news); } else { echo
'Error loading news'; }
Error Handling
The API returns standard HTTP status codes to indicate the success or failure of a request.
| Status Code | Meaning |
|---|---|
| 200 | OK - The request was successful |
| 404 | Not Found - The requested endpoint does not exist |
| 500 | Internal Server Error - A problem on the server |
Rate Limiting
Currently, there are no rate limits for the News API. You can query the API as often as you like. If these limits change in the future, we will document them here.