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

# NEAR Sources

> Build real-time pipelines with NEAR blockchain data

## Overview

Goldsky provides curated NEAR Protocol datasets covering blocks, transactions, receipts, and execution outcomes. NEAR data is pulled from chunks across all shards and flattened into per-row datasets for indexing.

## Available datasets

| Dataset | Mainnet | Description |
| - | - | - |
| `near.blocks` | v1.0.0 | Block-level data from the NEAR blockchain |
| `near.receipts` | v1.1.0 | Receipts created during execution of transactions |
| `near.transactions` | v1.1.0 | Transactions pulled from chunks as found on the NEAR blockchain |
| `near.execution_outcomes` | v1.1.0 | Execution outcomes generated from both transaction and receipt executions |

> [!NOTE]
>
> **Data coverage:** NEAR datasets are indexed as of \~February 20, 2026 (block height `186410071`).
>
> Please [contact us](mailto:support@goldsky.com) if you'd like earlier historical data.

## Quick start

The fastest way to explore NEAR data is using a `blackhole` sink with `goldsky turbo inspect`:

```yaml theme={"dark"}
name: demo-near-receipts-blackhole
resource_size: s

sources:
  near_receipts:
    type: dataset
    dataset_name: near.receipts
    version: 1.1.0
    start_at: latest

sinks:
  dev_sink:
    type: blackhole
    from: near_receipts
```

```bash theme={"dark"}
goldsky turbo apply demo.yaml
goldsky turbo inspect demo-near-receipts-blackhole
```

## Guide: Track failed execution outcomes

Build a debugging dashboard by filtering execution outcomes to only capture failures:

```yaml theme={"dark"}
name: near-execution-outcomes-failures
resource_size: s

sources:
  execution_outcomes:
    type: dataset
    dataset_name: near.execution_outcomes
    version: 1.1.0
    start_at: latest

transforms:
  failed_executions:
    type: sql
    primary_key: id
    sql: |
      SELECT
        id,
        block_hash,
        executor_id,
        status,
        gas_burnt,
        tokens_burnt,
        logs
      FROM execution_outcomes
      WHERE status <> 'SUCCESS'

sinks:
  postgres_output:
    type: postgres
    from: failed_executions
    schema: public
    table: failed_execution_outcomes
    secret_name: MY_POSTGRES_SECRET
    primary_key: id
```

The `id` field on execution outcomes is either the receipt ID or the transaction hash, depending on whether the outcome was produced by a receipt or the top-level transaction.

## Guide: Monitor transactions for a specific account

Track all transactions involving a particular NEAR account:

```yaml theme={"dark"}
name: near-account-transactions
resource_size: s

sources:
  near_transactions:
    type: dataset
    dataset_name: near.transactions
    version: 1.1.0
    start_at: latest

transforms:
  account_transactions:
    type: sql
    primary_key: id
    sql: |
      SELECT *
      FROM near_transactions
      WHERE receiver_id = 'epic.poolv1.near'
        OR signer_id = 'epic.poolv1.near'

sinks:
  postgres_output:
    type: postgres
    from: account_transactions
    schema: public
    table: near_account_transactions
    secret_name: MY_POSTGRES_SECRET
    primary_key: id
```

## Performance tips

> [accordion] Filter early with SQL
>
> NEAR produces high volumes of receipts and execution outcomes. Apply filters as early as possible to reduce data volume:
>
> ```yaml theme={"dark"}
> transforms:
>   filtered:
>     type: sql
>     sql: SELECT * FROM near_receipts WHERE receiver_id = 'wrap.near'
> ```

> [accordion] Use appropriate resource sizes
>
> NEAR mainnet has high throughput. When backfilling the available history (see [data coverage](#available-datasets)), consider medium or large resource sizes:
>
> ```yaml theme={"dark"}
> resource_size: m  # or l for large backfills
> ```

> [accordion] Start with latest for development
>
> When building and testing pipelines, use `start_at: latest` to avoid processing large amounts of historical data:
>
> ```yaml theme={"dark"}
> start_at: latest  # Only process new data
> ```

For any questions or feedback, reach out at [support@goldsky.com](mailto:support@goldsky.com).


## Related topics

- [Turbo pipeline sources: EVM, Solana, Stellar, NEAR, Bitcoin](https://docs.goldsky.com/turbo-pipelines/sources/overview.md)
- [Migrate from Mirror to Turbo](https://docs.goldsky.com/turbo-pipelines/migrate-from-mirror.md)
- [NEAR](https://docs.goldsky.com/chains/near.md)
- [Supported networks](https://docs.goldsky.com/chains/supported-networks.md)
- [Stellar Sources](https://docs.goldsky.com/turbo-pipelines/sources/stellar.md)
