llms.txt Content
This page contains the Apibara documentation as a single document for consumption by LLMs.
---
title: Apibara documentation
titleShort: Overview
description: "Welcome to the Apibara documentation. Find more information about the Apibara protocol."
priority: 1000
fullpage: true
---
<DocumentationIndex />
---
title: Installation
description: "Learn how to install and get started with Apibara."
diataxis: tutorial
updatedAt: 2025-06-11
---
# Installation
This tutorial shows how to setup an Apibara project from scratch. The goal is to
start indexing data as quickly as possible and to understand the basic structure
of a project. By the end of this tutorial, you will have a basic indexer that
streams data from two networks (Ethereum and Starknet).
## Installation
This tutorial starts with a fresh Typescript project. In the examples, we use
`pnpm` as the package manager, but you can use any package manager you prefer.
Let's start by creating the project. The `--language` flag specifies which language
to use to implement indexers, while the `--no-create-indexer` flag is used to
delay the creation of the indexer.
:::cli-command
```bash [Terminal]
mkdir my-indexer
cd my-indexer
pnpm dlx apibara@next init . --language="ts" --no-create-indexer
```
```
ℹ Initializing project in .
✔ Created package.json
✔ Created tsconfig.json
✔ Created apibara.config.ts
✔ Project initialized successfully
```
:::
After that, you can install the dependencies.
```bash [Terminal]
pnpm install
```
## Apibara Config
Your indexers' configuration goes in the `apibara.config.ts` file. You can
leave the configuration as is for now.
```typescript [apibara.config.ts]
import { defineConfig } from "apibara/config";
export default defineConfig({
runtimeConfig: {},
});
```
## API Key
The streams hosted by Apibara require an API key.
- [Sign up for a free account](https://app.apibara.com),
- Create an API key,
- Export the API key as the `DNA_TOKEN` environment variable.
##