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

# Get traffic headline

> Revenue, visitors, completed checkouts and conversion rate, each against the previous period.

Revenue, visitors, completed checkouts and conversion rate for a range. Each figure comes with the previous period of the same length. Available on every plan.

Call this from your server with a `pk_` key. See [Store data overview](https://docs.khaime.com/api-reference/store-data/overview.md) for keys, errors and how to read empty values.

## Parameters

| Name | Type | Required | Description |
| - | - | - | - |
| `range` | string | No | `today`, `7d`, `30d` or `90d`. Default `30d`. |

## Request

```bash theme={null}
curl -H "X-API-Key: $KHAIME_API_KEY" \
  "https://api.khaime.com/api/v1/analytics/headline?range=7d"
```

## Response

```json theme={null}
{
  "message": "Headline retrieved",
  "success": true,
  "status": true,
  "data": {
    "environment": "live",
    "range": "7d",
    "currency": "USD",
    "other_currencies": [
      {
        "currency": "NGN",
        "amount": 1250000
      }
    ],
    "revenue": {
      "current": 116071,
      "previous": 98000,
      "change_percent": 18.4
    },
    "completed_checkout": {
      "current": 14,
      "previous": 12,
      "change_percent": 16.7
    },
    "conversion_rate": 2.3,
    "visitors": {
      "current": 602,
      "previous": 540,
      "change_percent": 11.5,
      "tracked": true
    }
  }
}
```

## Read it correctly

* `revenue` is in hundredths of `currency`. `other_currencies` lists other currencies separately. They are never added to `revenue`.
* `change_percent` is `null` when the previous period was empty.
* `conversion_rate` is a percentage, or `null` when it cannot be measured. It is not 0.
* `visitors.tracked` is `false` when no tracker is running. All `visitors` figures are then `null`.
* Visitors are not split into live and sandbox. Revenue and checkouts are.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.