API Basics
Data Tools
WWW
★  Browser Bot
HTML Clean
URL Info
Telephony
Geolocation
Security and Networking
E-commerce
Imaging
Legacy APIs

Browser Bot

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

This API is based on the Chromium web browser so works exactly like the desktop browser. To extract live content from the page DOM use the "selector" option which will find page elements by CSS selector and return the results in the "elements" array. To automate user interactions on a page use the "exec" option, this takes an array of commands which can be either the special interaction functions (see docs below) or just plain old JavaScript code. Browser bot will also return useful HTTP status and response data for the given URL so can be handy for monitoring and analysis tasks too.

End Point

https://neutrinoapi.net/browser-bot
Test API
API Request
ParameterRequiredTypeDefaultDescription
urlyesstringThe URL to load
timeoutnointeger30Timeout in seconds. Give up if still trying to load the page after this number of seconds
delaynointeger3Delay in seconds to wait before capturing any page data, executing selectors or JavaScript
selectornostringExtract content from the page DOM using this selector. Commonly known as a CSS selector, you can find a good reference here
execnostringExecute JavaScript on the website. This parameter accepts JavaScript as either a string containing JavaScript or for sending multiple separate statements a JSON array or POST array can also be used. If a statement returns any value it will be returned in the 'exec-results' response. You can also use the following specially defined user interaction functions:

sleep(seconds); Just wait/sleep for the specified number of seconds.
click('selector'); Click on the first element matching the given selector.
focus('selector'); Focus on the first element matching the given selector.
keys('characters'); Send the specified keyboard characters. Use click() or focus() first to send keys to a specific element.
enter(); Send the Enter key.
tab(); Send the Tab key.
user-agentnostringOverride the browsers default user-agent string with this one
ignore-certificate-errorsnobooleanfalseIgnore any TLS/SSL certificate errors and load the page anyway
API Response
ParameterTypeDescription
urlstringThe page URL
contentstringThe complete raw, decompressed and decoded page content. Usually will be either HTML, JSON or XML
mime-typestringThe document MIME type
titlestringThe document title
language-codestringThe ISO 2-letter language code of the page. Extracted from either the HTML document or via HTTP headers
is-errorbooleanTrue if an error has occurred loading the page. Check the 'error-message' field for details
is-timeoutbooleanTrue if a timeout occurred while loading the page. You can set the timeout with the request parameter 'timeout'
error-messagestringContains the error message if an error has occurred ('is-error' will be true)
http-status-codeintegerThe HTTP status code the URL returned
http-status-messagestringThe HTTP status message the URL returned
is-http-okbooleanTrue if the HTTP status is OK (200)
is-http-redirectbooleanTrue if the URL responded with an HTTP redirect
http-redirect-urlstringThe redirected URL if the URL responded with an HTTP redirect
server-ipstringThe HTTP servers IP address
load-timefloatThe number of seconds taken to load the page (from initial request until DOM ready)
response-headersmapMap containing all the HTTP response headers the URL responded with
is-securebooleanTrue if the page is secured using TLS/SSL
security-detailsmapMap containing details of the TLS/SSL setup
elementsarrayArray containing all the elements matching the supplied selector.
Each element object will contain the text content, HTML content and all current element attributes
exec-resultsarrayIf you executed any JavaScript this array holds the results as objects
API Performance
CharacteristicValueDescription
Avg Latency1-10s (variable)This API has a non-deterministic latency based on outside factors
Max Rate1/secondMaximum inbound request rate. Exceeding this will result in request throttling
Max Concurrency25Maximum concurrent/simultaneous requests. Exceeding this will result in error code 06 [TOO MANY CONNECTIONS]

API Example
curl https://neutrinoapi.net/browser-bot \ --header "User-ID: <your-user-id>" \ --header "API-Key: <your-api-key>" \ --data-urlencode "delay=3" \ --data-urlencode "ignore-certificate-errors=false" \ --data-urlencode "selector=.button" \ --data-urlencode "url=https://www.neutrinoapi.com/" \ --data-urlencode "timeout=30" \ --data-urlencode "exec=[click('#button-id'), sleep(1), click('.class'), keys('1234'), enter()]" \ --data-urlencode "user-agent="
{ content: "\n \n \n \n \n \n \n \n \n \n \n \n \n..." elements: [ { class: "button button-selected", href: "https://www.neutrinoapi.com/", html: "Overview", id: "", text: "Overview" }, { class: "button ", href: "https://www.neutrinoapi.com/api/api-basics/", html: "API Docs", id: "", text: "API Docs" }, { class: "button ", href: "https://www.neutrinoapi.com/plans/", html: "Plans", id: "", text: "Plans" }, { class: "button ", href: "https://www.neutrinoapi.com/signup/", html: "Sign Up", id: "", text: "Sign Up" }, { class: "button ", href: "https://www.neutrinoapi.com/updates/", html: "Updates", id: "", text: "Updates" }, { class: "button ", href: "https://www.neutrinoapi.com/status/", html: "Status", id: "", text: "Status" }, { class: "button ", href: "https://www.neutrinoapi.com/about-us/", html: "About", id: "", text: "About" }, { class: "button ", href: "https://www.neutrinoapi.com/contact-us/", html: "Contact", id: "", text: "Contact" }, { class: "button ", href: "https://www.neutrinoapi.com/account/login/", html: "Login", id: "", text: "Login" }, { class: "button button-selected", href: "https://www.neutrinoapi.com/", html: "Overview", id: "", text: "Overview" }, { class: "button ", href: "https://www.neutrinoapi.com/api/api-basics/", html: "API Docs", id: "", text: "API Docs" }, { class: "button ", href: "https://www.neutrinoapi.com/plans/", html: "Plans", id: "", text: "Plans" }, { class: "button ", href: "https://www.neutrinoapi.com/signup/", html: "Sign Up", id: "", text: "Sign Up" }, { class: "button ", href: "https://www.neutrinoapi.com/updates/", html: "Updates", id: "", text: "Updates" }, { class: "button ", href: "https://www.neutrinoapi.com/status/", html: "Status", id: "", text: "Status" }, { class: "button ", href: "https://www.neutrinoapi.com/about-us/", html: "About", id: "", text: "About" }, { class: "button ", href: "https://www.neutrinoapi.com/contact-us/", html: "Contact", id: "", text: "Contact" }, { class: "button ", href: "https://www.neutrinoapi.com/account/login/", html: "Login", id: "", text: "Login" } ], error-message: "", exec-results: [], http-redirect-url: "", http-status-code: 200, http-status-message: "OK", is-error: false, is-http-ok: true, is-http-redirect: false, is-secure: true, is-timeout: false, language-code: "en", load-time: 0.687114666, mime-type: "text/html", response-headers: { alt-svc: "h3=\ content-encoding: "gzip", content-security-policy: "default-src 'self'; base-uri 'none'; object-src 'none'; frame-ancestors 'none'..." content-type: "text/html; charset=UTF-8", date: "Tue, 06 Feb 2024 22:51:47 GMT", referrer-policy: "strict-origin", server: "nginx", strict-transport-security: "max-age=31536000", via: "1.1 google", x-content-type-options: "nosniff" }, security-details: { cipher: "AES_128_GCM", issuer: "GlobalSign RSA OV SSL CA 2018", protocol: "TLS 1.3", subject-name: "*.neutrinoapi.com" }, server-ip: "35.244.243.139", title: "Neutrino API - Power tools for Developers", url: "https://www.neutrinoapi.com/" }