---
title: "Browser Bot"
method: POST
path: "/browser-bot"
tags: ["WWW"]
---

# Browser Bot

`POST /browser-bot`

Browser bot can extract content, interact with keyboard and mouse events, and execute JavaScript on a website

## Response `200`

OK

- BrowserBotResponse — Structure of browser-bot
  - `url` string, required — The requested URL. This may not be the same as the final destination URL, if the URL redirects then it will be set in 'http-redirect-url' and 'is-http-redirect' will also be true
  - `content` string, required — The complete raw, decompressed and decoded page content. Usually will be either HTML, JSON or XML
  - `mime-type` string, required — The document MIME type
  - `title` string, required — The document title
  - `is-error` boolean, required — True if an error has occurred loading the page. Check the 'error-message' field for details
  - `is-timeout` boolean, required — True if a timeout occurred while loading the page. You can set the timeout with the request parameter 'timeout'
  - `error-message` string, required — Contains the error message if an error has occurred ('is-error' will be true)
  - `http-status-code` integer, required — The HTTP status code the URL returned
  - `http-status-message` string, required — The HTTP status message the URL returned
  - `is-http-ok` boolean, required — True if the HTTP status is OK (200)
  - `is-http-redirect` boolean, required — True if the URL responded with an HTTP redirect
  - `http-redirect-url` string, required — The redirected URL if the URL responded with an HTTP redirect
  - `server-ip` string, required — The HTTP servers IP address
  - `load-time` number, double, required — The number of seconds taken to load the page (from initial request until DOM ready)
  - `response-headers` object, required — Map containing all the HTTP response headers the URL responded with
  - `is-secure` boolean, required — True if the page is secured using TLS/SSL
  - `security-details` object, required — Map containing details of the TLS/SSL setup
  - `elements` HTMLElement[], required — Array containing all the elements matching the supplied selector
    - `class` string, required — The 'class' attribute of the element
    - `href` string, required — The 'href' attribute of the element
    - `html` string, required — The raw HTML of the element
    - `id` string, required — The 'id' attribute of the element
    - `text` string, required — The plain-text content of the element with normalized whitespace
  - `exec-results` ExecResult[], required — If you executed any JavaScript this array holds the results as objects
    - `statement` string, required — The JavaScript statement that was executed
    - `result` string, required — The result of the executed JavaScript statement. Will be empty if the statement returned nothing
  - `language-code` string, required — The ISO 2-letter language code of the page. Extracted from either the HTML document or via HTTP headers
  - `url-components` URLComponents, required — Structure of url-components
    - `url` string, required — The complete and final URL
    - `host` string, required — The host of the URL. Will be either a domain name, sub-domain or IP address
    - `protocol` string, required — The protocol of the URL. For a website URL this will be either 'https' or 'http'
    - `path` string, required — The path of the URL. This is the part coming after the host and specifies which resource to load
    - `port` integer, required — The port of the URL. This is usually 443 for HTTPS and 80 for HTTP unless otherwise specified in the URL
    - `query` object, required — The query of the URL. Contains a key/value map of any HTTP GET query parameters present in the URL
  - `url-valid` boolean, required — True if the URL supplied is valid
  - `content-size` integer, required — The size of the returned content in bytes
  - `server-hostname` string, required — The HTTP servers hostname (PTR/RDNS record)

## Other responses

- `400` — Your API request has been rejected. Check error code for details
- `403` — You have failed to authenticate
- `500` — We messed up, sorry! Your request has caused a fatal exception
- `default` — We messed up, sorry! Your request has caused an error

---

[API](https://skmtc.net/neutrinoapi/apis/neutrino-api.md) · [All operations](https://skmtc.net/neutrinoapi/apis/neutrino-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neutrinoapi/neutrino-api/versions/4ebd6b56de42/schema)
