Skip to main content

JSON file structure

First and foremost, your JSON file must contain valid JSON. You can test your file is valid using the JSONLint online tool. The file structure can optionally be wrapped in:
Both with and without are valid Ghost JSON files. But you must include a meta and a data object.

The meta object

The meta block expects two keys, exported_on and version. exported_on should be an epoch timestamp in milliseconds, version should be the Ghost version the import is valid for.

The data block

Ghost’s JSON format mirrors the underlying database structure, rather than the API, as it allows you to override fields that the API would ignore.
The data block contains all of the individual post, tag, and user resources that you want to import into your site, as well as the relationships between all of these resources. Each item that you include should be an array of objects. Relationships can be defined between posts and tags, posts and users (authors). IDs inside the file are relative to the file only, so if you have a post with id: "1234" and a posts_tags object which references post_id: "1234", then those two things will be linked, but they do not relate to the post with id: "1234" in your database. The example below is a working but simplified to cover most use-cases. To see what fields are available, types, lengths, and validations, please refer to the Ghost schema on GitHub.

Example