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

<figure><img src="/files/kUv6j7BVGSsrNaZKnfcM" 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="/files/M05QS7UmbjWqIrwBruep" 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](/developer-support/api/rpc-endpoints/eth-rpc.md) are available here.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.quaiscan.io/developer-support/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
