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

# Gear support

> Index Gear program data on Substrate with the Squid SDK.

<Warning>
  V2 gateway requests require an API key. Set `SQD_API_KEY` in `.env` before running gateway-based examples, or pass `apiKey: process.env.SQD_API_KEY` in `GatewaySettings`.
</Warning>

<Info>
  SQD Network has gateways for two networks that use Gear Protocol: **Vara** and **Vara Testnet**. Here are their endpoint URLs:

  ```
  https://v2.archive.subsquid.io/network/vara
  ```

  ```
  https://v2.archive.subsquid.io/network/vara-testnet
  ```
</Info>

Indexing [Gear](https://gear-tech.io/) programs is supported with [`addGearMessageQueued()`](../../reference/substrate-processor/data-requests#addgearmessagequeued) and [`addGearUserMessageSent()`](../../reference/substrate-processor/data-requests#addgearusermessagesent) specialized data requests. These subscribe to the events [`Gear.MessageQueued`](https://wiki.gear-tech.io/docs/api/events/#messagequeued) and [`Gear.UserMessageSent`](https://wiki.gear-tech.io/docs/api/events/#usermessagesent) emitted by a specified Gear program.

The processor can also subscribe to any other event with [`addEvent()`](../../reference/substrate-processor/data-requests#events) and filter by program ID in the batch handler, if so necessary.

An example of a squid indexing a Gear program (an NFT contract) can be found [here](https://github.com/subsquid/squid-sdk/tree/master/test/gear-nft).


## Related topics

- [Data Requests](/en/sdk/squid-sdk/substrate/reference/substrate-processor/data-requests.md)
- [Stream Finalized Blocks](/en/api/substrate/finalized-stream.md)
- [Stream Blocks](/en/api/substrate/stream.md)
- [Parquet support](/en/sdk/squid-sdk/solana/reference/data-stores/file-store/parquet.md)
- [CSV support](/en/sdk/squid-sdk/solana/reference/data-stores/file-store/csv.md)
