# Analytics API

Source: https://swapcard.dev/analytics-api/about-the-graphql-api


Download the raw analytics data of your events: every page view, meeting, message, connection and bookmark, one action per line.

## What you can do

| Use case | Start with |
| --- | --- |
| Export all user actions for an event and a time range | [Export analytics data](export/graphql-analytics-api-export.mdx) |
| Track page views, searches and session video streams | [Page views](export/actions/views.mdx) |
| Measure meeting requests and meetings | [Meetings](export/actions/meetings.mdx) |
| Measure networking: connections and connection requests | [Connections](export/actions/connection.mdx) |
| Count chat messages and video calls | [Chat](export/actions/chat.mdx) |
| See which exhibitors, sessions and products users bookmark | [Bookmarks](export/actions/bookmarks.mdx) |

## Endpoint
Unlike the Content API, the Analytics API is not a GraphQL API. It has a single HTTP endpoint, and every export is a `POST` to:

```sh
https://developer.swapcard.com/event-admin/export/analytics
```

## How the export works
- You send a JSON body with the IDs of your events and a time range (`time_gt` and `time_lt`, both required).
- The response is a stream of newline-separated JSON objects, ordered from the least to the most recent.
- Each JSON object is one action a user performed on the platform, such as viewing an exhibitor or accepting a meeting.
- Each object contains a `cursor`. Send it in your next request to retrieve all the actions that come after it.
- Without a `limit`, the stream is potentially infinite.

See [Export analytics data](export/graphql-analytics-api-export.mdx) for the full request and response reference.

## Authentication

Send an API key created in Swapcard Studio in the `Authorization` header. See [Authentication](/organizer/authentication).

## Get started

- **Make your first export:** follow [Export analytics data](export/graphql-analytics-api-export.mdx).
- **Find an action name:** browse the action types, starting with [Page views](export/actions/views.mdx).
- **Questions about the numbers?** Read the [Analytics API FAQ](/faqs/analytics-api).

## Limits and versioning

- Data is delayed by 10 minutes, and the time range filters affect performance. See [Limits and data delay](graphql-analytics-api-limitations.md).
- Changes to the API are announced in the [Changelog](graphql-analytics-api-changelog.md) and follow the [versioning and deprecation policy](/deprecation-policy).
