# Programming with MicroPython: urequests & ujson

Please refer to official documentation for urequests and ujson for more details.

### Import FutureBoard Library

Import the Library to make use of its functions.

```
from future import *
```

### 08: urequests & ujson

### Import urequests and ujson

```
import urequests
import ujson
```

#### 1. Get Data from API

```
r=urequests.get(api_url)
data=ujson.loads(r.content)
```

Paste the GET request url of the API into the api\_url parameter.

Extract the data from parameter data.


---

# 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://sharinghub-eng.kittenbot.hk/main-controllers/futureboard/futureboard-micropython-programming-tutorial/programming-with-micropython-urequests-and-ujson.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.
