Insights
Running Insights requires two parameters: the target
url and insights.Use
insights: true to run both technology detection and a Lighthouse audit, or pass an object when you want only one of them.The following examples show how to use the Microlink API with CLI, cURL, JavaScript, Python, Ruby, PHP & Golang, targeting 'https://vercel.com' URL with 'insights' & 'meta' API parameters:
CLI Microlink API example
microlink https://vercel.com&insightscURL Microlink API example
curl -G "https://api.microlink.io" \
-d "url=https://vercel.com" \
-d "insights=true" \
-d "meta=false"JavaScript Microlink API example
import mql from '@microlink/mql'
const { data } = await mql('https://vercel.com', {
insights: true,
meta: false
})Python Microlink API example
import requests
url = "https://api.microlink.io/"
querystring = {
"url": "https://vercel.com",
"insights": "true",
"meta": "false"
}
response = requests.get(url, params=querystring)
print(response.json())Ruby Microlink API example
require 'uri'
require 'net/http'
base_url = "https://api.microlink.io/"
params = {
url: "https://vercel.com",
insights: "true",
meta: "false"
}
uri = URI(base_url)
uri.query = URI.encode_www_form(params)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
response = http.request(request)
puts response.bodyPHP Microlink API example
<?php
$baseUrl = "https://api.microlink.io/";
$params = [
"url" => "https://vercel.com",
"insights" => "true",
"meta" => "false"
];
$query = http_build_query($params);
$url = $baseUrl . '?' . $query;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET"
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #: " . $err;
} else {
echo $response;
}Golang Microlink API example
package main
import (
"fmt"
"net/http"
"net/url"
"io"
)
func main() {
baseURL := "https://api.microlink.io"
u, err := url.Parse(baseURL)
if err != nil {
panic(err)
}
q := u.Query()
q.Set("url", "https://vercel.com")
q.Set("insights", "true")
q.Set("meta", "false")
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
if err != nil {
panic(err)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}import mql from '@microlink/mql'
const { data } = await mql('https://vercel.com', {
insights: true,
meta: false
})Run the request and look for the analysis under
data.insights.MQL installation
To run the JavaScript examples with MQL, install
@microlink/mql:npm install @microlink/mql --saveIt works in Node.js, Edge runtimes, and the browser. See the MQL installation guide for the environment-specific setup.
If you are using another language, you do not need to install MQL to follow this guide. You can use the terminal examples or call the API directly from any HTTP client.
How it works
Switch to an
insights object when you want only one analysis:{
url: 'https://vercel.com',
insights: {
technologies: true,
lighthouse: false
},
meta: false
}In practice, you will usually read one of these fields:
data.insights.technologiesdata.insights.lighthouse
Choose a mode
| Need | Best option | Why |
|---|---|---|
| You want to identify the site's stack | insights: { technologies: true, lighthouse: false } | Faster and lighter |
| You want a Lighthouse audit | insights: { technologies: false, lighthouse: true } | Focuses on report generation |
| You want both | insights: true | Runs the full Insights flow |
Keep it light
If Insights is the only thing you need, skip metadata and keep only the Insights payload:
The following examples show how to use the Microlink API with CLI, cURL, JavaScript, Python, Ruby, PHP & Golang, targeting 'https://vercel.com' URL with 'insights', 'meta' & 'filter' API parameters:
CLI Microlink API example
microlink https://vercel.com&insights.technologies&filter=insightscURL Microlink API example
curl -G "https://api.microlink.io" \
-d "url=https://vercel.com" \
-d "insights.technologies=true" \
-d "insights.lighthouse=false" \
-d "meta=false" \
-d "filter=insights"JavaScript Microlink API example
import mql from '@microlink/mql'
const { data } = await mql('https://vercel.com', {
insights: {
technologies: true,
lighthouse: false
},
meta: false,
filter: "insights"
})Python Microlink API example
import requests
url = "https://api.microlink.io/"
querystring = {
"url": "https://vercel.com",
"insights.technologies": "true",
"insights.lighthouse": "false",
"meta": "false",
"filter": "insights"
}
response = requests.get(url, params=querystring)
print(response.json())Ruby Microlink API example
require 'uri'
require 'net/http'
base_url = "https://api.microlink.io/"
params = {
url: "https://vercel.com",
insights.technologies: "true",
insights.lighthouse: "false",
meta: "false",
filter: "insights"
}
uri = URI(base_url)
uri.query = URI.encode_www_form(params)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
response = http.request(request)
puts response.bodyPHP Microlink API example
<?php
$baseUrl = "https://api.microlink.io/";
$params = [
"url" => "https://vercel.com",
"insights.technologies" => "true",
"insights.lighthouse" => "false",
"meta" => "false",
"filter" => "insights"
];
$query = http_build_query($params);
$url = $baseUrl . '?' . $query;
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET"
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #: " . $err;
} else {
echo $response;
}Golang Microlink API example
package main
import (
"fmt"
"net/http"
"net/url"
"io"
)
func main() {
baseURL := "https://api.microlink.io"
u, err := url.Parse(baseURL)
if err != nil {
panic(err)
}
q := u.Query()
q.Set("url", "https://vercel.com")
q.Set("insights.technologies", "true")
q.Set("insights.lighthouse", "false")
q.Set("meta", "false")
q.Set("filter", "insights")
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
if err != nil {
panic(err)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}import mql from '@microlink/mql'
const { data } = await mql('https://vercel.com', {
insights: {
technologies: true,
lighthouse: false
},
meta: false,
filter: "insights"
})Use
meta: false and filter: 'insights' to keep the request lighter and the response smaller.Free tier and API key
The Microlink API works without an API key and gives you 50 free requests per day. For production usage, a
PRO
plan unlocks features such as configurable cache TTL, custom headers, and proxy support.See the authentication and rate limit docs for details.
What's next
- Technology detection — identify frameworks, CDNs, analytics tools, and other technologies behind a site.
- Lighthouse reports — generate JSON, HTML, or CSV Lighthouse audits and tune report settings.
- Caching and performance — cache expensive runs, skip unnecessary work, and verify response behavior.
- Troubleshooting — fix missing results, slow requests, private-page issues, and blocked sites.
See also
- Metadata — if you need link preview data alongside site analysis.
- Screenshot — if you want a visual capture of the analyzed site.