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

# List Items

> Query and list multiple items from your Notion databases

## Basic Usage

Fetch all items from a database:

```typescript theme={null}
const [posts, error] = await nc.query.blog.list();

if (!error) {
  posts.forEach(post => {
    console.log(post.title);
  });
}
```

## Type Safety

NotCMS provides full type inference for list results:

```typescript theme={null}
// Infer array type
type BlogPosts = typeof nc.query.blog.$inferPages;

// Use in your functions
function processPosts(posts: BlogPosts) {
  posts.forEach(post => {
    // Full type safety and IDE autocomplete
    console.log(post.title);
    console.log(post.published);
  });
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Get Single Item" icon="file" href="/en/usage/get">
    Learn to fetch individual items
  </Card>

  <Card title="Client API" icon="code" href="/en/usage/client">
    Explore the complete Client API
  </Card>
</CardGroup>
