# Hexes

H3 is a [hexagonal indexing system](https://eng.uber.com/h3/) for location, developed by Uber. [Resolution](https://h3geo.org/docs/core-library/restable/) corresponds with hex size. Smaller numbers are big and bigger numbers are small.

We track coverage for resolution 9 hexes, but batch request them by resolution 5 hexes.

### Hexes Group

## Select group of hexes under (res5) hex.

<mark style="color:blue;">`GET`</mark> `https://api.pollenmobile.io/explorer/hexes`

Select h3 hexes (resolution 9) and coverage status from larger (resolution 5) hexes.

#### Query Parameters

| Name                                           | Type                 | Description                              |
| ---------------------------------------------- | -------------------- | ---------------------------------------- |
| h3\_hex\_top<mark style="color:red;">\*</mark> | String,String,String | Comma separated string of res5 h3 hexes. |
| partial                                        | Boolean              | default False                            |

{% tabs %}
{% tab title="200: OK Array of res9 hexes and 'covered' boolean." %}

```javascript
// without 'partial' param
[
	{
		"h3_hex": "89283083583ffff",
		"covered": 0,
		"flower_count": 0,
		"flower_neighbor_count": 0,
		"pollen_dropped": 0
	},
	{
		"h3_hex": "89283082217ffff",
		"covered": 0,
		"flower_count": 0,
		"flower_neighbor_count": 0,
		"pollen_dropped": 1
	},
	// ... more items
]

// with 'partial' param
[
	{
		"h3_hex": "89283083583ffff",
		"covered": 0,
		"flower_count": 0
	},
	{
		"h3_hex": "89283082217ffff",
		"covered": 0,
		"flower_count": 0
	},
	// ... more items
]
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
This endpoint is primarily used for the [Pollen Explorer](https://explorer.pollenmobile.io) map view.
{% endhint %}

### Single Hex

## Select all devices data associated with a single resolution 9 hex.

<mark style="color:blue;">`GET`</mark> `https://api.pollenmobile.io/explorer/hex`

Hex data, all flowers that cover the hex, and all bees that have validated the hex.

#### Query Parameters

| Name                                      | Type   | Description           |
| ----------------------------------------- | ------ | --------------------- |
| h3\_hex<mark style="color:red;">\*</mark> | String | H3 Hex (resolution 9) |

{% tabs %}
{% tab title="200: OK Example response." %}

```javascript
{
	"hex": {
		"signalStrength": null,
		"last_covered": null,
		"attach": "0",
		"last_pollen_drop": "2022-06-06 20:06:07",
		"device": [
			"DazzlingExultantBumblebee"
		],
		"time": "2022-06-16 19:33:01",
		"h3_hex_top": "85283467fffffff",
		"flowers": [],
		"bountyReward": "0.1",
		"ping": null,
		"h3_hex": "89283465b67ffff",
		"lootBoxReward": "1",
		"dailyReward": "1",
		"bounty": "",
		"flowers_contained": [],
		"bounty_time": null
	},
	"flowers": [
		{
			"bounty_rewards": "0",
			"displayname": "CrabbyEducatedDandelion",
			"wallet_address": "FGQrHt8gRF2vkxRQdypM1QuwSXL3GPP5P6YUpyxtmM4T",
			"covered_hexes": [
				"8928309a2cfffff",
				"8928309b1cfffff",
				"8928309a23bffff",
				"8928309a28fffff",
				"8928309b423ffff",
				"89283098013ffff",
				"8928309b563ffff",
				"8928309a26bffff",
				"8928309a213ffff",
				...
			],
			"active": "1",
			"daily_covered_hexes": [
				"8928309b43bffff",
				"8928309a2cfffff",
				"8928309b40fffff",
				"8928309b423ffff",
				"8928309a243ffff",
				"8928309a20bffff",
				"8928309a257ffff"
			],
			"nickname": "CrabbyEducatedDandelion",
			"flower_attaches": "934764",
			"image_url": "https://zdldrwxi3zb2x5qp3tbn5b62wnogtjqusziem3exw76o5lwl.arweave.net/yNY42u_jeQ6v2D9-zC3ofas1xpphSWUEZsl7f87q7LY?ext=png",
			"update_time": "2022-07-13 12:57:34.182218",
			"daily_bees_seen": [
				"DazzlingExultantBumblebee"
			],
			"hbees_seen": [
				"TenuousFamousHoneybee"
			],
			"first_seen": "2022-06-11 00:00:51",
			"last_seen": "2022-07-12 13:17:41",
			"daily_attaches": "13364",
			"bounty_hexes": [],
			"h3_hex": "8928309a257ffff",
			"location_source": "Manual",
			"flower_rewards": "207342.901745158",
			"nft_address": "8ewtn9FEfSeHEPoEtKJu165PKygSGLZPvRVq9JrKujyf",
			"flowerID": "CrabbyEducatedDandelion",
			"daily_hbees_seen": [],
			"daily_rewards": "504.841402337",
			"bees_seen": {
				"DazzlingExultantBumblebee": "934764"
			}
		}
	],
	"bumblebees": [
		{
			"displayname": "DazzlingExultantBumblebee",
			"daily_hexes_covered": {
				"8928309a20bffff": "538",
				"8928309a21bffff": "35",
				"8928309a2cfffff": "177",
				"8928309a247ffff": "289",
				"8928309a253ffff": "29",
				"8928309a2c7ffff": "247",
				"8928309a257ffff": "42296"
			},
			"wallet_address": "FGQrHt8gRF2vkxRQdypM1QuwSXL3GPP5P6YUpyxtmM4T",
			"uncovered_hexes": [
				"8928303b403ffff",
				"8928346c883ffff",
				"892834745c3ffff",
				"8928347283bffff",
				"8928347162fffff",
				"8928347a877ffff",
				"8928309b67bffff",
				"8928308166fffff",
				"892834282d7ffff",
				"8928346cd4fffff",
				"892834611bbffff",
				... ],
			"covered_hexes": [
				"8928309a27bffff",
				"89283082a4fffff",
				"89283428ad3ffff",
				"8928346cc2fffff",
				"8928309a613ffff",
				"8928309a203ffff",
				"8928308112bffff",
				"8928309b523ffff",
				"8928309b5a3ffff",
				"8928309b1c7ffff",
				... ],
			"active": "1",
			"nickname": "DazzlingExultantBumblebee",
			"pollination_hexes": [
				"8928309a20bffff",
				"8928309a213ffff",
				"8928309a21bffff",
				"8928309a247ffff",
				"8928309a253ffff",
				"8928309a257ffff",
				"8928309a2c3ffff",
				"8928309a2c7ffff",
				"8928309a2cfffff"
			],
			"daily_flowers_seen": {
				"CrabbyEducatedDandelion": [
					"8928309a253ffff",
					"8928309a2cfffff",
					"8928309a2c7ffff",
					"8928309a20bffff",
					"8928309a21bffff",
					"8928309a257ffff",
					"8928309a247ffff"
				]
			},
			"flowers_seen": {
				"DapperColorfulDandelion": "204",
				"SourCleverButtercup": "10",
				"SillyGrouchyButtercup": "1461",
				"ChunkyBrokenButtercup": "23",
				"AromaticImminentButtercup": "13",
				"AspiringConfusedButtercup": "84",
				"LaboredBerserkButtercup": "94",
				"UnusualUpbeatButtercup": "59",
				"CrabbyEducatedDandelion": "2645958",
				"SkinnyProfuseButtercup": "38",
				"PluckyCrazyButtercup": "6186",
				"DamagedEliteButtercup": "274",
				"LateEconomicButtercup": "7867",
				"RipeGoodButtercup": "139"
			},
			"daily_hexes_uncovered": {},
			"image_url": "https://z7fb3r5wzb424jocxobkrjconmdi4srulltx34wmrjm7ilnfba.arweave.net/z8odx7bIea4lwruCqKROawaOSjRa533yzIpZ9_C2lCM?ext=png",
			"update_time": "2022-06-30 18:19:39.581641",
			"first_seen": "2022-02-17 03:18:39",
			"bee_rewards": "45686.207588422",
			"SerialID": "https://solscan.io/token/3SUfywDexhcnBsHTzhRhNPMvZ9DGA9NDB6vjo11muh5x",
			"last_seen": "2022-06-30 00:00:08",
			"bee_attaches": "5667899",
			"daily_attaches": "43611",
			"nft_address": "3SUfywDexhcnBsHTzhRhNPMvZ9DGA9NDB6vjo11muh5x",
			"beeID": "DazzlingExultantBumblebee",
			"daily_rewards": "108.467209767"
		}
	],
	"honeybees": [
	{
			"displayname": "TenuousFamousHoneybee",
			"daily_hexes_covered": [],
			"wallet_address": "FGQrHt8gRF2vkxRQdypM1QuwSXL3GPP5P6YUpyxtmM4T",
			"uncovered_hexes": [
				"8928309a2cfffff",
				"8928346c8b3ffff",
				"8928346345bffff",
				"8928309b62fffff",
				"89283418ac3ffff",
				"8928309b0a7ffff",
				"892830950a3ffff",
				"892834732a7ffff",
				"89283464db3ffff",
				"8928308112fffff",
				"892834199a3ffff",
				"8928346564bffff",
				"8928309841bffff",
				"89283428e47ffff",
				"892834658c7ffff",
				...
			],
			"covered_hexes": [],
			"active": "1",
			"nickname": "TenuousFamousHoneybee",
			"pollination_hexes": [
				"892830934cbffff",
				"892830934d3ffff",
				"892830934dbffff",
				"89283093643ffff",
				"8928309364bffff",
				"89283093657ffff",
				"89283093683ffff",
				"8928309368bffff",
				"89283093693ffff",
				"8928309369bffff",
				"892830936c7ffff",
				"892830936cfffff",
				"8928309a253ffff",
				"8928309a257ffff",
				"8928309a25bffff",
				"8928309a2cfffff",
				...
			],
			"daily_flowers_seen": [
				"RipeGoodButtercup"
			],
			"flowers_seen": [
				"DamagedEliteButtercup",
				"AblazeHissingButtercup",
				"AbruptPremiumButtercup",
				"CrabbyEducatedDandelion",
				"PluckyCrazyButtercup",
				"MajesticJoyousButtercup",
				"RipeGoodButtercup",
				"RuddyHomelessButtercup",
				"UnusualUpbeatButtercup",
				"AspiringConfusedButtercup",
				"SeemlyOafishButtercup"
			],
			"daily_hexes_uncovered": [],
			"image_url": "https://www.arweave.net/9bl4xsTf8E3HjSO00NVYenlsoYBBmYWzGH2WwH1baRg?ext=png",
			"update_time": "2022-07-13 12:57:34.178431",
			"first_seen": "2022-06-02 19:42:46",
			"bee_rewards": "2590.763536918",
			"last_seen": "2022-07-12 23:46:58.863140212",
			"bee_attaches": "291",
			"daily_attaches": "5",
			"nft_address": "GW8xK97G8x82mPz2uB2NzKPiww8bGbpoDBvC1A3MjFwq",
			"beeID": "TenuousFamousHoneybee",
			"daily_rewards": "55.555555556"
		}
	]		
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
This endpoint is primarily used for the [Pollen Explorer](https://explorer.pollenmobile.io) when clicking a hex.
{% endhint %}


---

# 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.pollenmobile.io/pollen-public-api/reference/api-reference/hexes.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.
