Skip to main content
GET
/
v2
/
apps
/
{app_id}
/
network
/
analytics
Website Analytics
curl --request GET \
  --url https://api.squarecloud.app/v2/apps/{app_id}/network/analytics \
  --header 'Authorization: <authorization>'
import requests

url = "https://api.squarecloud.app/v2/apps/{app_id}/network/analytics"

headers = {"Authorization": "<authorization>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<authorization>'}};

fetch('https://api.squarecloud.app/v2/apps/{app_id}/network/analytics', 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.squarecloud.app/v2/apps/{app_id}/network/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);

$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.squarecloud.app/v2/apps/{app_id}/network/analytics"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<authorization>")

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.squarecloud.app/v2/apps/{app_id}/network/analytics")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.squarecloud.app/v2/apps/{app_id}/network/analytics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "response": {
    "visits": [
      { "visits": 1024, "requests": 1247, "bytes": 8421000, "date": "2026-05-21T10:00:00Z" }
    ],
    "countries": [
      { "type": "BR", "visits": 612, "requests": 743, "bytes": 5012000, "date": "2026-05-21T10:00:00Z" }
    ],
    "devices": [
      { "type": "desktop", "visits": 820, "requests": 998, "bytes": 6700000, "date": "2026-05-21T10:00:00Z" }
    ],
    "os": [
      { "type": "Windows", "visits": 540, "requests": 651, "bytes": 4400000, "date": "2026-05-21T10:00:00Z" }
    ],
    "browsers": [
      { "type": "Chrome", "visits": 720, "requests": 870, "bytes": 5800000, "date": "2026-05-21T10:00:00Z" }
    ],
    "protocols": [
      { "type": "HTTP/2", "visits": 900, "requests": 1100, "bytes": 7400000, "date": "2026-05-21T10:00:00Z" }
    ],
    "methods": [
      { "type": "GET", "visits": 850, "requests": 1020, "bytes": 6900000, "date": "2026-05-21T10:00:00Z" }
    ],
    "paths": [
      { "type": "/", "visits": 410, "requests": 498, "bytes": 3320000, "date": "2026-05-21T10:00:00Z" }
    ],
    "referers": [
      { "type": "Direct", "visits": 380, "requests": 462, "bytes": 3100000, "date": "2026-05-21T10:00:00Z" }
    ],
    "providers": [
      { "type": "AS15169 (GOOGLE)", "visits": 210, "requests": 254, "bytes": 1700000, "date": "2026-05-21T10:00:00Z" }
    ],
    "ips": [
      { "type": "203.0.113.45", "visits": 40, "requests": 3120, "bytes": 2100000 }
    ],
    "status_codes": [
      { "type": "200", "visits": 950, "requests": 1180, "bytes": 8100000 }
    ],
    "bots": [
      { "type": "Search Engine Crawler", "visits": 0, "requests": 84, "bytes": 410000 }
    ],
    "content_types": [
      { "type": "json", "visits": 310, "requests": 720, "bytes": 4200000 }
    ]
  }
}
Authorization
string
required
The API key for your account. You can find this in your account settings.

Parameters

app_id
string
required
The ID of the application. You can find this in the URL of your application’s dashboard.
start
string
required
ISO 8601 start timestamp for the analysis window. The maximum retention window is 7 days; the start is clamped to the application’s creation date.
end
string
required
ISO 8601 end timestamp. Must be after start.

Drill-down filters

Optional filters that narrow every breakdown to the matching traffic. Feed back the exact type value returned by the corresponding breakdown in a previous response. Filters combine (AND).
country
string
A single client country (2-character code), as returned in the countries breakdown.
ip
string
A single client IP (exact IPv4/IPv6 match), as returned in the ips breakdown.
path
string
Request paths starting with this prefix (e.g. /api covers /api/*). Max 256 chars.
status
string
A single edge response status code (3 digits), as returned in the status_codes breakdown.
os
string
A single client OS, as returned in the os breakdown.
browser
string
A single client browser, as returned in the browsers breakdown.
protocol
string
A single HTTP protocol, as returned in the protocols breakdown.
referer
string
A single referer host, as returned in the referers breakdown (Direct = no referer).
provider
string
A single client network, as returned in the providers breakdown — e.g. GOOGLE (15169), a bare ASN number, or SQUARE-CLOUD-PLATFORM.
content_type
string
A single response content type, as returned in the content_types breakdown (Unknown = unclassified).
bot
string
A single verified-bot category, as returned in the bots breakdown (Unverified = regular non-bot traffic).

Response

This route can send a response in a compressed format, optimizing data transmission.
status
string
Indicates whether the call was successful.. success if successful, error if not.
response
object
Each breakdown is an array of buckets. type identifies the dimension, visits is unique visitors, requests is the request count, bytes is the response bytes served, and date is the 15-minute window start. The ips, status_codes, bots, and content_types breakdowns are window totals (top-N over the whole window) and carry no date field. Returns an empty object ({}) when the requested window starts before the application’s creation date.
{
  "status": "success",
  "response": {
    "visits": [
      { "visits": 1024, "requests": 1247, "bytes": 8421000, "date": "2026-05-21T10:00:00Z" }
    ],
    "countries": [
      { "type": "BR", "visits": 612, "requests": 743, "bytes": 5012000, "date": "2026-05-21T10:00:00Z" }
    ],
    "devices": [
      { "type": "desktop", "visits": 820, "requests": 998, "bytes": 6700000, "date": "2026-05-21T10:00:00Z" }
    ],
    "os": [
      { "type": "Windows", "visits": 540, "requests": 651, "bytes": 4400000, "date": "2026-05-21T10:00:00Z" }
    ],
    "browsers": [
      { "type": "Chrome", "visits": 720, "requests": 870, "bytes": 5800000, "date": "2026-05-21T10:00:00Z" }
    ],
    "protocols": [
      { "type": "HTTP/2", "visits": 900, "requests": 1100, "bytes": 7400000, "date": "2026-05-21T10:00:00Z" }
    ],
    "methods": [
      { "type": "GET", "visits": 850, "requests": 1020, "bytes": 6900000, "date": "2026-05-21T10:00:00Z" }
    ],
    "paths": [
      { "type": "/", "visits": 410, "requests": 498, "bytes": 3320000, "date": "2026-05-21T10:00:00Z" }
    ],
    "referers": [
      { "type": "Direct", "visits": 380, "requests": 462, "bytes": 3100000, "date": "2026-05-21T10:00:00Z" }
    ],
    "providers": [
      { "type": "AS15169 (GOOGLE)", "visits": 210, "requests": 254, "bytes": 1700000, "date": "2026-05-21T10:00:00Z" }
    ],
    "ips": [
      { "type": "203.0.113.45", "visits": 40, "requests": 3120, "bytes": 2100000 }
    ],
    "status_codes": [
      { "type": "200", "visits": 950, "requests": 1180, "bytes": 8100000 }
    ],
    "bots": [
      { "type": "Search Engine Crawler", "visits": 0, "requests": 84, "bytes": 410000 }
    ],
    "content_types": [
      { "type": "json", "visits": 310, "requests": 720, "bytes": 4200000 }
    ]
  }
}