Node.js
import { Supadata } from '@supadata/js';
const supadata = new Supadata({
apiKey: 'YOUR_API_KEY',
});
const siteMap = await supadata.web.map('https://example.com');
console.log(siteMap);from supadata import Supadata
supadata = Supadata(api_key="YOUR_API_KEY")
site_map = supadata.web.map("https://example.com")
print(f"Found {len(site_map.urls)} URLs")curl -X GET "https://api.supadata.ai/v1/web/map?url=https://example.com" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json"const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.supadata.ai/v1/web/map', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.supadata.ai/v1/web/map",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.supadata.ai/v1/web/map"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.supadata.ai/v1/web/map")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.supadata.ai/v1/web/map")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"urls": [
"https://supadata.ai",
"https://supadata.ai/documentation"
]
}{
"error": "invalid-request",
"message": "Invalid Request",
"details": "The request is invalid or malformed",
"documentationUrl": "https://supadata.ai/documentation/errors#invalid-request"
}{
"error": "invalid-request",
"message": "Invalid Request",
"details": "The request is invalid or malformed",
"documentationUrl": "https://supadata.ai/documentation/errors#invalid-request"
}{
"error": "invalid-request",
"message": "Invalid Request",
"details": "The request is invalid or malformed",
"documentationUrl": "https://supadata.ai/documentation/errors#invalid-request"
}Web Endpoints
Map
Extract all links found on a whole website.
GET
/
web
/
map
Node.js
import { Supadata } from '@supadata/js';
const supadata = new Supadata({
apiKey: 'YOUR_API_KEY',
});
const siteMap = await supadata.web.map('https://example.com');
console.log(siteMap);from supadata import Supadata
supadata = Supadata(api_key="YOUR_API_KEY")
site_map = supadata.web.map("https://example.com")
print(f"Found {len(site_map.urls)} URLs")curl -X GET "https://api.supadata.ai/v1/web/map?url=https://example.com" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json"const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.supadata.ai/v1/web/map', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.supadata.ai/v1/web/map",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.supadata.ai/v1/web/map"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.supadata.ai/v1/web/map")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.supadata.ai/v1/web/map")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"urls": [
"https://supadata.ai",
"https://supadata.ai/documentation"
]
}{
"error": "invalid-request",
"message": "Invalid Request",
"details": "The request is invalid or malformed",
"documentationUrl": "https://supadata.ai/documentation/errors#invalid-request"
}{
"error": "invalid-request",
"message": "Invalid Request",
"details": "The request is invalid or malformed",
"documentationUrl": "https://supadata.ai/documentation/errors#invalid-request"
}{
"error": "invalid-request",
"message": "Invalid Request",
"details": "The request is invalid or malformed",
"documentationUrl": "https://supadata.ai/documentation/errors#invalid-request"
}Authorizations
Query Parameters
URL of the webpage
Example:
"https://supadata.ai"
When true, removes markdown links from the content, leaving only the URL text.
Preferred language for the scraped content (ISO 639-1 code). Sets Accept-Language header to influence website language selection.
Example:
"en"
Response
Successfully mapped web page
List of URLs found on the webpage
Example:
[
"https://supadata.ai",
"https://supadata.ai/documentation"
]
Was this page helpful?
⌘I