> For the complete documentation index, see [llms.txt](https://docs.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carto.com/carto-for-developers/reference/carto-api/activity-data-api.md).

# Activity Data API

Export activity and API usage data.

Export what happened in your organization — who did what, and how much API usage it drove — as CSV or Parquet, for auditing or for loading into your own analytics.

Request a range, poll the job, then download from the returned URLs before they expire.

| Endpoint                                    | What it does                |
| ------------------------------------------- | --------------------------- |
| `POST /activity-data-jobs`                  | Create an activity data job |
| `GET /activity-data-jobs/{jobId}`           | Get an activity data job    |
| `DELETE /activity-data-jobs/{jobId}/cancel` | Cancel an activity data job |

{% hint style="warning" %}
These endpoints live on the **accounts host** — `https://accounts.app.carto.com` — not on your regional API Base URL, and their paths have **no `/v3` prefix**.
{% endhint %}

{% hint style="info" %}
These endpoints need an **OAuth Access Token** from an **Admin** or **Superadmin** user. See [Authorization](https://docs.carto.com/carto-for-developers/reference/carto-api.md#authorization).
{% endhint %}

## Picking a time range

The range must be under **60 days**, start after your account was created, and end no later than the most recent ready data. Data for a day becomes available at **05:00 UTC** the following day, so a range ending today usually fails until then.

For a longer history, request consecutive ranges and stitch the exports together.

## Endpoints

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/activity-data-jobs" method="post" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/activity-data-jobs/{jobId}" method="get" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}

{% openapi src="<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>" path="/activity-data-jobs/{jobId}/cancel" method="delete" %}
<https://openapi.gitbook.com/o/zP3LT2Qhlb5jPWQCfWV3/spec/carto-api>
{% endopenapi %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.carto.com/carto-for-developers/reference/carto-api/activity-data-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
