News Topic Explorer

News Topic Explorer · Acciones GPT

News Headlines and Analysis API

  • GET /getFirestoreDataRetrieve news headlines from Firestore based on keyword
  • GET /getHeadlineAnalysisRetrieve news analysis data
  • GET /getSentimentDataRetrieve news headlines and sentiments from Firestore
Esquema original API
{
  "openapi": "3.0.0",
  "info": {
    "title": "News Headlines and Analysis API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://newschat.org"
    }
  ],
  "paths": {
    "/getFirestoreData": {
      "get": {
        "operationId": "getFirestoreData",
        "summary": "Retrieve news headlines from Firestore based on keyword",
        "parameters": [
          {
            "in": "query",
            "name": "keyword",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "News items matching the headline keyword from Firestore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "headline": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false
      }
    },
    "/getHeadlineAnalysis": {
      "get": {
        "operationId": "getHeadlineAnalysis",
        "summary": "Retrieve news analysis data",
        "responses": {
          "200": {
            "description": "News analysis data in text format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "analysis": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false
      }
    },
    "/getSentimentData": {
      "get": {
        "operationId": "getSentimentData",
        "summary": "Retrieve news headlines and sentiments from Firestore",
        "parameters": [
          {
            "in": "query",
            "name": "sentiment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageToken",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "News items with sentiment data matching the keyword from Firestore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date_time": {
                        "type": "string"
                      },
                      "topic": {
                        "type": "string"
                      },
                      "sentiment": {
                        "type": "string"
                      },
                      "category": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false
      }
    }
  }
}