## Get Worker subdomain `client.workers.scripts.subdomain.get(stringscriptName, SubdomainGetParamsparams, RequestOptionsoptions?): SubdomainGetResponse` **get** `/accounts/{account_id}/workers/scripts/{script_name}/subdomain` Get if the Worker is available on the workers.dev subdomain. ### Parameters - `scriptName: string` Name of the script, used in URLs and route configuration. - `params: SubdomainGetParams` - `account_id: string` Identifier. ### Returns - `SubdomainGetResponse` - `enabled: boolean` Whether the Worker is available on the workers.dev subdomain. - `previews_enabled: boolean` Whether the Worker's Preview URLs are available on the workers.dev subdomain. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const subdomain = await client.workers.scripts.subdomain.get('this-is_my_script-01', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(subdomain.enabled); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "enabled": false, "previews_enabled": false }, "success": true } ```