---
title: Read Exposure Event Count
description: Get the count of exposure events recently received by Statsig.
product: general
lang: en
token_estimate: 1349
---
# Read Exposure Event Count

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## Read Exposure Event Count

**GET** `/console/v1/exposure_count`

Full URL: `https://statsigapi.net/console/v1/exposure_count`

Read Exposure Event Count

Get the count of exposure events recently received by Statsig.

## Authorizations

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| STATSIG-API-KEY | string | Yes | — | apiKey (header) |

## Query parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| experiments (query) | oneOf | No | — | Constraints: string, string[] |
| gates (query) | oneOf | No | — | Constraints: string, string[] |
| dynamicConfigs (query) | oneOf | No | — | Constraints: string, string[] |

## Response (application/json)

**200** — Get Experiment Success

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| message | string | Yes | — | A simple string explaining the result of the operation. |
| data | object | Yes | — | — |
| data.gates | object[] | Yes | — | ids of gates to query (max 25) |
| data.gates.id | string | Yes | — | — |
| data.gates.pastDay | number | Yes | — | — |
| data.gates.past7Days | number | Yes | — | — |
| data.experiments | object[] | Yes | — | ids of experiments to query (max 25) |
| data.experiments.id | string | Yes | — | — |
| data.experiments.pastDay | number | Yes | — | — |
| data.experiments.past7Days | number | Yes | — | — |
| data.dynamicConfigs | object[] | Yes | — | ids of dynamic configs to query (max 25) |
| data.dynamicConfigs.id | string | Yes | — | — |
| data.dynamicConfigs.pastDay | number | Yes | — | — |
| data.dynamicConfigs.past7Days | number | Yes | — | — |

```json
{
  "message": "Exposure count fetched successfully.",
  "data": {
    "gates": [
      {
        "id": "a_gate",
        "pastDay": 0,
        "past7Days": 98
      }
    ],
    "experiments": [
      {
        "id": "my_experiment",
        "pastDay": 102,
        "past7Days": 558
      },
      {
        "id": "another_experiment",
        "pastDay": 5904,
        "past7Days": 2078
      }
    ],
    "dynamicConfigs": [
      {
        "id": "dc_limit",
        "pastDay": 240830,
        "past7Days": 1329945
      }
    ]
  }
}
```

**400** — Invalid request. Please check the request input and try again.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 400 |
| message | string | Yes | — | — |

```json
{
  "status": 400,
  "message": "Data is not available"
}
```

**401** — This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 401 |
| message | string | Yes | — | — |

```json
{
  "status": 401,
  "message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}
```

## Code samples

### cURL

```bash
curl -X GET "https://statsigapi.net/console/v1/exposure_count" \
  -H "Content-Type: application/json" \
  -H "STATSIG-API-KEY: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.get(
    "https://statsigapi.net/console/v1/exposure_count",
    headers={
        "Content-Type": "application/json",
        "STATSIG-API-KEY": "YOUR_API_KEY"
    }
)
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://statsigapi.net/console/v1/exposure_count", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "STATSIG-API-KEY": "YOUR_API_KEY"
  }
});
const data = await response.json();
```

### PHP

```php
<?php
$ch = curl_init("https://statsigapi.net/console/v1/exposure_count");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "STATSIG-API-KEY: YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
```

### Go

```go
package main

import (
  "bytes"
  "net/http"
)

func main() {
req, _ := http.NewRequest("GET", "https://statsigapi.net/console/v1/exposure_count", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("STATSIG-API-KEY", "YOUR_API_KEY")
  client := &http.Client{}
  resp, _ := client.Do(req)
  defer resp.Body.Close()
}
```

### Java

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://statsigapi.net/console/v1/exposure_count"))
      .method("GET", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
      .header("STATSIG-API-KEY", "YOUR_API_KEY")
      .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```ruby
require "net/http"
require "json"

uri = URI("https://statsigapi.net/console/v1/exposure_count")
request = Net::HTTP::Get.new(uri)
request["Content-Type"] = "application/json"
request["STATSIG-API-KEY"] = "YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
```

