> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cyborg.co/llms.txt
> Use this file to discover all available pages before exploring further.

# List IDs

Returns every item ID in the index.

```typescript theme={null}
async listIds(): Promise<{ ids: string[]; count: number }>
```

### Returns

`Promise<{ ids, count }>`: all IDs in the index and how many there are.

### Exceptions

<AccordionGroup>
  <Accordion title="CyborgDBAuthenticationError">
    The `indexKey` or `apiKey` is invalid (HTTP `401`).
  </Accordion>

  <Accordion title="CyborgDBServiceError">
    The service returns `5xx`.
  </Accordion>
</AccordionGroup>

See [Errors](../errors) for the full hierarchy.

### Example Usage

```typescript theme={null}
const { ids, count } = await index.listIds();
console.log(count);
// Output: 3

console.log(ids.includes('doc1'));
// Output: true

// Fetch items in batches of 100
for (let i = 0; i < ids.length; i += 100) {
    const items = await index.get({ ids: ids.slice(i, i + 100) });
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.