Skip to main content

The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Blog

Requires content access scope.

In addition to an online storefront, Shopify shops come with a built-in blogging engine, allowing a shop to have one or more blogs.

Shop owners are encouraged to use blogs to:

  • Make announcements
  • Talk about their products in more detail
  • Show off their expertise
  • Connect with their customers and
  • Boost their shop's search engine rankings

Shopify blogs are like most other blogs: a content management system for articles posted in reverse chronological order. Articles can be posted under one or more user-defined categories and tagged with one or more user-defined tags, with an option to allow readers to post comments to articles. An Atom feed is automatically generated for each blog, allowing for syndication. The search functionality built into every shop also searches the text in blog articles.

Blogs are meant to be used as a type of magazine or newsletter for the shop, with content that changes over time. If your shop needs a static page (such as an "About Us" page), we recommend that you use a Page instead.

Also see the Article resource for managing blog articles.

Was this section helpful?

Anchor to

The Blog resource

Anchor to

Properties


commentable

Indicates whether readers can post comments to the blog and if comments are moderated or not. Possible values are:

Show commentable properties
  • no (default): Readers cannot post comments to blog articles.
  • moderate: Readers can post comments to blog articles, but comments must be moderated before they appear.
  • yes: Readers can post comments to blog articles without moderation.

created_at
read-only

The date and time when the blog was created. The API returns this value in ISO 8601 format.


feedburner

FeedBurner is a web feed management provider and can be enabled to provide custom RSS feeds for Shopify bloggers. Google has stopped supporting FeedBurner, and new or existing blogs that are not already integrated with FeedBurner can't use the service. This property will default to blank unless FeedBurner is enabled.


feedburner_location

The URL that points to the FeedBurner location for blogs that have FeedBurner enabled. Google has stopped supporting FeedBurner, and new or existing blogs that are not already integrated with FeedBurner can't use the service. This property will default to blank unless FeedBurner is enabled


handle

A human-friendly unique string that is automatically generated from the title if no handle is sent during the creation of a blog. Duplicate handles are appended with an incremental number, for example, blog-2. The handle is customizable and is used by the Liquid templating language to refer to the blog. If you change the handle of a blog, then it can negatively affect the SEO of the shop. We recommend that you create a URL redirect to avoid any SEO issues.


id
read-only
->
id

A unique numeric identifier for the blog.


metafields
array
write-only

Attaches additional metadata to a store's resources:

Show metafields properties
  • key (required): Identifier for the metafield (maximum of 30 characters).
  • namespace (required): Container for a set of metadata. Namespaces help distinguish between metadata you created and metadata created by another individual with a similar namespace (maximum of 20 characters).
  • value (required): Information to be stored as metadata.
  • type (required): The metafield's information type. Refer to the full list of types.
  • description (optional): Additional information about the metafield.

For more information on attaching metadata to Shopify resources, see the Metafield resource.


tags
read-only

A list of tags associated with the 200 most recent blog articles. Tags are additional short descriptors formatted as a string of comma-separated values. For example, if an article has three tags: tag1, tag2, tag3. Tags are limited to 255 characters.


template_suffix

States the name of the template a blog is using if it is using an alternate template. If a blog is using the default blog.liquid template, the value returned is "null".


title

The title of the blog.


updated_at
read-only

The date and time when changes were last made to the blog's properties. Note that this is not updated when creating, modifying or deleting articles in the blog. The API returns this value in ISO 8601 format.


admin_graphql_api_id
read-only
->
id

The GraphQL GID of the blog.


Was this section helpful?
{}

The Blog resource

{
"commentable": "no",
"created_at": "2012-03-13T16:09:54-04:00",
"feedburner": null,
"feedburner_location": null,
"handle": "apple-blog",
"id": 241253187,
"tags": "tagged",
"template_suffix": null,
"title": "My Blog",
"updated_at": "2021-12-01T14:52:12-04:00",
"admin_graphql_api_id": "gid://shopify/OnlineStoreBlog/241253187"
}

Anchor to POST request, Create a new Blog
post
Create a new Blog

Create a new blog

Anchor to Parameters of Create a new BlogParameters


api_version
string
required

title
required

The title of the blog. Maximum length: 255 characters.


Was this section helpful?

Anchor to post-blogs-examplesExamples

Create a new empty blog

Request body
blog
Blog resource
Show blog properties
blog.title:"Apple main blog"

The title of the blog.

Create a new empty blog with a metafield

Request body
blog
Blog resource
Show blog properties
blog.title:"Apple main blog"

The title of the blog.

blog.metafields:[{"key":"sponsor","value":"Shopify","type":"single_line_text_field","namespace":"global"}]
array
write-only

Attaches additional metadata to a store's resources:

Show metafields properties
  • key (required): Identifier for the metafield (maximum of 30 characters).
  • namespace (required): Container for a set of metadata. Namespaces help distinguish between metadata you created and metadata created by another individual with a similar namespace (maximum of 20 characters).
  • value (required): Information to be stored as metadata.
  • type (required): The metafield's information type. Refer to the full list of types.
  • description (optional): Additional information about the metafield.

For more information on attaching metadata to Shopify resources, see the Metafield resource.

Trying to create a blog without a title will return an error

Was this section helpful?
post

/admin/api/2025-07/blogs.json

curl -d '{"blog":{"title":"Apple main blog"}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2025-07/blogs.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"

{}

Response

JSON
HTTP/1.1 201 Created
{
"blog": {
"id": 1008414250,
"handle": "apple-main-blog",
"title": "Apple main blog",
"updated_at": "2025-07-01T14:47:21-04:00",
"commentable": "no",
"feedburner": null,
"feedburner_location": null,
"created_at": "2025-07-01T14:47:21-04:00",
"template_suffix": null,
"tags": "",
"admin_graphql_api_id": "gid://shopify/Blog/1008414250"
}
}

Retrieve a list of all blogs. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.


api_version
string
required

fields

comma-separated list of fields to include in the response


handle

Filter by blog handle


limit
≤ 250
default 50

The maximum number of results to retrieve.


since_id

Restrict results to after the specified ID


Was this section helpful?

Get all blogs for a shop

Get all blogs for a shop after a specified ID

Query parameters
since_id=241253187

Restrict results to after the specified ID

Was this section helpful?
get

/admin/api/2025-07/blogs.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/blogs.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"blogs": [
{
"id": 382285388,
"handle": "banana-blog",
"title": "A Gnu Blog",
"updated_at": "2006-02-02T19:00:00-05:00",
"commentable": "no",
"feedburner": null,
"feedburner_location": null,
"created_at": "2025-07-01T14:37:24-04:00",
"template_suffix": null,
"tags": "",
"admin_graphql_api_id": "gid://shopify/Blog/382285388"
},
{
"id": 241253187,
"handle": "apple-blog",
"title": "Mah Blog",
"updated_at": "2006-02-01T19:00:00-05:00",
"commentable": "no",
"feedburner": null,
"feedburner_location": null,
"created_at": "2025-07-01T14:37:24-04:00",
"template_suffix": null,
"tags": "Announcing, Mystery",
"admin_graphql_api_id": "gid://shopify/Blog/241253187"
}
]
}

Get a single blog by its ID


api_version
string
required

blog_id
string
required

fields

comma-separated list of fields to include in the response


Was this section helpful?

Get a single blog

Path parameters
blog_id=241253187
string
required

Get the id and title of a single blog

Path parameters
blog_id=241253187
string
required
Query parameters
fields=id,title

comma-separated list of fields to include in the response

Was this section helpful?
get

/admin/api/2025-07/blogs/241253187.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/blogs/241253187.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"blog": {
"id": 241253187,
"handle": "apple-blog",
"title": "Mah Blog",
"updated_at": "2006-02-01T19:00:00-05:00",
"commentable": "no",
"feedburner": null,
"feedburner_location": null,
"created_at": "2025-07-01T14:37:24-04:00",
"template_suffix": null,
"tags": "Announcing, Mystery",
"admin_graphql_api_id": "gid://shopify/Blog/241253187"
}
}

Get a count of all blogs


api_version
string
required

Was this section helpful?

Get the blogs count for a shop

Was this section helpful?
get

/admin/api/2025-07/blogs/count.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/blogs/count.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"count": 2
}

Update a blog


api_version
string
required

blog_id
string
required

Was this section helpful?

Add a metafield to an existing blog

Path parameters
blog_id=241253187
string
required
Request body
blog
Blog resource
Show blog properties
blog.id:241253187
read-only

A unique numeric identifier for the blog.

blog.metafields:[{"key":"sponsor","value":"Shopify","type":"single_line_text_field","namespace":"global"}]
array
write-only

Attaches additional metadata to a store's resources:

Show metafields properties
  • key (required): Identifier for the metafield (maximum of 30 characters).
  • namespace (required): Container for a set of metadata. Namespaces help distinguish between metadata you created and metadata created by another individual with a similar namespace (maximum of 20 characters).
  • value (required): Information to be stored as metadata.
  • type (required): The metafield's information type. Refer to the full list of types.
  • description (optional): Additional information about the metafield.

For more information on attaching metadata to Shopify resources, see the Metafield resource.

Update an existing blog title

Path parameters
blog_id=241253187
string
required
Request body
blog
Blog resource
Show blog properties
blog.id:241253187
read-only

A unique numeric identifier for the blog.

blog.title:"IPod Updates"

The title of the blog.

Update an existing blog title and handle and also activate comments

Path parameters
blog_id=241253187
string
required
Request body
blog
Blog resource
Show blog properties
blog.id:241253187
read-only

A unique numeric identifier for the blog.

blog.title:"IPod Updates"

The title of the blog.

blog.handle:"ipod-updates"

A human-friendly unique string that is automatically generated from the title if no handle is sent during the creation of a blog. Duplicate handles are appended with an incremental number, for example, blog-2. The handle is customizable and is used by the Liquid templating language to refer to the blog. If you change the handle of a blog, then it can negatively affect the SEO of the shop. We recommend that you create a URL redirect to avoid any SEO issues.

blog.commentable:"moderate"

Indicates whether readers can post comments to the blog and if comments are moderated or not. Possible values are:

Show commentable properties
  • no (default): Readers cannot post comments to blog articles.
  • moderate: Readers can post comments to blog articles, but comments must be moderated before they appear.
  • yes: Readers can post comments to blog articles without moderation.
Was this section helpful?
put

/admin/api/2025-07/blogs/241253187.json

curl -d '{"blog":{"id":241253187,"metafields":[{"key":"sponsor","value":"Shopify","type":"single_line_text_field","namespace":"global"}]}}' \
-X PUT "https://your-development-store.myshopify.com/admin/api/2025-07/blogs/241253187.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"

{}

Response

JSON
HTTP/1.1 200 OK
{
"blog": {
"title": "Mah Blog",
"handle": "apple-blog",
"id": 241253187,
"updated_at": "2006-02-01T19:00:00-05:00",
"commentable": "no",
"feedburner": null,
"feedburner_location": null,
"created_at": "2025-07-01T14:37:24-04:00",
"template_suffix": null,
"tags": "Announcing, Mystery",
"admin_graphql_api_id": "gid://shopify/Blog/241253187"
}
}

Delete a blog


api_version
string
required

blog_id
string
required

Was this section helpful?

Remove an existing blog from a shop

Path parameters
blog_id=241253187
string
required
Was this section helpful?
del

/admin/api/2025-07/blogs/241253187.json

curl -X DELETE "https://your-development-store.myshopify.com/admin/api/2025-07/blogs/241253187.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{}