---
title: "Retrieve Profile Chunks for an Organization"
url: https://docs.sentry.io/api/profiling/retrieve-profile-chunks-for-an-organization/
---

# Retrieve Profile Chunks for an Organization | Sentry Docs

GET /api/0/organizations/{organization\_id\_or\_slug}/profiling/chunks/

Retrieve continuous profiling data for a profiler over a time range.

Exactly one project must be specified via the `project` query parameter.

Requires continuous profiling to be enabled for the organization.

### Path Parameters

* `organization_id_or_slug` *(string)*

  REQUIRED

  The ID or slug of the organization the resource belongs to.

### Query Parameters:

* `project` *(string)*

  REQUIRED

  The ID or slug of the project to fetch chunks for. Exactly one project must be specified.

* `profiler_id` *(string)*

  REQUIRED

  The continuous-profiler ID to fetch chunks for.

* `statsPeriod` *(string)*

  The period of time for the query, will override the start & end parameters, a number followed by one of:

  * `d` for days
  * `h` for hours
  * `m` for minutes
  * `s` for seconds
  * `w` for weeks

  For example, `24h`, to mean query data starting from 24 hours ago to now.

* `start` *(string)*

  The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.

* `end` *(string)*

  The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.

### Scopes

You need to [authenticate via bearer auth token.](https://docs.sentry.io/api/auth.md)

`<auth_token>` requires one of the following scopes:

* `org:admin`
* `org:read`
* `org:write`

```
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/profiling/chunks/ \
 -H 'Authorization: Bearer <auth_token>'
```

RESPONSESCHEMA

```
Copied
{
  "chunk": {
    "chunk_id": "0123456789abcdef0123456789abcdef",
    "profiler_id": "fedcba9876543210fedcba9876543210",
    "project_id": 1,
    "organization_id": 1,
    "environment": "production",
    "platform": "python",
    "release": "1.0.0",
    "received": 1779957840,
    "retention_days": 30,
    "version": "2",
    "profile": {
      "samples": [
        {
          "stack_id": 0,
          "thread_id": "1",
          "timestamp": 1779957840
        }
      ],
      "stacks": [
        [
          0,
          1
        ]
      ],
      "frames": [
        {
          "function": "main",
          "module": "app.main",
          "in_app": true,
          "lineno": 10
        },
        {
          "function": "do_work",
          "module": "app.worker",
          "in_app": true,
          "lineno": 42
        }
      ],
      "thread_metadata": {
        "1": {
          "name": "MainThread"
        }
      }
    }
  },
  "debug_chunk_ids": [
    "0123456789abcdef0123456789abcdef"
  ]
}
```

---

Find other pages: [Sitemap](https://docs.sentry.io/sitemap.md) lists every page with a one-line summary, and [llms.txt](https://docs.sentry.io/llms.txt) gives an overview with guidance for agents.
