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

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

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `field` | string | The log field to which this filter should be applied. |
| `operator` | string | The comparison operator used for this filter. |
| `client_as_number` | integer | The autonomous system (AS) number of the client. (Read-only) |
| `client_browser_name` | string | The name of the browser in use on the client device. (Read-only) |
| `client_browser_version` | string | The version of the browser in use on client device. (Read-only) |
| `client_country_code` | string | The two-letter ISO 3166-1 country code for the client. (Read-only) |
| `client_device_type` | string | The type of the client's device. (Read-only) |
| `client_os_name` | string | The name of the operating system installed on the client device. (Read-only) |
| `client_region` | string | The client's country subdivision code as found in ISO 3166-2. (Read-only) |
| `customer_id` | string | The ID of the Fastly customer that owns the service. (Read-only) |
| `fastly_pop` | string | The name of the Fastly POP that served this request. (Read-only) |
| `is_cache_hit` | boolean | Indicates whether this request was fulfilled from cache. (Read-only) |
| `is_edge` | boolean | Indicates whether the request was handled by a Fastly edge POP. (Read-only) |
| `is_shield` | boolean | Indicates whether the request was handled by a Fastly shield POP. (Read-only) |
| `meta` | object |  |
| `origin_host` | string | The name of the origin host that served this request. (Read-only) |
| `request_host` | string | The name of the request host used for this request. (Read-only) |
| `request_method` | string | HTTP method sent by the client such as "GET" or "POST". (Read-only) |
| `request_path` | string | The URL path supplied for this request. (Read-only) |
| `request_protocol` | string | HTTP protocol version in use for this request. For example, HTTP/1.1. (Read-only) |
| `response_bytes_body` | integer | Body bytes sent to the client in the response. (Read-only) |
| `response_bytes_header` | integer | Header bytes sent to the client in the response. (Read-only) |
| `response_content_length` | integer | Total bytes sent to the client in the response. (Read-only) |
| `response_content_type` | string | The content type of the response sent to the client. (Read-only) |
| `response_reason` | string | The HTTP reason phrase returned for this request, if any. (Read-only) |
| `response_state` | string | The state of the request with optional suffixes describing special cases. (Read-only) |
| `response_status` | integer | The HTTP response code returned for this request. (Read-only) |
| `response_time` | number | The time since the request started in seconds. (Read-only) |
| `response_x_cache` | string | Indicates whether the request was a HIT or a MISS. (Read-only) |
| `service_id` | string | The ID of the service that received the request. |
| `timestamp` | string | Timestamp of the request in ISO 8601 format. |

## API endpoints

### Retrieve log records

**GET** `/observability/log-explorer`

Retrieves log records.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `end` | string | query | Yes | Specifies the exclusive end time of the logs to be queried. Must be in valid RFC3339 format. |
| `filter` | string | query | No | Filter parameters take the form <code>filter[&lt;field&gt;][&lt;op&gt;]=&lt;value&gt;</code>. For example, <code>filter[response_time][gte]=0.5</code> would filter for logs where the response time was greater than or equal to 0.5 seconds. Multiple filter expressions can be combined. The filters will be combined with a logical AND operator so that the logs returned match all supplied filters. Supported filter fields include <code>domain</code>, <code>request_path</code>, <code>fastly_pop</code>, <code>response_time</code>, <code>response_status</code>, <code>fastly_is_shield</code>, <code>fastly_is_edge</code>, <code>client_os_name</code>, <code>client_device_type</code>, <code>client_browser_name</code>, and <code>fastly_is_cache_hit</code>. Supported filter operators include <code>=</code> (applicable to string, numeric, and boolean values), <code>ends-with</code> (applicable to string values), <code>in</code> (applicable to lists of string and numeric values), <code>not_in</code> (applicable to lists of string and numeric values), and <code>gt</code>, <code>gte</code>, <code>lt</code>, <code>lte</code> (applicable to numeric values). |
| `limit` | number | query | No | Maximum number of rows to return. Defaults to 10, limited to 100. |
| `next_cursor` | string | query | No | A cursor to specify the next page of results in a paginated query. Must be specified with the same parameters as the original query or results may be inconsistent. |
| `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 RFC3339 format. |
