## List Routes `client.workers.routes.list(RouteListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/zones/{zone_id}/workers/routes` Returns routes for a zone. ### Parameters - `params: RouteListParams` - `zone_id: string` Identifier. ### Returns - `RouteListResponse` - `id: string` Identifier. - `pattern: string` Pattern to match incoming requests against. [Learn more](https://developers.cloudflare.com/workers/configuration/routing/routes/#matching-behavior). - `script?: string` Name of the script to run if the route matches. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const routeListResponse of client.workers.routes.list({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', })) { console.log(routeListResponse.id); } ``` #### 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": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "pattern": "example.com/*", "script": "my-workers-script" } ], "success": true } ```