Article
Requires access scope or access scope.
An article that contains content, author information, and metadata. Articles belong to a Blog and can include HTML-formatted body text, summary text, and an associated image. Merchants publish articles to share content, drive traffic, and engage customers.
Articles can be organized with tags and published immediately or scheduled for future publication using the timestamp. The API manages comments on articles when the blog's comment policy enables them.
Anchor to FieldsFields
- •Article
Author The name of the author of the article.
- Anchor to blogblog•Blog!non-null
The blog containing the article.
- Anchor to bodybody•HTML!non-null
The text of the article's body, complete with HTML markup.
- Anchor to commentscomments•Comment
Connection! non-null List of the article's comments.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to default•string
Filter by a case-insensitive search of multiple fields in a document.
query=Bob Normanquery=title:green hoodie- Anchor to created_at•time
Filter by the date and time when the comment was created.
created_at:>'2020-10-21T23:39:20Z'created_at:<nowcreated_at:<=2024- Anchor to published_at•time
Filter by the date and time when the comment was published.
published_at:>'2020-10-21T23:39:20Z'published_at:<nowpublished_at:<=2024- Anchor to published_status•string
Filter by published status
anypublishedunpublishedpublished_status:anypublished_status:publishedpublished_status:unpublished- Anchor to status•string
- Anchor to updated_at•time
Filter by the date and time when the comment was last updated.
updated_at:>'2020-10-21T23:39:20Z'updated_at:<nowupdated_at:<=2024
Example:
Example:
Example:
Valid values:
Example:
Example:
Arguments
- Anchor to commentsCountcomments•Count
Count Count of comments. Limited to a maximum of 10000 by default.
- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to default•string
Filter by a case-insensitive search of multiple fields in a document.
query=Bob Normanquery=title:green hoodie- Anchor to created_at•time
Filter by the date and time when the comment was created.
created_at:>'2020-10-21T23:39:20Z'created_at:<nowcreated_at:<=2024- Anchor to published_at•time
Filter by the date and time when the comment was published.
published_at:>'2020-10-21T23:39:20Z'published_at:<nowpublished_at:<=2024- Anchor to published_status•string
Filter by published status
anypublishedunpublishedpublished_status:anypublished_status:publishedpublished_status:unpublished- Anchor to status•string
- Anchor to updated_at•time
Filter by the date and time when the comment was last updated.
updated_at:>'2020-10-21T23:39:20Z'updated_at:<nowupdated_at:<=2024
Example:
Example:
Example:
Valid values:
Example:
Example:
- Anchor to limitlimit•IntDefault:10000
The upper bound on count value before returning a result. Use
nullto have no limit.
Arguments
- Anchor to createdAtcreated•Date
At Time! non-null The date and time (ISO 8601 format) when the article was created.
- Anchor to defaultCursordefault•String!
Cursor non-null A default cursor that returns the single next record, sorted ascending by ID.
- Anchor to eventsevents•Event
Connection! non-null The paginated list of events associated with the host subject.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Event
Key Sort Keys Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to comments•boolean
Whether or not to include comment-events in your search, passing
falsewill exclude comment-events, any other value will include comment-events.falsetrue- Anchor to created_at•time
Filter by the date and time when the event happened.
created_at:>2020-10-21created_at:<now- Anchor to subject_type•string
The resource type affected by this event. See EventSubjectType for possible values.
PRODUCT_VARIANTPRODUCTCOLLECTION
Example:
Example:
Example:
Arguments
- Anchor to handlehandle•String!non-null
A unique, human-friendly string for the article that's automatically generated from the article's title. The handle is used in the article's URL.
- •ID!non-null
A globally-unique ID.
- Anchor to imageimage•Image
The image associated with the article.
- Anchor to isPublishedis•Boolean!
Published non-null Whether or not the article is visible.
- Anchor to metafieldmetafield•Metafield
A custom field, including its
namespaceandkey, that's associated with a Shopify resource for the purposes of adding and storing additional information.- Anchor to namespacenamespace•String
The container the metafield belongs to. If omitted, the app-reserved namespace will be used.
- •String!required
The key for the metafield.
Arguments
- Anchor to metafieldsmetafields•Metafield
Connection! non-null A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to namespacenamespace•String
The metafield namespace to filter by. If omitted, all metafields are returned.
- Anchor to keyskeys•[String!]
List of keys of metafields in the format
namespace.key, will be returned in the same format.- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to metafieldsByIdentifiersmetafields•[Metafield]!
By Identifiers non-null The metafields associated with the resource matching the supplied list of namespaces and keys.
- Anchor to identifiersidentifiers•[Has
Metafields Identifier!]! required The list of metafields to retrieve by namespace and key.
Arguments
- Anchor to publishedAtpublished•Date
At Time The date and time (ISO 8601 format) when the article became or will become visible. Returns null when the article isn't visible.
- Anchor to summarysummary•HTML
A summary of the article, which can include HTML markup. The summary is used by the online store theme to display the article on other pages, such as the home page or the main blog page.
- •[String!]!non-null
A comma-separated list of tags. Tags are additional short descriptors formatted as a string of comma-separated values.
- Anchor to templateSuffixtemplate•String
Suffix The name of the template an article is using if it's using an alternate template. If an article is using the default
article.liquidtemplate, then the value returned isnull.- Anchor to titletitle•String!non-null
The title of the article.
- Anchor to translationstranslations•[Translation!]!non-null
The published translations associated with the resource.
- Anchor to localelocale•String!required
Filters translations locale.
- Anchor to marketIdmarket•ID
Id Filters translations by market ID. Use this argument to retrieve content specific to a market.
Arguments
- Anchor to updatedAtupdated•Date
At Time The date and time (ISO 8601 format) when the article was last updated.
- Anchor to metafieldDefinitionsmetafield•Metafield
Definitions Definition Connection! non-nullDeprecated - Anchor to namespacenamespace•String
Filter metafield definitions by namespace.
- Anchor to pinnedStatuspinned•Metafield
Status Definition Pinned Status Default:ANY Filter by the definition's pinned status.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Metafield
Key Definition Sort Keys Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to default•string
Filter by a case-insensitive search of multiple fields in a document.
query=Bob Normanquery=title:green hoodie- Anchor to created_at•time
Filter by the date and time when the metafield definition was created.
created_at:>2020-10-21T23:39:20Zcreated_at:<nowcreated_at:<=2024- Anchor to namespace•string
Filter by the metafield definition
namespacefield.namespace:some-namespace- Anchor to type•string
Filter by the metafield definition
typefield.type:single_line_text_field- Anchor to updated_at•time
Filter by the date and time when the metafield definition was last updated.
updated_at:>2020-10-21T23:39:20Zupdated_at:<nowupdated_at:<=2024
Example:
Example:
Example:
Example:
Example:
Arguments
Anchor to QueriesQueries
- •query
Returns a
Articleresource by ID.- •ID!required
The ID of the
Articleto return.
Arguments
- •ID!
- •query
Returns a paginated list of articles from the shop's blogs.
Articleobjects are blog posts that contain content like text, images, and tags.Supports cursor-based pagination to control the number of articles returned and their order. Use the
queryargument to filter results by specific criteria.- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Article
Key Sort Keys Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to default•string
Filter by a case-insensitive search of multiple fields in a document.
query=Bob Normanquery=handle:summer-collection-announcement- •string
Filter by the author of the article.
- Anchor to blog_id•string
Filter by the ID of the blog the article belongs to.
blog_id:1234blog_id:>=1234blog_id:<=1234- Anchor to blog_title•string
- Anchor to created_at•time
Filter by the date and time when the article was created.
created_at:>'2020-10-21T23:39:20Z'created_at:<nowcreated_at:<=2024- Anchor to handle•string
Filter by the article's handle.
handle:summer-collection-announcementhandle:how-to-guide- Anchor to published_at•time
Filter by the date and time when the article was published.
published_at:>'2020-10-21T23:39:20Z'published_at:<nowpublished_at:<=2024- Anchor to published_status•string
Filter by published status
- Anchor to tag_not•string
Filter by objects that don’t have the specified tag.
tag_not:my_tag- Anchor to title•string
Filter by the title of the article.
title:summer-collectiontitle:green hoodie- Anchor to updated_at•time
Filter by the date and time when the article was last updated.
updated_at:>'2020-10-21T23:39:20Z'updated_at:<nowupdated_at:<=2024
Example:
Example:
Example:
Example:
Example:
Example:
Example:
Example:
Arguments
Anchor to MutationsMutations
- •mutation
Creates an
Article. Articles are content pieces that include a title, body text, and author information.You can publish the article immediately or schedule it with a specific publish date. You can customize the article's URL handle, apply custom templates for rendering, and add optional fields like tags, an image, and
Metafieldobjects.The mutation validates article content and ensures proper blog association. Error handling provides specific feedback for content requirements.
- Anchor to articlearticle•Article
Create Input! required The properties of the new article.
- Anchor to blogblog•Article
Blog Input The properties of the new blog.
Arguments
- •mutation
Updates an existing
Article. You can modify the article's content, metadata, publication status, and associated properties like author information and tags.If you update the
handle, then you can optionally create a redirect from the old URL to the new one by settingtotrue.- •ID!required
The ID of the article to be updated.
- Anchor to articlearticle•Article
Update Input! required The properties of the article to be updated.
- Anchor to blogblog•Article
Blog Input The properties of the blog to be created.
Arguments
- •ID!
Anchor to InterfacesInterfaces
- •interface
- •interface
- •interface
- •interface