# 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 %}


---

# 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.member-counter.eduardozgz.com/readme/counters-list/http.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.
