---
title: List custom pages
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Custom Pages](https://developers.cloudflare.com/api/python/resources/custom_pages)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List custom pages

custom\_pages.list(CustomPageListParams\*\*kwargs) -> SyncSinglePage\[[CustomPageListResponse](<https://developers.cloudflare.com/api/python/resources/custom_pages#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)>)]

GET/{accounts\_or\_zones}/{account\_or\_zone\_id}/custom\_pages

Lists all custom page configurations for an account or zone.

##### Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### Accepted Permissions (at least one required)

`Zero Trust: PII Read``Account Custom Pages Write``Account Custom Pages Read``Account Settings Write``Account Settings Read`

##### ParametersExpand Collapse

account\_id: Optional\[str]

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

zone\_id: Optional\[str]

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_id%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class CustomPageListResponse: …

</summary>

id: Optional\[str]

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

created\_on: Optional\[datetime]

formatdate-time

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

description: Optional\[str]

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

modified\_on: Optional\[datetime]

formatdate-time

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

preview\_target: Optional\[str]

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20preview_target">Link to this property</a>

required\_tokens: Optional\[List\[str]]

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20required_tokens">Link to this property</a>

<details>

<summary>

state: Optional\[Literal\["default", "customized"]]

The custom page state.

</summary>

One of the following:

"default"

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20state%20%3E%20(member)%200">Link to this property</a>

"customized"

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20state">Link to this property</a>

url: Optional\[str]

The URL associated with the custom page.

formaturi

<a href="#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)%20%3E%20(property)%20url">Link to this property</a>

</details>

[Link to this property](<#(resource)%20custom_pages%20%3E%20(model)%20custom_page_list_response%20%3E%20(schema)>)

### List custom pages

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_email=os.environ.get("CLOUDFLARE_EMAIL"),  # This is the default and can be omitted
    api_key=os.environ.get("CLOUDFLARE_API_KEY"),  # This is the default and can be omitted
)
page = client.custom_pages.list(
    account_id="account_id",
)
page = page.result[0]
print(page.id)
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "id": "basic_challenge",
      "created_on": "2014-01-01T05:20:00.12345Z",
      "description": "Basic Challenge",
      "modified_on": "2014-01-01T05:20:00.12345Z",
      "preview_target": "block:basic-sec-captcha",
      "required_tokens": [
        "::CAPTCHA_BOX::"
      ],
      "state": "default",
      "url": "http://www.example.com"
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "id": "basic_challenge",
      "created_on": "2014-01-01T05:20:00.12345Z",
      "description": "Basic Challenge",
      "modified_on": "2014-01-01T05:20:00.12345Z",
      "preview_target": "block:basic-sec-captcha",
      "required_tokens": [
        "::CAPTCHA_BOX::"
      ],
      "state": "default",
      "url": "http://www.example.com"
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}
```