---
title: "Export a collection"
method: POST
path: "/exports"
tags: ["Exports"]
---

# Export a collection

`POST /exports`

## Request

- Base URL: `https://api.gmaps.dev/v1`
- URL: `https://api.gmaps.dev/v1/exports`
- Auth: HTTP bearer

Get a link to a collection's places as one file: csv, json or xlsx. The file has the places the collection holds now, even if it is still running. The link opens without an API key for 24 hours, so share it only with people who should see the file. Needs an API key. Costs no credits.

## Request body

- object
  - `collectionId` string, uuid, required: The collection to export, as create_collection or search_places returned it.
  - `format` 'csv' | 'json' | 'xlsx': The file type: csv, json or xlsx. An xlsx file holds up to 50,000 places.
  - `locale` 'en' | 'pt-BR': The language of the column names in csv and xlsx files: en or pt-BR. Defaults to your account's language.

## Response `201`

Export a collection

- object
  - `data` object, required
    - `id` string, uuid, required: Our id for the export. get_export takes it.
    - `collectionId` string, uuid, required: The collection the file is built from.
    - `format` 'csv' | 'json' | 'xlsx', required: The file type: csv, json or xlsx.
    - `locale` 'en' | 'pt-BR', required: The language of the column names in csv and xlsx files.
    - `rows` integer, required: The places the collection held when the export was made. A place whose business asked to be left out since then is not in the file, so it can hold fewer.
    - `url` string, uri, required: Opens the file without an API key, until `expiresAt`. Treat it like a password.
    - `createdAt` string, date-time, required: When you made the export.
    - `expiresAt` string, date-time, required: When `url` stops working, 24 hours after `createdAt`.
  - `meta` union
    - object
      - `total` integer, required: Every item that matches, not just this page.
      - `limit` integer, required: The most items a page holds.
      - `offset` integer, required: How many items came before this page.
      - `hasMore` boolean, required: True when another page follows.
    - object
      - `cost` integer, required: Credits this call took.
      - `creditsRemaining` integer, required: Credits left after this call, this month's and bought ones together.
      - `requestId` string, required: This call's id. Send it to support if something went wrong.
      - `cached` boolean: True when this response used only saved results.

## Other responses

- `default`: Any other failure.

---

[API](https://skmtc.dev/gmaps/apis/gmaps-dev.md) · [All operations](https://skmtc.dev/gmaps/apis/gmaps-dev/llms.txt) · [OpenAPI document](https://skmtc.dev/gmaps/apis/gmaps-dev/revisions/0b3459aaf802?raw)
