# Export microCMS to CSV or JSON: Fetch All Content and Move Images

Published: 2026-10-23 | Updated: 2026-10-23 | URL: https://blog.genko.me/en/microcms-export-csv

> Export every microCMS item with CSV or the JavaScript SDK. Learn pagination, JSON-to-CSV conversion, media backups, and migration to genko.me.

To export microCMS content, use the dashboard’s CSV export on Team or higher, or fetch every item through the Content API with the JavaScript SDK’s `getAllContents` method. Hobby users can retrieve JSON through the API and convert it to CSV themselves. Save API schemas and actual image or file downloads separately from content records.

This article is written by the genko.me team. We checked the official documentation on October 23, 2026. microCMS’s built-in CSV workflow is useful for teams that want spreadsheet exports without maintaining a script; exporting data does not require switching CMS products.

## Can microCMS export CSV from the dashboard?

[Official CSV export documentation](https://document.microcms.io/manual/csv-export) lists Team, Business, and Enterprise as supported plans. Hobby does not include this dashboard feature. Content export and API schema export are separate operations.

1. Open the content list for the API you want to export.
2. Choose “All Contents” for a complete export and clear search terms and filters.
3. Select CSV Export, check the export name and scope, and start the job.
4. Download the result from the completion email. The link works only for the user who started the export and expires after 24 hours.

The active view’s conditions and sort order determine what is exported. An item that is both published and being edited appears as two rows sharing an ID: one published version and one draft version. Count unique IDs separately from rows. References or other values that the exporting user cannot read can appear as `NO_READ_PERMISSION`. Avoid editing during the export because changes may affect the result.

| What you need | Export route | What to check |
| --- | --- | --- |
| Content for spreadsheets | Dashboard CSV | Plan, view conditions, permissions |
| Structured content | Content API JSON | Each API’s count and private content |
| Field definitions | API schema JSON | It does not contain article bodies |
| Images and files | Download from asset URLs | A URL is not a saved file |

## How do you fetch all microCMS content beyond 100 items?

The [list endpoint](https://document.microcms.io/content-api/get-list-contents) is `GET https://{service}.microcms.io/api/v1/{endpoint}`. Its default `limit` is 10 and its maximum is 100. Setting `limit=1000` is not a way to retrieve every record.

For manual pagination, request `limit=100` with `offset=0`, then `offset=100`, then `offset=200`. Append each response’s `contents` array. Stop when the next starting position reaches or exceeds `totalCount`, which counts items matching the request conditions. Leave out `filters` and `q` for an unfiltered export, and avoid `fields` when the goal is preserving every field.

### Export every item to JSON with TypeScript

The [official JavaScript SDK](https://github.com/microcmsio/microcms-js-sdk) provides `getAllContents({ endpoint, queries?, customRequestInit? })`. It returns an array and handles pagination. Its `queries` type excludes `limit`, `offset`, and `ids`.

The example below targets list APIs. Use `getObject` separately for an object API, such as a single site settings record. In a working directory using Node.js 22 or newer, install the SDK and script runner:

```bash
npm install microcms-js-sdk
npm install --save-dev tsx
```

Save this as `export.ts`. Supply the three environment variables through your execution environment or its secret settings. Keep credentials out of the script and Git.

```typescript
import { writeFile } from "node:fs/promises";
import { createClient } from "microcms-js-sdk";

async function main() {
  const serviceDomain = process.env.MICROCMS_SERVICE_DOMAIN;
  const apiKey = process.env.MICROCMS_API_KEY;
  const endpoint = process.env.MICROCMS_ENDPOINT;
  if (!serviceDomain || !apiKey || !endpoint) {
    throw new Error("Missing microCMS environment variables");
  }
  const client = createClient({ serviceDomain, apiKey, retry: true });
  const contents = await client.getAllContents<Record<string, unknown>>({
    endpoint,
    queries: { depth: 0 },
  });
  await writeFile("export.json", JSON.stringify({ contents }, null, 2) + "\n");
  console.log(`Exported ${contents.length} items`);
}
main().catch((error) => {
  console.error("Export failed:", error instanceof Error ? error.message : error);
  process.exitCode = 1;
});
```

Run it after setting `MICROCMS_SERVICE_DOMAIN` to the service name, rather than the full URL, and `MICROCMS_ENDPOINT` to an endpoint such as `blog`:

```bash
npx tsx export.ts
```

The resulting `export.json` wraps the returned array in `contents`. With `depth: 0`, references are represented by IDs rather than expanded records. Export each referenced API separately so those IDs remain useful. Keeping references compact also makes later transformations easier to inspect.

### Which API permissions are needed for an export?

Use a key with GET permission only for the APIs you need. If drafts or closed content are required, enable their respective bulk retrieval permissions as described in the [API key documentation](https://document.microcms.io/content-api/x-microcms-api-key). Keep both the privileged key and the exported files private.

Do not treat a successful list export as a complete archive of published versions, unpublished changes, and revision history. Confirm which values actually came back, especially for a published item with pending edits. The dashboard CSV’s separate version rows are also worth checking when preserving editorial state matters.

Pause editing before a large export, then check item counts and duplicate IDs. Offset pagination across changing records can miss or repeat items. A matching count alone does not prove that every body or attachment is intact.

### What if the export hits size or rate limits?

microCMS documents an approximately 5 MB maximum response size. If `getAllContents` fails because a page is too large, switch to `getList` with a smaller `limit` and advance `offset` against `totalCount` yourself. Preserve the full export by reducing page size rather than dropping fields that you still need.

The documented GET rate limit is 60 origin requests per second per service. Other workloads contribute to that total; responses served from the CDN edge cache are excluded from the origin count. Run export requests sequentially, and wait before retrying 429 responses or transient failures. These figures are from the [official limitations page](https://document.microcms.io/manual/limitations), checked in October 2026.

## How to convert microCMS JSON to CSV

Save the following as `to-csv.ts`, next to `export.json`, and run `npx tsx to-csv.ts`. It discovers top-level columns across the entire array. Arrays and objects remain JSON strings inside cells, preserving their structure for inspection without pretending that they are ordinary spreadsheet columns.

```typescript
import { readFile, writeFile } from "node:fs/promises";

async function main() {
  const { contents } = JSON.parse(await readFile("export.json", "utf8")) as {
    contents: Record<string, unknown>[];
  };
  const columns = [...new Set(contents.flatMap((row) => Object.keys(row)))];
  const cell = (value: unknown): string => {
    let text = value == null ? "" : typeof value === "object"
      ? JSON.stringify(value) : String(value);
    if (/^[\s]*[=+\-@]/.test(text)) text = "'" + text;
    return `"${text.replace(/"/g, '""')}"`;
  };
  const rows = [columns.map(cell).join(","), ...contents.map((row) =>
    columns.map((key) => cell(row[key])).join(","))];
  await writeFile("export.csv", "﻿" + rows.join("\r\n") + "\r\n", "utf8");
}
main().catch((error) => {
  console.error("CSV conversion failed:", error instanceof Error ? error.message : error);
  process.exitCode = 1;
});
```

The converter quotes every cell, escapes quotes, preserves embedded newlines, and adds a UTF-8 BOM. It prefixes cells that could be interpreted as spreadsheet formulas with an apostrophe. This changes some values, including negative numbers, so retain JSON as the authoritative copy. This CSV is for inspection; it is not a ready-made import template for another CMS.

| Field type | Why a simple CSV is insufficient | Practical approach |
| --- | --- | --- |
| Rich text | HTML and embedded images share one cell | Retain HTML and collect image URLs separately |
| Repeater or custom fields | Nested structures and ordering need interpretation | Keep JSON and redesign the destination schema |
| Single or multiple references | An ID does not preserve the referenced record | Export the referenced APIs and keep an ID map |
| Images and image arrays | URLs do not include the binary files | Download assets and maintain a URL-to-file map |

Do not flatten repeaters just to make a spreadsheet look cleaner. First decide whether the destination will represent them as structured blocks, separate records, or another supported field type. Keep the untouched source JSON so that transformation choices remain reversible.

## How do you export microCMS images and media?

Collect each image object’s `url`, image arrays, and image `src` values embedded in rich text. This covers assets referenced by the content you exported. It will not find unused media in the library.

For a library inventory, microCMS’s [media export guidance](https://help.microcms.io/ja/knowledge/media-export-and-import) points to the Management API’s `GET /api/v2/media`. Enable the “Get media” permission. Download each file from its returned URL; saving the inventory alone does not back up the file contents.

The [media list endpoint](https://document.microcms.io/management-api/get-media-v2) accepts a maximum initial `limit` of 100. Subsequent pages use `token`, rather than content-style `offset` pagination. The token has a documented 15-second expiry, so collect the inventory first and download binaries afterward. A token can be present on the first response even when there are no additional results: use the fetched count and `totalCount`, rather than token presence alone, to determine completion.

The Management API limit is 10 requests per 10 seconds per IP address. This is a different scope from Content API GET limits. Keep a mapping between original URLs and downloaded filenames, and include PDFs or other file types where used. During migration, check both dedicated image fields and old media URLs embedded in article bodies.

## How to import a microCMS export into genko.me

[genko.me](https://genko.me/) accepts microCMS schema JSON containing `apiFields`. This is schema compatibility, rather than a dedicated importer that automatically converts every content value and copies media. Follow the destination format in [Import and export](https://docs.genko.me/en/studio/import-export).

1. Export the schema from microCMS’s API Settings → API Schema screen. Load it in genko.me’s schema editor and review the converted fields. Unsupported custom and repeater structures need redesigning.
2. Match field IDs and types, then construct content JSON with only the fields intended for the destination. Remove metadata such as `revisedAt` when it is not a destination field.
3. Upload images to genko.me and replace source image objects with storage values containing destination media IDs. Create referenced records first and map their IDs explicitly.
4. Open Import on the destination API, select the JSON file, and initially import as drafts.
5. Check counts, IDs, bodies, images, and links before publishing.

For a destination with just `title` and `body`, a transformed input looks like this:

```json
{
  "contents": [
    { "id": "first-post", "title": "First post", "body": "<p>Article body.</p>" }
  ]
}
```

Keep the original export separately. As of October 2026, genko.me accepts up to 10 MB per file and 1,000 items per import. Split large exports to satisfy both limits. Eligible content IDs can be retained, but a duplicate existing ID stops an import; items already saved remain saved.

Source publication states, creation timestamps, and scheduled publication settings are not restored. If the old publication date must appear on the site, migrate it into a dedicated date field. The [response value reference](https://docs.genko.me/en/api-reference/values) also explains why delivery responses and stored media values can differ.

Use our [microCMS comparison](https://blog.genko.me/en/compare-microcms) for product selection and [free-plan limits guide](https://blog.genko.me/en/microcms-free-plan-limits) for Hobby planning. If your only requirement is a periodic export, continuing to use microCMS can be the practical choice.

## FAQ

### Can I export microCMS content on the free plan?

Hobby users can retrieve content through the GET API and save JSON or generate CSV themselves. Dashboard CSV export requires Team or higher. API and asset retrieval remain subject to the service’s usage conditions.

### How can I get more than 100 microCMS items?

Use `getAllContents`, or paginate `getList` with `limit` and `offset`. “All” means all records readable by that API key under the request conditions, rather than every historical version in the service.

### Can I export drafts and closed content?

The API requires GET plus the corresponding bulk retrieval permissions. For published items with pending edits, inspect the returned values and the dashboard CSV’s separate version rows before claiming that both versions have been preserved.

### Does a CSV export back up images?

A CSV or JSON export containing image URLs does not save the image files themselves. Download the assets separately and check embedded images in rich text as well as dedicated image fields.

## Sources

Checked October 23, 2026.

- [microCMS: CSV export](https://document.microcms.io/manual/csv-export)
- [microCMS: List GET API](https://document.microcms.io/content-api/get-list-contents)
- [microCMS: JavaScript SDK, implementation, and types](https://github.com/microcmsio/microcms-js-sdk)
- [microCMS: API keys and permissions](https://document.microcms.io/content-api/x-microcms-api-key)
- [microCMS: Media export](https://help.microcms.io/ja/knowledge/media-export-and-import)
- [microCMS: Media list API](https://document.microcms.io/management-api/get-media-v2)
- [microCMS: Limitations](https://document.microcms.io/manual/limitations)
- [microCMS: Schema export](https://document.microcms.io/manual/export-and-import-api-schema)
- [genko.me: Import and export](https://docs.genko.me/en/studio/import-export)
- [genko.me: Plans and limits](https://docs.genko.me/en/studio/plans)
