# Public API

#### Quest Retrieval

The RabbiteHole API allows third parties to list relevant quests within their application. Today, we provide simple endpoints to retrieve a paginate list of quests, or a specific quest given a `UUID`.

## Get a List of Quests

<mark style="color:blue;">`GET`</mark> `https://public-api.rabbithole.gg/v1/quests`

Returns all the quests for an address, status, and value

#### Query Parameters

| Name         | Type   | Description                               |
| ------------ | ------ | ----------------------------------------- |
| address      | String | Users address we're retrieving quests for |
| status       | String | Status of quests to return                |
| ethValue     | String | Minimum quest value to return             |
| questNetwork | String | Claim network for quest                   |
| taskNetwork  | String | Network action should be completed on     |
| pageNo       | String | For pagination                            |
| pageSize     | String | For pagination                            |

{% tabs %}
{% tab title="200: OK " %}

```json
[
  {
    "quest": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", // UUID
      "appLink": "string",
      "iconOption": "string",
      "imagePath": "string",
      "name": "string",
      "questEnd": "string",
      "questStart": "string",
      "description": "string",
      "network": "eth-mainnet",
      "status": "string",
      "createdAt": "string",
      "contractAddress": "string",
      "creatorAddress": "string",
      "allowlistEnabled": true,
      "task": {
        "name": "string",
        "description": "string",
        "link": "string",
        "iconOption": "string",
        "contractAddress": "string",
        "network": "eth-mainnet"
      }
    },
    "reward": {
      "amount": "string",
      "allocations": 0,
      "allocationsClaimed": 0,
      "type": "string",
      "tokenSymbol": "string",
      "token": "string",
      "network": "string",
      "tokenImage": "string",
      "ethValue": "string",
      "tokenContractAddress": "string",
      "decimals": 0,
      "tokenId": "string"
    }
  }
]
```

{% endtab %}
{% endtabs %}

[**Try it Out**](https://public-api.rabbithole.gg/openapi/#/Quest/get_v1_quests)

## Get a Single Quest

<mark style="color:blue;">`GET`</mark> `https://public-api.rabbithole.gg/v1/quest`

#### Query Parameters

| Name                                      | Type   | Description       |
| ----------------------------------------- | ------ | ----------------- |
| address                                   | String | User adress       |
| questId<mark style="color:red;">\*</mark> | String | UUID of the quest |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  "quest": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "appLink": "string",
    "iconOption": "string",
    "imagePath": "string",
    "name": "string",
    "questEnd": "string",
    "questStart": "string",
    "description": "string",
    "network": "eth-mainnet",
    "status": "string",
    "createdAt": "string",
    "contractAddress": "string",
    "creatorAddress": "string",
    "allowlistEnabled": true,
    "task": { // Custom task RH descriptors
      "name": "string",
      "description": "string",
      "link": "string",
      "iconOption": "string",
      "contractAddress": "string",
      "network": "eth-mainnet"
    }
  },
  "reward": {
    "amount": "string",
    "allocations": 0,
    "allocationsClaimed": 0,
    "type": "string",
    "tokenSymbol": "string",
    "token": "string",
    "network": "string",
    "tokenImage": "string",
    "ethValue": "string",
    "tokenContractAddress": "string",
    "decimals": 0,
    "tokenId": "string"
  }
}
```

{% endtab %}
{% endtabs %}

#### [Try it Out](https://public-api.rabbithole.gg/openapi/#/Quest/get_v1_quest)

#### Further Endpoints

The ability to create quests, and receive signatures to claim quests are possible today using our internal API. If you have a use case that requires retrieving quest signatures or submitting claims please reach out for information on how to complete these queries. When these endpoints are made public the correct documentation will be added 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://help.rabbithole.gg/for-developers/public-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.
