---
title: Indexes
---

[Skip to content](#%5Ftop) 

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

[Vectorize](https://developers.cloudflare.com/api/typescript/resources/vectorize)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Indexes

##### [List Vectorize Indexes](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/list)

client.vectorize.indexes.list(IndexListParams { account\_id } params, RequestOptionsoptions?): SinglePage<[CreateIndex](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20create%5Findex%20%3E%20%28schema%29) { config, created\_on, description, 2 more } \>

GET/accounts/{account\_id}/vectorize/v2/indexes

##### [Get Vectorize Index](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/get)

client.vectorize.indexes.get(stringindexName, IndexGetParams { account\_id } params, RequestOptionsoptions?): [CreateIndex](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20create%5Findex%20%3E%20%28schema%29) { config, created\_on, description, 2 more } | null

GET/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}

##### [Create Vectorize Index](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/create)

client.vectorize.indexes.create(IndexCreateParams { account\_id, config, name, description } params, RequestOptionsoptions?): [CreateIndex](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20create%5Findex%20%3E%20%28schema%29) { config, created\_on, description, 2 more } | null

POST/accounts/{account\_id}/vectorize/v2/indexes

##### [Delete Vectorize Index](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/delete)

client.vectorize.indexes.delete(stringindexName, IndexDeleteParams { account\_id } params, RequestOptionsoptions?): [IndexDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20index%5Fdelete%5Fresponse%20%3E%20%28schema%29) | null

DELETE/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}

##### [Insert Vectors](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/insert)

client.vectorize.indexes.insert(stringindexName, IndexInsertParams { account\_id, body, unparsableBehavior } params, RequestOptionsoptions?): [IndexInsertResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20index%5Finsert%5Fresponse%20%3E%20%28schema%29) { mutationId } | null

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/insert

##### [Query Vectors](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/query)

client.vectorize.indexes.query(stringindexName, IndexQueryParams { account\_id, vector, filter, 3 more } params, RequestOptionsoptions?): [IndexQueryResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20index%5Fquery%5Fresponse%20%3E%20%28schema%29) { count, matches } | null

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/query

##### [Upsert Vectors](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/upsert)

client.vectorize.indexes.upsert(stringindexName, IndexUpsertParams { account\_id, body, unparsableBehavior } params, RequestOptionsoptions?): [IndexUpsertResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20index%5Fupsert%5Fresponse%20%3E%20%28schema%29) { mutationId } | null

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/upsert

##### [Delete Vectors By Identifier](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/delete%5Fby%5Fids)

client.vectorize.indexes.deleteByIDs(stringindexName, IndexDeleteByIDsParams { account\_id, ids } params, RequestOptionsoptions?): [IndexDeleteByIDsResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20index%5Fdelete%5Fby%5Fids%5Fresponse%20%3E%20%28schema%29) { mutationId } | null

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/delete\_by\_ids

##### [Get Vectors By Identifier](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/get%5Fby%5Fids)

client.vectorize.indexes.getByIDs(stringindexName, IndexGetByIDsParams { account\_id, ids } params, RequestOptionsoptions?): [IndexGetByIDsResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20index%5Fget%5Fby%5Fids%5Fresponse%20%3E%20%28schema%29) | null

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/get\_by\_ids

##### [Get Vectorize Index Info](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/info)

client.vectorize.indexes.info(stringindexName, IndexInfoParams { account\_id } params, RequestOptionsoptions?): [IndexInfoResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20index%5Finfo%5Fresponse%20%3E%20%28schema%29) { dimensions, processedUpToDatetime, processedUpToMutation, vectorCount } | null

GET/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/info

##### [List Vectors](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/methods/list%5Fvectors)

client.vectorize.indexes.listVectors(stringindexName, IndexListVectorsParams { account\_id, count, cursor } params, RequestOptionsoptions?): [IndexListVectorsResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20index%5Flist%5Fvectors%5Fresponse%20%3E%20%28schema%29) { count, isTruncated, totalCount, 3 more } | null

GET/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/list

##### ModelsExpand Collapse 

CreateIndex { config, created\_on, description, 2 more } 

config?: [IndexDimensionConfiguration](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes%20%3E%20%28model%29%20index%5Fdimension%5Fconfiguration%20%3E%20%28schema%29) { dimensions, metric } 

created\_on?: string

Specifies the timestamp the resource was created as an ISO8601 string.

formatdate-time

description?: string

Specifies the description of the index.

modified\_on?: string

Specifies the timestamp the resource was modified as an ISO8601 string.

formatdate-time

name?: string

IndexDeleteVectorsByID { count, ids } 

count?: number

The count of the vectors successfully deleted.

ids?: Array<string\>

Array of vector identifiers of the vectors that were successfully processed for deletion.

IndexDimensionConfiguration { dimensions, metric } 

dimensions: number

Specifies the number of dimensions for the index

maximum1536

minimum1

metric: "cosine" | "euclidean" | "dot-product"

Specifies the type of metric to use calculating distance.

One of the following:

"cosine"

"euclidean"

"dot-product"

IndexInsert { count, ids } 

count?: number

Specifies the count of the vectors successfully inserted.

ids?: Array<string\>

Array of vector identifiers of the vectors successfully inserted.

IndexQuery { count, matches } 

count?: number

Specifies the count of vectors returned by the search

matches?: Array<Match\>

Array of vectors matched by the search

id?: string

Identifier for a Vector

maxLength64

metadata?: unknown

score?: number

The score of the vector according to the index’s distance metric

values?: Array<number\> | null

IndexUpsert { count, ids } 

count?: number

Specifies the count of the vectors successfully inserted.

ids?: Array<string\>

Array of vector identifiers of the vectors successfully inserted.

IndexDeleteResponse \= unknown | string | null

One of the following:

unknown

string

IndexInsertResponse { mutationId } 

mutationId?: string

The unique identifier for the async mutation operation containing the changeset.

maxLength36

IndexQueryResponse { count, matches } 

count?: number

Specifies the count of vectors returned by the search

matches?: Array<Match\>

Array of vectors matched by the search

id?: string

Identifier for a Vector

maxLength64

metadata?: unknown

namespace?: string | null

score?: number

The score of the vector according to the index’s distance metric

values?: Array<number\> | null

IndexUpsertResponse { mutationId } 

mutationId?: string

The unique identifier for the async mutation operation containing the changeset.

maxLength36

IndexDeleteByIDsResponse { mutationId } 

mutationId?: string

The unique identifier for the async mutation operation containing the changeset.

maxLength36

IndexGetByIDsResponse \= unknown

Array of vectors with matching ids.

IndexInfoResponse { dimensions, processedUpToDatetime, processedUpToMutation, vectorCount } 

dimensions?: number

Specifies the number of dimensions for the index

maximum1536

minimum1

processedUpToDatetime?: string | null

Specifies the timestamp the last mutation batch was processed as an ISO8601 string.

formatdate-time

processedUpToMutation?: string

The unique identifier for the async mutation operation containing the changeset.

maxLength36

vectorCount?: number

Specifies the number of vectors present in the index

IndexListVectorsResponse { count, isTruncated, totalCount, 3 more } 

count: number

Number of vectors returned in this response

isTruncated: boolean

Whether there are more vectors available beyond this response

totalCount: number

Total number of vectors in the index

vectors: Array<Vector\>

Array of vector items

id: string

Identifier for a Vector

maxLength64

cursorExpirationTimestamp?: string | null

When the cursor expires as an ISO8601 string

formatdate-time

nextCursor?: string | null

Cursor for the next page of results

#### IndexesMetadata Index

##### [List Metadata Indexes](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/subresources/metadata%5Findex/methods/list)

client.vectorize.indexes.metadataIndex.list(stringindexName, MetadataIndexListParams { account\_id } params, RequestOptionsoptions?): [MetadataIndexListResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes.metadata%5Findex%20%3E%20%28model%29%20metadata%5Findex%5Flist%5Fresponse%20%3E%20%28schema%29) { metadataIndexes } | null

GET/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/metadata\_index/list

##### [Create Metadata Index](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/subresources/metadata%5Findex/methods/create)

client.vectorize.indexes.metadataIndex.create(stringindexName, MetadataIndexCreateParams { account\_id, indexType, propertyName } params, RequestOptionsoptions?): [MetadataIndexCreateResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes.metadata%5Findex%20%3E%20%28model%29%20metadata%5Findex%5Fcreate%5Fresponse%20%3E%20%28schema%29) { mutationId } | null

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/metadata\_index/create

##### [Delete Metadata Index](https://developers.cloudflare.com/api/typescript/resources/vectorize/subresources/indexes/subresources/metadata%5Findex/methods/delete)

client.vectorize.indexes.metadataIndex.delete(stringindexName, MetadataIndexDeleteParams { account\_id, propertyName } params, RequestOptionsoptions?): [MetadataIndexDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/vectorize#%28resource%29%20vectorize.indexes.metadata%5Findex%20%3E%20%28model%29%20metadata%5Findex%5Fdelete%5Fresponse%20%3E%20%28schema%29) { mutationId } | null

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/metadata\_index/delete

##### ModelsExpand Collapse 

MetadataIndexListResponse { metadataIndexes } 

metadataIndexes?: Array<MetadataIndex\>

Array of indexed metadata properties.

indexType?: "string" | "number" | "boolean"

Specifies the type of indexed metadata property.

One of the following:

"string"

"number"

"boolean"

propertyName?: string

Specifies the indexed metadata property.

MetadataIndexCreateResponse { mutationId } 

mutationId?: string

The unique identifier for the async mutation operation containing the changeset.

maxLength36

MetadataIndexDeleteResponse { mutationId } 

mutationId?: string

The unique identifier for the async mutation operation containing the changeset.

maxLength36