Cortex - NewsPlanetAI
Cortex - NewsPlanetAI · GPT-Aktionen
News API
API for retrieving news based on different criteria such as category, headline, location, and timestamp.
GET /searchfuzzySearchArticlesPerform a fuzzy search in news articles
GET /categorygetNewsByCategoryGet news by category
GET /headlinegetNewsByHeadlineGet news by headline keyword
GET /locationgetNewsByLocationGet news by location
GET /timestampgetNewsByTimestampGet news by timestamp
GET /summarygetSuperSummaryGet the super summary
GET /top-headlinesgetTopHeadlinesGet all news articles marked as top headlines
GET /latest-soundcloud-trackgetLatestSoundCloudTrackRetrieve the latest SoundCloud track information
Ursprüngliches API-Schema
{
"openapi": "3.1.0",
"info": {
"title": "News API",
"description": "API for retrieving news based on different criteria such as category, headline, location, and timestamp.",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://newsplanetai.com/dailyapi"
}
],
"paths": {
"/search": {
"get": {
"description": "Perform a fuzzy search in news articles",
"operationId": "fuzzySearchArticles",
"parameters": [
{
"name": "query",
"in": "query",
"description": "The search query for fuzzy matching",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "field",
"in": "query",
"description": "The field to search in (e.g., 'summary', 'headline')",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "threshold",
"in": "query",
"description": "The threshold for fuzzy matching (default: 60)",
"required": false,
"schema": {
"type": "integer",
"default": 60
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NewsItem"
}
}
}
}
}
}
}
},
"/category": {
"get": {
"description": "Get news by category",
"operationId": "getNewsByCategory",
"parameters": [
{
"name": "category",
"in": "query",
"description": "The category to filter news",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NewsItem"
}
}
}
}
}
}
}
},
"/headline": {
"get": {
"description": "Get news by headline keyword",
"operationId": "getNewsByHeadline",
"parameters": [
{
"name": "keyword",
"in": "query",
"description": "The keyword to search in headlines",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NewsItem"
}
}
}
}
}
}
}
},
"/location": {
"get": {
"description": "Get news by location",
"operationId": "getNewsByLocation",
"parameters": [
{
"name": "location",
"in": "query",
"description": "The location to filter news",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NewsItem"
}
}
}
}
}
}
}
},
"/timestamp": {
"get": {
"description": "Get news by timestamp",
"operationId": "getNewsByTimestamp",
"parameters": [
{
"name": "date",
"in": "query",
"description": "The date to filter news (format YYYY-MM-DD)",
"required": true,
"schema": {
"type": "string",
"format": "date"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NewsItem"
}
}
}
}
}
}
}
},
"/summary": {
"get": {
"description": "Get the super summary",
"operationId": "getSuperSummary",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/top-headlines": {
"get": {
"description": "Get all news articles marked as top headlines",
"operationId": "getTopHeadlines",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NewsItem"
}
}
}
}
}
}
}
},
"/latest-soundcloud-track": {
"get": {
"description": "Retrieve the latest SoundCloud track information",
"operationId": "getLatestSoundCloudTrack",
"responses": {
"200": {
"description": "Successful response with the latest track information",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"published": {
"type": "string"
},
"link": {
"type": "string"
}
}
}
}
}
},
"404": {
"description": "No tracks found"
}
}
}
}
},
"components": {
"schemas": {
"NewsItem": {
"type": "object",
"properties": {
"headline": {
"type": "string"
},
"summary": {
"type": "string"
},
"link": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"location": {
"type": "string"
},
"coordinates": {
"type": "array",
"items": {
"type": "number"
}
},
"top_headline": {
"type": "boolean"
}
}
}
}
}
}