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

# Get usage

> Get daily usage counts for a business to build charts and reports.

Returns the number of analyses per day for a date range. Use it to build usage charts and reports.

## Path parameters

**business\_id** `integer` *required*

ID of the business.

## Query parameters

**from** `string`

Start date of the range, `YYYY-MM-DD`. Records on or after this date are included.

**to** `string`

End date of the range, `YYYY-MM-DD`. Records on or before this date are included.

## Response

**status** `boolean`

`true` when the request succeeds.

**data.used** `object[]`

One entry per day.

**day**

**date** `string`

Date, `YYYY-MM-DD`.

**count** `integer`

Number of analyses on that date.

```bash cURL theme={null}
curl --request GET 'https://core.getfaceage.com/api/v1/business/usage/{business_id}?from=2024-01-01&to=2024-01-30' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer your_secret_key'
```

```json 200 theme={null}
{
  "status": true,
  "data": {
    "used": [
      { "date": "2024-01-01", "count": 1 },
      { "date": "2024-01-02", "count": 1 },
      { "date": "2024-01-03", "count": 11 },
      { "date": "2024-01-04", "count": 0 },
      { "date": "2024-01-05", "count": 1 }
    ]
  }
}
```

```json 422 theme={null}
{
  "status": false,
  "message": "business id is not valid"
}
```

```json 401 theme={null}
{
  "message": "Unauthenticated."
}
```


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