--- title: scriptTag - GraphQL Admin description: |-

Theme app extensions

If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.

Script tag deprecation

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

Returns a `ScriptTag` resource by ID. api_version: 2024-10 api_name: admin type: query api_type: graphql source_url: html: 'https://shopify.dev/docs/api/admin-graphql/2024-10/queries/scriptTag' md: 'https://shopify.dev/docs/api/admin-graphql/2024-10/queries/scriptTag.txt' --- # script​Tag query Theme app extensions If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. [Learn more](https://shopify.dev/apps/online-store#what-integration-method-should-i-use). Script tag deprecation Script tags will be sunset for the **Order status** page on August 28, 2025. [Upgrade to Checkout Extensibility](https://www.shopify.com/plus/upgrading-to-checkout-extensibility) before this date. [Shopify Scripts](https://shopify.dev/docs/api/liquid/objects#script) will continue to work alongside Checkout Extensibility until August 28, 2025. Returns a `ScriptTag` resource by ID. ## Arguments * id [ID!](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/ID) required The ID of the `ScriptTag` to return. *** ## Possible returns * Script​Tag [Script​Tag](https://shopify.dev/docs/api/admin-graphql/2024-10/objects/ScriptTag) Theme app extensions If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. [Learn more](https://shopify.dev/apps/online-store#what-integration-method-should-i-use). Script tag deprecation Script tags will be sunset for the **Order status** page on August 28, 2025. [Upgrade to Checkout Extensibility](https://www.shopify.com/plus/upgrading-to-checkout-extensibility) before this date. [Shopify Scripts](https://shopify.dev/docs/api/liquid/objects#script) will continue to work alongside Checkout Extensibility until August 28, 2025. A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the **Order status** page of checkout. *** ## Examples * ### Retrieves a single script tag #### Query ```graphql query GetScriptTag($id: ID!) { scriptTag(id: $id) { id cache createdAt displayScope src updatedAt } } ``` #### Variables ```json { "id": "gid://shopify/ScriptTag/466217408" } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query GetScriptTag($id: ID!) { scriptTag(id: $id) { id cache createdAt displayScope src updatedAt } }", "variables": { "id": "gid://shopify/ScriptTag/466217408" } }' ``` #### Remix ```javascript const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query GetScriptTag($id: ID!) { scriptTag(id: $id) { id cache createdAt displayScope src updatedAt } }`, { variables: { "id": "gid://shopify/ScriptTag/466217408" }, }, ); const data = await response.json(); ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query GetScriptTag($id: ID!) { scriptTag(id: $id) { id cache createdAt displayScope src updatedAt } } QUERY variables = { "id": "gid://shopify/ScriptTag/466217408" } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `query GetScriptTag($id: ID!) { scriptTag(id: $id) { id cache createdAt displayScope src updatedAt } }`, "variables": { "id": "gid://shopify/ScriptTag/466217408" }, }, }); ``` #### Response ```json { "scriptTag": { "id": "gid://shopify/ScriptTag/466217408", "cache": false, "createdAt": "2024-10-29T22:38:08Z", "displayScope": "ALL", "src": "https://js.example.org/foo.js", "updatedAt": "2024-10-29T22:38:08Z" } } ``` ## Retrieves a single script tag [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20GetScriptTag\(%24id%3A%20ID!\)%20%7B%0A%20%20scriptTag\(id%3A%20%24id\)%20%7B%0A%20%20%20%20id%0A%20%20%20%20cache%0A%20%20%20%20createdAt%0A%20%20%20%20displayScope%0A%20%20%20%20src%0A%20%20%20%20updatedAt%0A%20%20%7D%0A%7D\&variables=%7B%0A%20%20%22id%22%3A%20%22gid%3A%2F%2Fshopify%2FScriptTag%2F466217408%22%0A%7D) ```javascript const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query GetScriptTag($id: ID!) { scriptTag(id: $id) { id cache createdAt displayScope src updatedAt } }`, { variables: { "id": "gid://shopify/ScriptTag/466217408" }, }, ); const data = await response.json(); ``` ## Input variables JSON ```json { "id": "gid://shopify/ScriptTag/466217408" } ``` ## Response JSON ```json { "scriptTag": { "id": "gid://shopify/ScriptTag/466217408", "cache": false, "createdAt": "2024-10-29T22:38:08Z", "displayScope": "ALL", "src": "https://js.example.org/foo.js", "updatedAt": "2024-10-29T22:38:08Z" } } ```