## List namespaces. `client.AISearch.Namespaces.List(ctx, params) (*V4PagePaginationArray[NamespaceListResponse], error)` **get** `/accounts/{account_id}/ai-search/namespaces` List namespaces. ### Parameters - `params NamespaceListParams` - `AccountID param.Field[string]` Path param - `Page param.Field[int64]` Query param: Page number (1-indexed). - `PerPage param.Field[int64]` Query param: Number of results per page. - `Search param.Field[string]` Query param: Filter namespaces whose name or description contains this string (case-insensitive). ### Returns - `type NamespaceListResponse struct{…}` - `CreatedAt Time` - `Name string` - `Description string` Optional description for the namespace. Max 256 characters. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/ai_search" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.AISearch.Namespaces.List(context.TODO(), ai_search.NamespaceListParams{ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "result": [ { "created_at": "2019-12-27T18:11:19.117Z", "name": "production", "description": "Production environment" } ], "result_info": { "count": 0, "page": 0, "per_page": 0, "total_count": 0 }, "success": true } ```