A Amazing Bargain Finder

A Amazing Bargain Finder · GPT 작업

Search API

  • POST /findExecutes a search query

    Sends a search query along with geolocation, host language, and last day only parameters to an external service and returns the results. Use 'lastDayOnly' as 'true' for recent product deals to avoid outdated deals. Omit for broader results like test results or product reviews.

원본 API 스키마
{
  "openapi": "3.0.0",
  "info": {
    "title": "Search API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://enigmatic-depths-81745-88603b24c113.herokuapp.com"
    }
  ],
  "paths": {
    "/find": {
      "post": {
        "summary": "Executes a search query",
        "description": "Sends a search query along with geolocation, host language, and last day only parameters to an external service and returns the results. Use 'lastDayOnly' as 'true' for recent product deals to avoid outdated deals. Omit for broader results like test results or product reviews.",
        "operationId": "find",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "q": {
                    "type": "string",
                    "description": "Required! The search text to be queried."
                  },
                  "gl": {
                    "type": "string",
                    "description": "Required! Geolocation country code to localize the search results (e.g., 'de' for Germany)."
                  },
                  "hl": {
                    "type": "string",
                    "description": "Required! Host language for the search results (e.g., 'de' for German)."
                  },
                  "lastDayOnly": {
                    "type": "boolean",
                    "description": "Optional. If true, filters the search to show results from the last day. Useful for finding recent product deals."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response with search results.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "searchParameters": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "type": "string"
                        },
                        "gl": {
                          "type": "string"
                        },
                        "hl": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "engine": {
                          "type": "string"
                        },
                        "lastDayOnly": {
                          "type": "boolean"
                        }
                      }
                    },
                    "organic": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "link": {
                            "type": "string"
                          },
                          "snippet": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "price": {
                            "type": "number"
                          },
                          "position": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, required parameters missing."
          },
          "500": {
            "description": "Server error while processing the request."
          }
        }
      }
    }
  }
}