Deep News
Deep News · Ações GPT
NewsAPI
Provides latest news
GET /statusStatusPOST /topTop NewsPOST /detailNews DetailPOST /searchSearch
Esquema API original
{
"openapi": "3.1.0",
"info": {
"title": "NewsAPI",
"description": "Provides latest news",
"termsOfService": "https://deepnewz.com/terms-of-service",
"version": "0.0.2"
},
"servers": [
{
"url": "https://chat.api.deepnewz.com",
"description": "Latest News API"
}
],
"paths": {
"/status": {
"get": {
"summary": "Status",
"operationId": "status_status_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/top": {
"post": {
"summary": "Top News",
"operationId": "top_news_top_post",
"x-openai-isConsequential": false,
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TopRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/detail": {
"post": {
"summary": "News Detail",
"operationId": "news_detail_detail_post",
"x-openai-isConsequential": false,
"parameters": [
{
"name": "slug",
"in": "query",
"required": true,
"schema": {
"type": "string",
"title": "Slug"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/search": {
"post": {
"summary": "Search",
"operationId": "search_search_post",
"x-openai-isConsequential": false,
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SearchRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"HyperParams": {
"properties": {
"similarity_threshold": {
"type": "number",
"title": "Similarity Threshold",
"default": 0.3
},
"weight_quality": {
"type": "number",
"title": "Weight Quality",
"default": 0.3
},
"weight_age": {
"type": "number",
"title": "Weight Age",
"default": 0.5
},
"weight_authors": {
"type": "number",
"title": "Weight Authors",
"default": 0.2
}
},
"type": "object",
"title": "HyperParams"
},
"SearchRequest": {
"properties": {
"max_n": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Maximum news stories to return (excludes breakouts). Leave None to return all stories",
"default": 10
},
"query": {
"type": "string",
"title": "Query"
},
"candidate_scale_factor": {
"type": "number",
"title": "Candidate generated (*max_n) before re-ranking",
"default": 2
},
"rerank_scoring_parameters": {
"$ref": "#/components/schemas/HyperParams"
}
},
"type": "object",
"required": [
"query"
],
"title": "SearchRequest"
},
"TopRequest": {
"properties": {
"max_n": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Maximum news stories to return (excludes breakouts). Leave None to return all stories"
},
"interests": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Best guess of users interests to help tailor this"
},
"query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Additional context for this query"
},
"rerank_scoring_parameters": {
"$ref": "#/components/schemas/HyperParams"
}
},
"type": "object",
"title": "TopRequest"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
}
}
}
}