---
title: Get chart
description: "Returns chart metadata. The chart definition is omitted by default. Set include definition=true to include a read-only definition object. The definition shap…"
product: general
token_estimate: 1617
---
# Get chart

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

## Get chart

**GET** `/v1/projects/{project_id}/charts/{chart_id}`

Full URL: `https://developer-api.amplitude.com/v1/projects/{project_id}/charts/{chart_id}`

**Servers:**
- Production: `https://developer-api.amplitude.com/v1/projects/{project_id}/charts/{chart_id}`
- Staging: `https://developer-api.stag2.amplitude.com/v1/projects/{project_id}/charts/{chart_id}`

Get chart

Returns chart metadata. The chart definition is omitted by default. Set
`include_definition=true` to include a read-only definition object. The
definition shape is unstable and not intended for authoring.

## Authorizations

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| Authorization | string | Yes | — | http |

## Path parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| project_id (path) | string | Yes | 12345 | Amplitude project identifier, backed by the canonical app ID. Constraints: pattern: ^[0-9]+$ |
| chart_id (path) | string | Yes | — | Saved chart identifier. Constraints: min length: 1 |

## Query parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| include_definition (query) | boolean | No | false | When true, include the read-only chart definition on GET chart. The definition shape is unstable and not intended for authoring. |

## Response (application/json)

**200** — Successful response.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| data | object | Yes | — | — |
| data.id | string | Yes | — | Stable chart identifier. |
| data.object | string | Yes | — | Resource-type discriminator. Always `chart`. |
| data.project_id | string | Yes | — | Constraints: pattern: ^[0-9]+$ |
| data.name | string | Yes | — | — |
| data.description | string | No | — | Constraints: nullable |
| data.chart_type | string | Yes | — | Public chart type discriminator (snake_case). All values may appear on list/get; query returns `422` (`unsupported_chart_type`) for types outside the v1 supported matrix. Unsupported or unrecognized chart types are surfaced as `unknown`. New chart types may be added over time. Clients should treat `unknown` as "a chart type this API version does not model yet". Allowed values: event_segmentation, sessions, funnels, retention, composition, revenue_ltv, stickiness, data_table, engagement_matrix, metric_explorer, growth_accounting, impact, users, unknown |
| data.created_at | string | Yes | — | ISO-8601 creation time, or `null` when unavailable. Constraints: format: date-time, nullable |
| data.updated_at | string | Yes | — | ISO-8601 last-modified time, or `null` when unavailable. Constraints: format: date-time, nullable |
| data.created_by | string | No | — | Chart creator. The creator's email when available, otherwise a login identifier; `null` when the creator cannot be resolved. Constraints: nullable |
| data.url | string | Yes | — | Deep link to the chart in the Amplitude UI. Constraints: format: uri |
| data.archived | boolean | Yes | — | Whether the chart is archived. |
| data.definition | object | No | — | Read-only chart definition. Returned only when `include_definition=true` on GET chart. Shape is unstable and may change between API versions; not intended for authoring. |

```json
{
  "data": {
    "id": "string",
    "object": "chart",
    "project_id": "string",
    "name": "string",
    "description": "string",
    "chart_type": "event_segmentation",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z",
    "created_by": "string",
    "url": "https://example.com",
    "archived": true,
    "definition": {}
  }
}
```

**400**

**401**

**403**

**404**

**429**

**500**

## Code samples

### cURL

```bash
curl -X GET "https://developer-api.amplitude.com/v1/projects/12345/charts/{chart_id}?include_definition=false" \
  -H "Content-Type: application/json" \
  -H "Authorization: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.get(
    "https://developer-api.amplitude.com/v1/projects/12345/charts/{chart_id}?include_definition=false",
    headers={
        "Content-Type": "application/json",
        "Authorization": "YOUR_API_KEY"
    }
)
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://developer-api.amplitude.com/v1/projects/12345/charts/{chart_id}?include_definition=false", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "YOUR_API_KEY"
  }
});
const data = await response.json();
```

### PHP

```php
<?php
$ch = curl_init("https://developer-api.amplitude.com/v1/projects/12345/charts/{chart_id}?include_definition=false");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "Authorization: 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://developer-api.amplitude.com/v1/projects/12345/charts/{chart_id}?include_definition=false", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "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://developer-api.amplitude.com/v1/projects/12345/charts/{chart_id}?include_definition=false"))
      .method("GET", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
      .header("Authorization", "YOUR_API_KEY")
      .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
```

### Ruby

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

uri = URI("https://developer-api.amplitude.com/v1/projects/12345/charts/{chart_id}?include_definition=false")
request = Net::HTTP::Get.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
```

