Microlink API: Browser automation
January 26, 2020 (
4 months ago)
A web browser is one of the most complex pieces of software, with some internal sub-systems that work together for resolving any kind of URL on the Internet, even if the content was written with HTML tables in 1992.
is a service that provides a high-level API to control a browser instance in the simplest way possible, where the different features can be enabled or disabled using query parameters.
When we started the service, just a few things could be done.
Now, we're supporting +30 query parameters.
is the only parameter that needs to be specified, but also any of the following query parameters:
Enrich the response payload for detecting data from the target URL.
: enables audio source detection from the target URL. audio : gets specific content extraction from the target URL. data : gets, if it's possible, the embedded representation of the target URL. iframe : gets lighthouse perfomance metrics from the target URL. insights : gets unified medata from the target URL. meta : gets color information over any image present on the response data. palette : gets a PDF over the target URL. pdf : takes a screenshot over the target URL. screenshot : enables video source detection from the target URL. video
Tell the browser to act in a certain way or perform some tasks.
: enable/disable adblock over abusive third-party content over the browser page. adblock : enable/disable CSS animations and transitions into the browser page. animations : clicks DOM elements matching the given CSS selectors. click : sets the code syntax highlighting color theme to use. codeScheme : sets preferred browser color theme preference. colorScheme : emulates an specific device (viewport, user agent, dimensions, etc). device : sets hide
visibility: hidden on the matched elements.
<script type="module"> into the browser page.
: enable/disable to resolve all URLs present into the payload. ping : enable/disable browser navigation. prerender : uses a proxy server as an intermediary during the requests. proxy : sets remove
display: none on the matched elements.
: injects scripts
<script> into the browser page.
: scrolls to the DOM element matching the given CSS selector. scroll : injects styles
<style> into the browser page.
: establishes a set of properties related with the browser visible area. viewport : waits a quantity of time or selector before processing the content of the browser page. waitFor : ensures to wait browser event(s) before considering navigation succeeded. waitUntil
Apply some modifications over the response data for better accommodation.
: embed a specific response data field respecting the content type. embed : filters a list of properties from the response data for bandwidth saving. filter : forces a new fresh response data bypassing the cache layer. force : customizes requests using custom HTTP headers. headers : defines maximum quantity of time allowed for resolving a request. timeout : configures the cache layer specifying the time to live. ttl
Whether you are are building a product and you need fancy previews, you’re an indie hacker or simply you like frontend stuff, come
with us 🙂.