> ## 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.

# Portal API introduction

> How Portal requests select a dataset, block range, fields, and filters.

SQD Portal is an HTTP API for querying blockchain data. A Portal endpoint
exposes one or more **datasets**. Each dataset identifies a chain or another
named data source, such as `ethereum-mainnet`.

A stream request has two parts:

* The URL selects the dataset and operation.
* The JSON body selects the request type, block range, fields, and filters.

For example, an EVM stream request can use this path:

```http theme={"system"}
POST /datasets/ethereum-mainnet/stream
```

Its request body includes `type: "evm"`, a required `fromBlock`, an optional
`toBlock`, and the fields or records to return. Solana requests use the same
URL structure with the Solana request model.

Stream response bodies use JSON Lines. Each line is one JSON object for one
returned block. A client can read and process each line as it arrives.

Do not select the parser from the `Content-Type` header alone. The SQD-hosted
endpoint can use different content types for archival and recent data while
returning the same line-delimited JSON body.

<CardGroup cols={2}>
  <Card title="How Portal serves data" icon="chart-line" href="/en/portal/introduction/how-portal-serves-data">
    See how one stream can read finalized history and recent blocks.
  </Card>

  <Card title="Finalized and recent data" icon="database" href="/en/portal/introduction/finalized-and-recent-data">
    Choose between standard and finalized streams.
  </Card>

  <Card title="Blockchain forks" icon="bolt" href="/en/portal/introduction/blockchain-forks">
    Detect a changed chain and recover from HTTP 409.
  </Card>

  <Card title="First query" icon="terminal" href="/en/portal/introduction/first-query">
    Choose a runnable query for EVM, Solana, Bitcoin, Hyperliquid, Tron, or
    Substrate data.
  </Card>
</CardGroup>

The pages in this section explain the shared API concepts. The [first-query
selector](/en/portal/introduction/first-query) links to the existing runnable
requests, request fields, filters, and response examples for these data types.

To operate a Portal instance, see [Running your own
Portal](/en/portal/introduction/running-portal).


## Related topics

- [Choose your first Portal query](/en/portal/introduction/first-query.md)
- [SQD Portal](/en/portal/overview.md)
- [Core API Introduction](/en/sdk/squid-sdk/fuel/reference/openreader/api/intro.md)
- [Hyperliquid Portal API](/en/portal/hyperliquid/overview.md)
