Next Sense - Search AI

Next Sense - Search AI · Ações GPT

Search API

Performs searches and returns formatted results.

  • POST /searchsearch

    Performs a search based on the provided query and returns formatted results.

Esquema API original
{
  "openapi": "3.1.0",
  "info": {
    "title": "Search API",
    "description": "Performs searches and returns formatted results.",
    "version": "v0.0.1"
  },
  "servers": [
    {
      "url": "https://api.nextsense.ai"
    }
  ],
  "paths": {
    "/search": {
      "post": {
        "description": "Performs a search based on the provided query and returns formatted results.",
        "operationId": "search",
        "requestBody": {
          "description": "Search query to be processed",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchQuerySchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response with search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponseSchema"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SearchQuerySchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "The search query"
          }
        },
        "required": [
          "query"
        ],
        "title": "SearchQuerySchema"
      },
      "SearchResult": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title of the search result"
          },
          "link": {
            "type": "string",
            "format": "uri",
            "description": "URL of the search result"
          },
          "content": {
            "type": "string",
            "description": "Content extracted from the search result"
          },
          "fetched_images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "description": "List of fetched images from the search result"
          },
          "cse_thumbnail": {
            "type": "string",
            "format": "uri",
            "description": "URL of the CSE thumbnail image"
          },
          "cse_image": {
            "type": "string",
            "format": "uri",
            "description": "URL of the CSE image"
          },
          "og_image": {
            "type": "string",
            "format": "uri",
            "description": "URL of the OG image"
          }
        },
        "title": "SearchResult"
      },
      "SearchResponseSchema": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchResult"
            },
            "description": "Array of search results"
          }
        },
        "title": "SearchResponseSchema"
      }
    }
  }
}