---
title: Insights
summary: >-
  The Insights API allows users to analyze insights from sampled logs that are
  collected for the Log Explorer &amp; Insights product.
url: https://www.fastly.com/documentation/reference/api/observability/insights
---

The Insights API allows users to analyze insights from sampled logs that are collected for the Log Explorer &amp; Insights product.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `country_chr` | number | The cache hit ratio for the country. |
| `country_error_rate` | number | The error rate for the country. |
| `country_request_rate` | number | This country's percentage of the total requests. |
| `rate` | number | The rate at which the value in the current dimension occurs. |
| `browser` | string | The client's browser for this dimension. |
| `content_type` | string | The content type of the response for this dimension. |
| `country` | string | The client's country for this dimension. |
| `device` | string | The client's device type for this dimension. |
| `os` | string | The client's operating system for this dimension. |
| `response` | string | The HTTP reason phrase for this dimension. |
| `status-code` | string | The HTTP response code for this dimension. |
| `url` | string | The URL path for this dimension. |
| `meta` | object | Echoes the filters that were supplied in the request. |
| `values` | array |  |
| `filters` | object | The filters that were supplied in the request. |
| `domain_exact_match` | boolean | Value of the <code>domain_exact_match</code> filter as supplied in the request. |
| `end` | string | End time for the query as supplied in the request. |
| `limit` | integer | Number of records per page. |
| `service_id` | string | Specifies the ID of the service for which data should be returned. |
| `start` | string | Start time for the query as supplied in the request. |
| `503_rate_per_url` | number | The rate at which 503 status codes are returned for this URL. |
| `rate_per_url` | number | The rate at which the reason in this dimension occurs among responses to this URL with a 503 status code. |
| `average_bandwidth_bytes` | number | The average bandwidth in bytes for responses to requests to the URL in the current dimension. |
| `bandwidth_percentage` | number | The total bandwidth percentage for all responses to requests to the URL in the current dimension. |
| `browser_version` | string | The version of the client's browser. |
| `cache_hit_ratio` | number | The cache hit ratio for the URL specified in the dimension. |
| `region` | string | The client's country subdivision code as defined by ISO 3166-2. |
| `region_chr` | number | The cache hit ratio for the region. |
| `region_error_rate` | number | The error rate for the region. |
| `average_response_time` | number | The average time in seconds to respond to requests to the URL in the current dimension. |
| `p95_response_time` | number | The P95 time in seconds to respond to requests to the URL in the current dimension. |
| `response_time_percentage` | number | The total percentage of time to respond to all requests to the URL in the current dimension. |
| `miss_rate` | number | The miss rate for requests to the URL in the current dimension. |
| `request_percentage` | number | The percentage of all requests made to the URL in the current dimension. |
| `rate_per_status` | number | The URL accounts for this percentage of the status code in this dimension. |

## API endpoints

### Retrieve log insights

**GET** `/observability/log-insights`

Retrieves statistics from sampled log records.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `domain_exact_match` | boolean | query | No | Determines whether the value in the <code>domain</code> parameter should be treated as a suffix or exact match. When false for suffix match, any request domain ending in the specified value will be considered a match (e.g., <code>foo.com</code> will match <code>a.foo.com</code> and <code>b.foo.com</code> in addition to <code>foo.com</code>). Defaults to true for exact match. |
| `domain` | string | query | No | Limits data to the specified request domain. Defaults to all request domains. |
| `end` | string | query | Yes | Specifies the exclusive end time of the logs to be queried. Must be in valid RFC 3339 format. |
| `limit` | number | query | No | Maximum number of rows to return. Defaults to 10, limited to 100. |
| `pops` | string | query | No | Comma-separated list of Fastly POP codes. Omission defaults to all POPs. |
| `service_id` | string | query | Yes | Specifies the ID of the service for which data should be returned. |
| `start` | string | query | Yes | Specifies the inclusive start time of the logs to be queried. Must be in valid RFC 3339 format. |
| `visualization` | string | query | Yes | Specifies the Log Insights visualization for which data should be returned. |
