UKKEN

UKKEN · Acciones GPT

WebBrowserGPT API

API for performing web browsing tasks such as searching, fetching page content, and interacting with websites.

  • GET /searchPerform a web search using a query string.
  • GET /fetch-page-contentFetch the HTML content of a given URL.
  • POST /interact-with-pagePerform interactions like clicking or filling forms on a web page.
Esquema original API
{
  "openapi": "3.1.0",
  "info": {
    "title": "WebBrowserGPT API",
    "description": "API for performing web browsing tasks such as searching, fetching page content, and interacting with websites.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://webbrowsergpt.example.com/api",
      "description": "Main server for WebBrowserGPT actions"
    }
  ],
  "paths": {
    "/search": {
      "get": {
        "operationId": "searchWeb",
        "summary": "Perform a web search using a query string.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "The search query string.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "snippet": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid search query."
          }
        }
      }
    },
    "/fetch-page-content": {
      "get": {
        "operationId": "fetchPageContent",
        "summary": "Fetch the HTML content of a given URL.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "description": "The URL of the webpage to fetch.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Web page content retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "html": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Web page not found or could not be accessed."
          }
        }
      }
    },
    "/interact-with-page": {
      "post": {
        "operationId": "interactWithPage",
        "summary": "Perform interactions like clicking or filling forms on a web page.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The URL of the web page."
                  },
                  "actions": {
                    "type": "array",
                    "description": "List of interactions to perform on the page.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "click",
                            "input"
                          ],
                          "description": "Type of action, e.g., 'click' or 'input'."
                        },
                        "selector": {
                          "type": "string",
                          "description": "The CSS selector for the element."
                        },
                        "value": {
                          "type": "string",
                          "description": "The value to input (for input actions)."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Interactions performed successfully."
          },
          "400": {
            "description": "Bad request, invalid input or interaction."
          }
        }
      }
    }
  }
}