Websites Dataset (Traffic and Engagement)
curl --request POST \
--url https://api.similarweb.com/batch/v4/request-report \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"report_query": {
"tables": [
{
"vtable": "traffic_and_engagement",
"granularity": "monthly",
"metrics": [],
"filters": {
"domains": [
"nike.com"
],
"countries": [
"UK"
],
"include_subdomains": true
},
"start_date": "2024-08",
"end_date": "2024-08",
"paging": {
"sort_asc": "false",
"sort": "<string>",
"limit": 100,
"offset": 0
},
"latest": true
}
]
},
"delivery_information": {
"webhook_url": "<string>",
"delivery_method_params": {}
}
}
'import requests
url = "https://api.similarweb.com/batch/v4/request-report"
payload = {
"report_query": { "tables": [
{
"vtable": "traffic_and_engagement",
"granularity": "monthly",
"metrics": [],
"filters": {
"domains": ["nike.com"],
"countries": ["UK"],
"include_subdomains": True
},
"start_date": "2024-08",
"end_date": "2024-08",
"paging": {
"sort_asc": "false",
"sort": "<string>",
"limit": 100,
"offset": 0
},
"latest": True
}
] },
"delivery_information": {
"webhook_url": "<string>",
"delivery_method_params": {}
}
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
report_query: {
tables: [
{
vtable: 'traffic_and_engagement',
granularity: 'monthly',
metrics: [],
filters: {domains: ['nike.com'], countries: ['UK'], include_subdomains: true},
start_date: '2024-08',
end_date: '2024-08',
paging: {sort_asc: 'false', sort: '<string>', limit: 100, offset: 0},
latest: true
}
]
},
delivery_information: {webhook_url: '<string>', delivery_method_params: {}}
})
};
fetch('https://api.similarweb.com/batch/v4/request-report', 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.similarweb.com/batch/v4/request-report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'report_query' => [
'tables' => [
[
'vtable' => 'traffic_and_engagement',
'granularity' => 'monthly',
'metrics' => [
],
'filters' => [
'domains' => [
'nike.com'
],
'countries' => [
'UK'
],
'include_subdomains' => true
],
'start_date' => '2024-08',
'end_date' => '2024-08',
'paging' => [
'sort_asc' => 'false',
'sort' => '<string>',
'limit' => 100,
'offset' => 0
],
'latest' => true
]
]
],
'delivery_information' => [
'webhook_url' => '<string>',
'delivery_method_params' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.similarweb.com/batch/v4/request-report"
payload := strings.NewReader("{\n \"report_query\": {\n \"tables\": [\n {\n \"vtable\": \"traffic_and_engagement\",\n \"granularity\": \"monthly\",\n \"metrics\": [],\n \"filters\": {\n \"domains\": [\n \"nike.com\"\n ],\n \"countries\": [\n \"UK\"\n ],\n \"include_subdomains\": true\n },\n \"start_date\": \"2024-08\",\n \"end_date\": \"2024-08\",\n \"paging\": {\n \"sort_asc\": \"false\",\n \"sort\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0\n },\n \"latest\": true\n }\n ]\n },\n \"delivery_information\": {\n \"webhook_url\": \"<string>\",\n \"delivery_method_params\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.similarweb.com/batch/v4/request-report")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"report_query\": {\n \"tables\": [\n {\n \"vtable\": \"traffic_and_engagement\",\n \"granularity\": \"monthly\",\n \"metrics\": [],\n \"filters\": {\n \"domains\": [\n \"nike.com\"\n ],\n \"countries\": [\n \"UK\"\n ],\n \"include_subdomains\": true\n },\n \"start_date\": \"2024-08\",\n \"end_date\": \"2024-08\",\n \"paging\": {\n \"sort_asc\": \"false\",\n \"sort\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0\n },\n \"latest\": true\n }\n ]\n },\n \"delivery_information\": {\n \"webhook_url\": \"<string>\",\n \"delivery_method_params\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.similarweb.com/batch/v4/request-report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report_query\": {\n \"tables\": [\n {\n \"vtable\": \"traffic_and_engagement\",\n \"granularity\": \"monthly\",\n \"metrics\": [],\n \"filters\": {\n \"domains\": [\n \"nike.com\"\n ],\n \"countries\": [\n \"UK\"\n ],\n \"include_subdomains\": true\n },\n \"start_date\": \"2024-08\",\n \"end_date\": \"2024-08\",\n \"paging\": {\n \"sort_asc\": \"false\",\n \"sort\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0\n },\n \"latest\": true\n }\n ]\n },\n \"delivery_information\": {\n \"webhook_url\": \"<string>\",\n \"delivery_method_params\": {}\n }\n}"
response = http.request(request)
puts response.read_body"{\n \"report_id\": \"c4asdf83d8-bf42-40a1-b3d2-8862832dbc55\",\n \"status\": \"pending\"\n}""{}"API Reference
Websites Dataset (Traffic and Engagement)
The Websites dataset offers a comprehensive analysis of website traffic and user engagement. It encompasses various metrics that provide insights into how visitors interact with websites, both on desktop and mobile platforms. This dataset is crucial for understanding website performance, audience behavior, and digital marketing effectiveness.
POST
/
batch
/
v4
/
request-report
Websites Dataset (Traffic and Engagement)
curl --request POST \
--url https://api.similarweb.com/batch/v4/request-report \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"report_query": {
"tables": [
{
"vtable": "traffic_and_engagement",
"granularity": "monthly",
"metrics": [],
"filters": {
"domains": [
"nike.com"
],
"countries": [
"UK"
],
"include_subdomains": true
},
"start_date": "2024-08",
"end_date": "2024-08",
"paging": {
"sort_asc": "false",
"sort": "<string>",
"limit": 100,
"offset": 0
},
"latest": true
}
]
},
"delivery_information": {
"webhook_url": "<string>",
"delivery_method_params": {}
}
}
'import requests
url = "https://api.similarweb.com/batch/v4/request-report"
payload = {
"report_query": { "tables": [
{
"vtable": "traffic_and_engagement",
"granularity": "monthly",
"metrics": [],
"filters": {
"domains": ["nike.com"],
"countries": ["UK"],
"include_subdomains": True
},
"start_date": "2024-08",
"end_date": "2024-08",
"paging": {
"sort_asc": "false",
"sort": "<string>",
"limit": 100,
"offset": 0
},
"latest": True
}
] },
"delivery_information": {
"webhook_url": "<string>",
"delivery_method_params": {}
}
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
report_query: {
tables: [
{
vtable: 'traffic_and_engagement',
granularity: 'monthly',
metrics: [],
filters: {domains: ['nike.com'], countries: ['UK'], include_subdomains: true},
start_date: '2024-08',
end_date: '2024-08',
paging: {sort_asc: 'false', sort: '<string>', limit: 100, offset: 0},
latest: true
}
]
},
delivery_information: {webhook_url: '<string>', delivery_method_params: {}}
})
};
fetch('https://api.similarweb.com/batch/v4/request-report', 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.similarweb.com/batch/v4/request-report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'report_query' => [
'tables' => [
[
'vtable' => 'traffic_and_engagement',
'granularity' => 'monthly',
'metrics' => [
],
'filters' => [
'domains' => [
'nike.com'
],
'countries' => [
'UK'
],
'include_subdomains' => true
],
'start_date' => '2024-08',
'end_date' => '2024-08',
'paging' => [
'sort_asc' => 'false',
'sort' => '<string>',
'limit' => 100,
'offset' => 0
],
'latest' => true
]
]
],
'delivery_information' => [
'webhook_url' => '<string>',
'delivery_method_params' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.similarweb.com/batch/v4/request-report"
payload := strings.NewReader("{\n \"report_query\": {\n \"tables\": [\n {\n \"vtable\": \"traffic_and_engagement\",\n \"granularity\": \"monthly\",\n \"metrics\": [],\n \"filters\": {\n \"domains\": [\n \"nike.com\"\n ],\n \"countries\": [\n \"UK\"\n ],\n \"include_subdomains\": true\n },\n \"start_date\": \"2024-08\",\n \"end_date\": \"2024-08\",\n \"paging\": {\n \"sort_asc\": \"false\",\n \"sort\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0\n },\n \"latest\": true\n }\n ]\n },\n \"delivery_information\": {\n \"webhook_url\": \"<string>\",\n \"delivery_method_params\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.similarweb.com/batch/v4/request-report")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"report_query\": {\n \"tables\": [\n {\n \"vtable\": \"traffic_and_engagement\",\n \"granularity\": \"monthly\",\n \"metrics\": [],\n \"filters\": {\n \"domains\": [\n \"nike.com\"\n ],\n \"countries\": [\n \"UK\"\n ],\n \"include_subdomains\": true\n },\n \"start_date\": \"2024-08\",\n \"end_date\": \"2024-08\",\n \"paging\": {\n \"sort_asc\": \"false\",\n \"sort\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0\n },\n \"latest\": true\n }\n ]\n },\n \"delivery_information\": {\n \"webhook_url\": \"<string>\",\n \"delivery_method_params\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.similarweb.com/batch/v4/request-report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report_query\": {\n \"tables\": [\n {\n \"vtable\": \"traffic_and_engagement\",\n \"granularity\": \"monthly\",\n \"metrics\": [],\n \"filters\": {\n \"domains\": [\n \"nike.com\"\n ],\n \"countries\": [\n \"UK\"\n ],\n \"include_subdomains\": true\n },\n \"start_date\": \"2024-08\",\n \"end_date\": \"2024-08\",\n \"paging\": {\n \"sort_asc\": \"false\",\n \"sort\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0\n },\n \"latest\": true\n }\n ]\n },\n \"delivery_information\": {\n \"webhook_url\": \"<string>\",\n \"delivery_method_params\": {}\n }\n}"
response = http.request(request)
puts response.read_body"{\n \"report_id\": \"c4asdf83d8-bf42-40a1-b3d2-8862832dbc55\",\n \"status\": \"pending\"\n}""{}"Authorizations
Headers
Body
application/json