> For the complete documentation index, see [llms.txt](https://docs.membercounter.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.membercounter.app/readme/counters-list/http.md).

# HTTP

<figure><img src="/files/vXjC9p2vNIpPrgN3CDhl" alt="" width="494"><figcaption></figcaption></figure>

### Options

Counter allows you to specify URL of an endpoint it's going to receive answer from, as well as specifying response lifetime (cache) in seconds.\
Data path is a path to get the desired value when the response's content type is [JSON](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Scripting/JSON), the syntax is similar to one used by JS to access properties and array items.

For more information on how to use this counter, refer to [More on complex counters](/readme/using-the-bot/more-on-complex-counters-1.md).

### Example usage

You can discover more APIs to use [here](https://github.com/public-apis/public-apis?tab=readme-ov-file#weather).

{% tabs %}
{% tab title="IQAir (Air Quality)" %}
Air quality endpoint using [IQAir](https://api-docs.iqair.com/?version=latest) (free, api key after signing up).

```url
https://api.airvisual.com/v2/city?city=Los%20Angeles&state=California&country=USA&key={{YOUR_API_KEY}}
```

<figure><img src="/files/808mkT72LF2xIGxJHe0H" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Weather" %}
Weather endpoint using [Weatherapi.com](https://www.weatherapi.com/docs/) (free, api key after signing up).

```url
https://api.weatherapi.com/v1/current.json?key=<YOUR API KEY>&q=New%20York&aqi=no
```

<figure><img src="/files/B57IYXAdLvtjjBqMp19y" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Bitcoin Exchange Rate (USD)" %}
BTC Info endpoint using [Coinlore API](https://www.coinlore.com/cryptocurrency-data-api).

```url
https://api.coinlore.net/api/ticker/?id=90
```

<figure><img src="/files/3L9MNKw3XHXra4EHImT4" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}
