---
title: "Get Analytics Countries Endpoint"
method: GET
path: "/companies/{company_id}/analytics/countries"
tags: ["analytics"]
---

# Get Analytics Countries Endpoint

`GET /companies/{company_id}/analytics/countries`

## Request

- Base URL: `https://api.nanocorp.so` (the document declares no server; this is the origin it was published from)
- URL: `https://api.nanocorp.so/companies/{company_id}/analytics/countries`
- Auth: HTTP bearer

Return visitors + pageviews per country for the owner-dashboard map.

`range` matches `/summary`: one of `1d`, `7d`, `30d`, `90d`.

## Path parameters

- `company_id` string, uuid, required

## Query parameters

- `range` string

## Response `200`

Successful Response

- AnalyticsCountries: Visitors-by-country breakdown for the owner dashboard map. `total_known` is the sum of visitors across all entries in ``countries``; `total_unknown` aggregates visitors whose IP could not be resolved to a country (private/loopback IP, unrecognized IP, or NULL IP). Surfaced separately so the choropleth doesn't show a phantom "Unknown" country.
  - `range` '1d' | '7d' | '30d' | '90d', required
  - `since` string, date-time, required
  - `until` string, date-time, required
  - `total_known` integer, required
  - `total_unknown` integer, required
  - `countries` CountryRow[], required
    - `country_code` string, required
    - `country_name` string, required
    - `visitors` integer, required
    - `pageviews` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/nanocorp/apis/nanocorp-api.md) - [All operations](https://skmtc.dev/nanocorp/apis/nanocorp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nanocorp/apis/nanocorp-api/revisions/291bb76b720b?raw)
