---
title: "Get visitor by GUID with geolocation data"
method: GET
path: "/analytics/visitors/guid/{visitor_id}"
tags: ["Analytics"]
---

# Get visitor by GUID with geolocation data

`GET /analytics/visitors/guid/{visitor_id}`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/analytics/visitors/guid/{visitor_id}`
- Auth: HTTP bearer

## Path parameters

- `visitor_id` string, required

## Query parameters

- `project_id` integer, required
- `environment_id` integer

## Response `200`

Successfully retrieved visitor with geolocation

- VisitorWithGeolocation
  - `city` string, nullable
  - `country` string, nullable
  - `country_code` string, nullable
  - `crawler_name` string, nullable
  - `custom_data` unknown
  - `environment_id` integer, nullable
  - `first_channel` string, nullable: Marketing channel from the first visit (e.g. "Organic Search", "Direct")
  - `first_referrer` string, nullable: Full referrer URL from the visitor's first session
  - `first_referrer_hostname` string, nullable: Hostname extracted from first_referrer
  - `first_seen` string, date-time, required
  - `id` integer, required
  - `ip_address` string, nullable
  - `is_crawler` boolean, required
  - `is_eu` boolean, nullable
  - `last_seen` string, date-time, required
  - `latitude` number, double, nullable
  - `longitude` number, double, nullable
  - `project_id` integer, required
  - `region` string, nullable
  - `timezone` string, nullable
  - `user_agent` string, nullable
  - `visitor_id` string, required

## Other responses

- `400`: Invalid parameters or project not found
- `404`: Visitor not found
- `500`: Internal server error

## Changes

- **2026-11-25** `cd7fa5283777`: 2 breaking
  - the response property `environment_id` became nullable for the status `200`
  - the response property `environment_id` became optional for the status `200`
- **2026-04-25** `774be20905f2`: 3 info
  - added the optional property `first_channel` to the response with the `200` status
  - added the optional property `first_referrer` to the response with the `200` status
  - added the optional property `first_referrer_hostname` to the response with the `200` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/analytics/visitors/guid/:visitor_id/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
