# Quaiscan API

## Quaiscan Internal Documentation

To view Modules and API Reference documentation:

1. Generate documentation.

   `mix docs`
2. View the generated docs.

   `open doc/index.html`

## Requests and Limits

The default rate limit for requests is 50 requests/sec set via the `default_api_rate_limit` variable. This applies to global requests which do not originate from a whitelisted address or do not use an API key.

## Quaiscan API Usage

API calls can be accessed from the Quaiscan main menu, footer or header depending on the instance.

Quaiscan supports several methods:

1. **REST API**: API that serves the Quaiscan UI. -> [More info](https://docs.quaiscan.io/developer-support/api/rest-api-endpoints)
2. **RPC API**: provided for developers transitioning their applications from other networks to Quaiscan. Supports GET and POST requests.\
   -> [More info](https://docs.quaiscan.io/developer-support/api/rpc-endpoints)
3. **Quai RPC API**: Supports the most popular [JSON RPC methods](https://docs.qu.ai/build/playground/overview).\
   -> [More info](https://docs.quaiscan.io/developer-support/api/rpc-endpoints/eth-rpc)
4. [**Graphiql**](https://github.com/graphql/graphiql): An IDE for exploring GraphQL.

<figure><img src="https://3049643675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F38YKcjYqMJT3HBhioNFl%2Fuploads%2FqAPnHU1b0ypjrq9n2mcv%2FScreenshot%202024-09-27%20at%2011.00.17%E2%80%AFAM.png?alt=media&#x26;token=d2cb97f1-72eb-4b5c-81fa-678e2f6baf4a" alt=""><figcaption></figcaption></figure>

## GraphQL

Send Queries to quickly get information. Use the **Docs button** to quickly find arguments accepted by the schema. More information is available in our [Quaiscan GraphQL tutorial](https://forum.poa.network/t/graphql-in-blockscout/1971).

<figure><img src="https://3049643675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F38YKcjYqMJT3HBhioNFl%2Fuploads%2FZsaq5GBMXiiXfS5osJC2%2FScreenshot%202024-09-27%20at%203.18.53%E2%80%AFPM.png?alt=media&#x26;token=67d85131-a814-498c-bda7-03e6f38c3e8c" alt=""><figcaption></figcaption></figure>

## Quai RPC

Quaiscan supports the following methods. Requests and return data are identical to the [Quai documentation](https://docs.qu.ai/build/playground/overview).

* quai\_blockNumber
* quai\_getBalance
* quai\_getLogs
* quai\_gasPrice
* quai\_getTransactionByHash
* quai\_getTransactionReceipt
* quai\_chainId
* quai\_maxPriorityFeePerGas
* quai\_getTransactionCount
* quai\_getCode
* quai\_getStorageAt
* quai\_estimateGas
* quai\_getBlockByNumber
* quai\_getBlockByHash
* quai\_sendRawTransaction
* quai\_call

More details on [Quai RPC for Quaiscan](https://docs.quaiscan.io/developer-support/api/rpc-endpoints/eth-rpc) are available here.
