> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linquid.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Geographic Analytics

> Country, region, city, and map-oriented geographic analytics endpoints

# Geographic Analytics

These routes drive geographic distribution cards and location tables.

## Endpoints

### Workspace geography

* `GET /api/analytics/workspace/regions`
* `GET /api/analytics/workspace/continents`
* `GET /api/analytics/city/breakdown`
* `GET /api/analytics/workspace/coordinates`

### Link geography

* `GET /api/analytics/:linkId/geo`
* `GET /api/analytics/:linkId/cities`
* `GET /api/analytics/:linkId/regions`
* `GET /api/analytics/:linkId/continents`
* `GET /api/analytics/:linkId/coordinates`

## Query parameters

<ParamField query="days" type="number" default="30">
  Date range window.
</ParamField>

<ParamField query="limit" type="number" default="50">
  Maximum rows returned (server-side caps apply).
</ParamField>

<ParamField query="country" type="string">
  Region drill-down filter (`workspace/regions` only).
</ParamField>

<ParamField query="campaignId" type="string">
  Optional scope filter on routes that support campaign filtering (for example city breakdown).
</ParamField>

<ParamField query="linkId" type="string">
  Optional scope filter on workspace-level endpoints that support link filtering.
</ParamField>

## Request example

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.linquid.io/api/analytics/workspace/regions?days=30&country=US&limit=20" \
    -H "Authorization: Bearer <session_or_api_key>" \
    -H "X-Workspace-Id: ws_123"
  ```
</RequestExample>

## Response example

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": [
      {
        "country": "US",
        "dimension": "California",
        "clicks": 5200,
        "unique_clicks": 4110,
        "percentage": 41.5
      }
    ]
  }
  ```
</ResponseExample>

## Notes

* Geographic rows return click totals and percentages for the selected window.
* Map coordinate endpoints may return empty arrays when coordinate pipelines are not enabled for your dataset.
* Use link-scoped routes for per-link geo diagnostics; use workspace routes for top-level distribution.
