WebmeticDocs

Visits

GET
/session

Retrieves detailed session information for a specified domain within a given time range.

This endpoint provides comprehensive data about user sessions, including technical details about the user's device, browser, and interaction with the website. It also includes company identification for each session.

Parameters:

  • domain (str): The domain name for which you want to retrieve session information.
  • from_date (str, optional): The starting date and time for the session data range. Accepts ISO 8601 format or relative dates like '-30 days'. Default is '-30 days'.
  • to_date (str, optional): The ending date and time for the session data range. Accepts ISO 8601 format or 'now' for the current date and time. Default is 'now'.
  • page (int, optional): The page number of results to retrieve. Default is 1.
  • page_size (int, optional): The number of entries to retrieve per page, up to 10000. Default is 10000.

Returns: A JSON object containing:

  1. Pagination information:
  • total: Total number of session entries
  • page_total: Total number of pages
  • isFirst: Boolean indicating if it's the first page
  • current: Current page number
  • isLast: Boolean indicating if it's the last page
  • page_size: Number of entries per page
  1. Result: An array of session objects, each containing:
  • company_id: Unique identifier for the company associated with the session
  • company_name: Name of the company associated with the session
  • session_id: Unique identifier for the session
  • client_id: Unique identifier for the client
  • aid: Account identifier
  • weburl: URL of the website visited
  • timestamp: Date and time when the session occurred
  • user_agent: Full user agent string
  • platform: Operating system platform
  • screen_resolution: Screen resolution of the user's device
  • color_depth: Color depth of the user's screen
  • viewport: Viewport size of the browser
  • cookies_enabled: Boolean indicating if cookies are enabled
  • connection_type: Type of internet connection (e.g., 4g, wifi)
  • color_scheme: Color scheme preference (e.g., light, dark)
  • user_language: User's preferred language
  • utm_source: UTM source parameter
  • utm_medium: UTM medium parameter
  • gci: Google Click Identifier
  • gsi: Google Session Identifier
  • gsn: Google Session Number
  • user_agent_browser: Object containing browser family and version
  • user_agent_os: Object containing OS family and version
  • user_agent_device: Object containing device family
  • user_agent_category: Category of the user agent (e.g., desktop, mobile)
  • session_duration: Total duration of the session
  • session_time: Average time per page view of the session, in seconds

Note: This endpoint is rate-limited to 1 request per second.

Authentifizierung

APIKeyHeader
headerAuthorization<token>

Query-Parameter

domain*Domain
from_date?From Date

Starting DateTime format or relative dates like '-30 days', '-1 hour', '-5 minutes'. Examples: '2023-01-01', '-7 days', '-12 hours', '-5 minutes', 'now'

Standard"-30 days"
to_date?To Date

Ending DateTime format or 'now' for the current date/time. Examples: '2023-01-31', 'now'

Standard"now"
page?Page

Selected result page, starting at 1

Bereich1 <= value
Standard1
page_size?Page Size

Number of entries per page, from 1 up to a maximum of 10000

Bereich1 <= value <= 10000
Standard10000

Response-Body

One entry per visit; missing fields are absent

application/json
  1. response
pagination*array<>

Always one entry

result*array<>

One entry per visit

Beispielanfrage
curl -X GET 'https://hub.webmetic.de/session?domain=website.example'
Beispielantwort
{  "pagination": [    {      "total": 1,      "page_total": 1,      "isFirst": true,      "current": 1,      "isLast": true,      "page_size": 10000    }  ],  "result": [    {      "session_id": "01K8B3QW5N7M2XRT4HZJ6C9D0E",      "client_id": "3b7e0c55d2a94f18b6c1e0a7d9f42c86e15b0a3d7c9e2f41a8b6d03c5e7f9a12",      "timestamp": "2026-10-20T08:20:26.384000",      "weburl": "https://nordhafen.example",      "utm_source": "google",      "utm_medium": "cpc",      "utm_campaign": "dampfkessel",      "session_duration": 152,      "session_time": 76,      "session_engagement": 111,      "user_agent_browser": {        "family": "Chrome",        "version": "130.0.0"      },      "user_agent_os": {        "family": "Windows",        "version": "11"      },      "user_agent_category": "desktop",      "visitor_city": "Freising",      "visitor_country": "Deutschland",      "visitor_zip": "85354",      "visitor_country_code": "DE",      "company_id": "41ea486a9c95",      "company_name": "Bergquell Mineralbrunnen GmbH"    }  ]}