# API

The HiveBuzz API allows developers to easily get information about users' badges and integrate them into their websites or applications.

The API is free to use. However, be aware that the call rate is throttled to avoid exhausting the server resources.

### Endpoint <a href="#endpoint" id="endpoint"></a>

[**https://hivebuzz.me/api**](http://hivebuzz.me/api)

## Retrieve a user's level image

<mark style="color:blue;">`GET`</mark> `https://hivebuzz.me/api/level/{username}`

HiveBuzz will update the image automatically whenever the user's level changes (up or down).

If you want the API to return the "Dead Fish" image whenever a user has been inactive and hasn't performed any transaction on the blockchain for more than 30 days, you can add the parameter `?dead` to your call.

#### Path Parameters

| Name                                       | Type   | Description       |
| ------------------------------------------ | ------ | ----------------- |
| username<mark style="color:red;">\*</mark> | String | The Hive username |

#### Query Parameters

| Name | Type | Description                                                                    |
| ---- | ---- | ------------------------------------------------------------------------------ |
| dead | bool | return a "Dead Fish" image IF the user has been inactive for more than 30 days |

*Examples:*\
<https://hivebuzz.me/api/level/arcange>\
<https://hivebuzz.me/api/level/ned>\
<https://hivebuzz.me/api/level/ned?dead>

## Retrieve all badges for a user

<mark style="color:blue;">`GET`</mark> `https://hivebuzz.me/api/badges/{username}`

Retrieve the list of all badges for a user, including those that were not collected by the user

Returns an array of objects with the following properties

| `type`              | badge type *(activity, perso, meetup)*                                                               |
| ------------------- | ---------------------------------------------------------------------------------------------------- |
| `ID`                | identifier                                                                                           |
| `name`              | short name                                                                                           |
| `title`             | name of the badge displayed on the board                                                             |
| `description`       | Description of the badge that is displayed in the description modal window when you click on a badge |
| `description_title` | Title displayed on the top of the description window                                                 |
| `group`             | Group identifier used to group badges by affinity                                                    |
| `url`               | url of the the badge                                                                                 |

Sample Response:

```
[
 ...,
 {
  "type": "perso",
  "ID": 38,
  "name": "birthday-3",
  "title": "3 years on the Hive blockchain",
  "description": "Congratulations! You joined Hive blockchain three years ago!",
  "description_title": "3 years on the Hive blockchain",
  "group": "P01",
  "url": "https://hivebuzz.me/badges/birthday-3.png"
 },
 {
  "type": "meetup",
  "ID": 43,
  "name": "steemfest-4",
  "title": "SteemFest 4 Attendee",
  "description": "You went to Bangkok to attend SteemFest⁴",
  "description_title": "SteemFest 4 Attendee",
  "group": "M01",
  "url": "https://hivebuzz.me/badges/steemfest-4.s4.png"
 },
 ...
]
```

*Examples:*\
<https://hivebuzz.me/api/badges/arcange>

## Retrieve the list of a badge owners

<mark style="color:blue;">`GET`</mark> `https://hivebuzz.me/api/owners/{id}`

#### Path Parameters

| Name                                 | Type    | Description          |
| ------------------------------------ | ------- | -------------------- |
| id<mark style="color:red;">\*</mark> | Integer | The badge identifier |

Returns an array of strings (usernames)

Sample Response:

`["achimmertens","arcange","brittandjosie","charly.travels","coolsurfer","detlev","fynemiene","louis88","martibis","pundito","rollie1212","sunsea"]`

*Example:*\
<https://hivebuzz.me/api/owners/43>


---

# 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.hivebuzz.me/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.
