---
title: "Export sites to CSV"
method: GET
path: "/api/v1/sites/export/csv"
tags: ["Sites"]
---

# Export sites to CSV

`GET /api/v1/sites/export/csv`

## Request

- Base URL: `https://app.scanopy.net`
- URL: `https://app.scanopy.net/api/v1/sites/export/csv`
- Auth: one of:
  - API key in header `Authorization`
  - API key in cookie `session_id`

Export all sites matching the filter criteria to CSV format. Ignores pagination parameters (limit/offset) and exports all matching records.

## Query parameters

- `credential_ids` string[], nullable
- `effective_stale_after_hours` integer[], nullable
- `tag_ids` string[], nullable
- `tag_sets` string[], nullable
- `search` string, nullable
- `group_by` 'created_at' | 'name' | 'updated_at' | 'effective_stale_after_hours': Fields the sites list can be ordered and grouped by.
- `order_by` 'created_at' | 'name' | 'updated_at' | 'effective_stale_after_hours': Fields the sites list can be ordered and grouped by.
- `group_by_tag_group` string, uuid, nullable
- `order_by_tag_group` string, uuid, nullable
- `order_direction` 'asc' | 'desc': Direction for ORDER BY clauses.
- `limit` integer, nullable
- `offset` integer, nullable

## Response `200`

CSV file containing Sites

## Changes

- **2026-10-23** `c9f50be8bc26`: 10 info
  - added the new optional `query` request parameter `credential_ids`
  - added the new optional `query` request parameter `effective_stale_after_hours`
  - added the new optional `query` request parameter `group_by`
  - added the new optional `query` request parameter `group_by_tag_group`
  - …6 more
- **2026-10-11** `a6ea2ab6fbb9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scanopy/apis/scanopy-api/changes/api/v1/sites/export/csv/get.md)

---

[API](https://skmtc.dev/scanopy/apis/scanopy-api.md) - [All operations](https://skmtc.dev/scanopy/apis/scanopy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scanopy/apis/scanopy-api/revisions/966ba786bdb5?raw)
