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.

5,565
Lines
+294% vs avg
88
Sections
+267% vs avg
742+
Companies
using llms.txt
1
Files
llms.txt

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 ready for AI search. Are you?

Join 742+ companies preparing their websites for the future of search. Create your llms.txt file in minutes.

Generate Your llms.txt

Don't get left behind

Your competitors are preparing for AI search.

Apibara has 88 organized sections ready for AI crawlers. Generate your llms.txt file and join the companies optimizing for the future of search.