> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.pixalate.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.pixalate.com/_mcp/server.

# Get analytics reports metadata and quota status

GET https://api.pixalate.com/api/v2/analytics/reports

The purpose of this API is to provide metadata information for analytics reports in general. The response is a JSON formatted object containing the current user's quota state and the date the analytics reports database was last updated.

Reference: https://docs.pixalate.com/api-reference/analytics-reports/get-analytics-reports-metadata

## Authentication

- `x-api-key` header (required) — Authentication and authorization is achieved by supplying your Pixalate provided API key in the header of the request. An API key may be obtained by signing up for an account on the [Pixalate developer website](https://developer.pixalate.com).As of April 2023, Pixalate supports an API-key based authentication method for the Analytics Report API. If you have been provided with username and password credentials during your onboarding to access the Report API, please visit our documentation here to get started. If you have been provided with an API key, the documentation on this page will guide you on how to integrate.

## Request

### Query parameters

- `pretty` (boolean, optional) — If true, return pretty JSON. Default is false.

## Response

### 200

OK

- `database` (MetadataDatabase, optional) — Analytics Reports database state information.
- `quota` (MetadataQuota, optional) — Quota state information.

## Errors

### 400 Bad Request Error

Bad Request - Invalid parameters in request.

- `any`

### 401 Unauthorized Error

Unauthorized - Invalid API Key.

- `any`

### 403 Forbidden Error

Forbidden - Rate plan expired or quota has been exhausted.

- `any`

### 500 Server Error

Server Error - The API experienced an internal error. Contact support.

- `any`

## Types

### MetadataDatabase

Analytics Reports database state information.

- `lastUpdated` (date, optional) — The date when the Analytics Reports database was last updated. The date format is *YYYY-MM-DD*.

### MetadataQuota

Quota state information.

- `available` (integer, optional) — The amount of quota available for use.
- `used` (integer, optional) — The amount of quota used.
- `expiry` (date, optional) — The datetime when the quota will be refreshed back to the limit. The datetime format is *YYYY-MM-DDTHH:MM:SS.SSSZ*.
- `limit` (integer, optional) — The amount of quota to be made available for use when the quota is refreshed.
- `interval` (integer, optional) — The number of time units used in calculating the quota refresh datetime.
- `timeUnit` (enum, optional) — The time unit used in calculating the quota refresh datetime.
  - Allowed values: `minute`, `hour`, `day`, `week`, `month`

## Examples

**Response**

```json
{
  "database": {
    "lastUpdated": "2022-04-30"
  },
  "quota": {
    "available": 480,
    "used": 520,
    "expiry": "2022-05-01T12:45:23.234Z",
    "limit": 1000,
    "interval": 1000,
    "timeUnit": "month"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.pixalate.com/api/v2/analytics/reports"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.pixalate.com/api/v2/analytics/reports';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.pixalate.com/api/v2/analytics/reports"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.pixalate.com/api/v2/analytics/reports")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.pixalate.com/api/v2/analytics/reports")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.pixalate.com/api/v2/analytics/reports', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.pixalate.com/api/v2/analytics/reports");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.pixalate.com/api/v2/analytics/reports")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```