Apibara's 5565-line llms.txt shows what thorough AI preparation looks like
This page contains the Apibara documentation as a single document for consumption by LLMs.
Apibara's documentation provides a structured tutorial for setting up a project from the ground up. Readers will learn to create a basic indexer that integrates with multiple networks, gaining insights into the foundational elements of data indexing and project architecture.
Key Insights
Comprehensive structure
With 88 distinct sections, this file provides thorough coverage for AI systems.
Comprehensive detail
5565 lines of thorough documentation for AI systems.
llms.txt Preview
First 100 lines of 5,565 total
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.
## EVM Indexer
Let's create the first EVM indexer. All indexers must go in the `indexers`
directory and have a name that ends with `.indexer.ts` or `.indexer.js`.
The Apibara CLI will automatically detect the indexers in this directory and
make them available to the project.
You can use the `apibara add` command to add an indexer to your project. This
command does the following:
- gathers information about the chain you want to index.
- asks about your preferred storage solution.
- creates the indexer.
- adds dependencies to your `package.json`.
:::cli-command
```bash [Terminal]Apibara is set up. Is yours?
Check your AI readiness in 30 seconds. See who AI recommends in your space. Free, no signup.
1000+ sites already set up
Apibara is ready for AI. Are you?
Check your AI readiness score in 30 seconds — free, no signup required. Then generate your own llms.txt and start tracking your visibility.