# Limit data for /better\_forcast api

**URL:** <https://community.tempest.earth/t/limit-data-for-better-forcast-api/20057>\
**Category:** Developers\
**Tags:** rest\_api\
**Created:** [February 8, 2023, 2:15pm UTC](https://community.tempest.earth/t/limit-data-for-better-forcast-api/20057 "2023-02-08T14:15:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jake1164](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/jake1164/32/15243_2.png) [@jake1164](https://community.tempest.earth/u/jake1164)\
**Post date:** [February 8, 2023, 2:15pm UTC](https://community.tempest.earth/t/limit-data-for-better-forcast-api/20057/1 "2023-02-08T14:15:31Z")

</div>

I am using a RP2040 (pico w) to pull data from the weatherflow API and display the weather on an LED Matrix. The /observations/station/id api works well, however I would like to be able to use the current\_conditions from the /better\_forcast api. However, when I pull that API the json it returns for forcasts is HUGE. Are there any parameters to pull just the current\_conditions and / or just the forcast: Daily data from the api?

Example: (Scroll down to better\_forcast data)

> <https://github.com/jake1164/Pico-RGB-Matrix-Clock/blob/weather-api/samples_tempest_api.txt>

Note: The data returned for this api is 4722 lines long (pretty formatted).

---

<div class="post-metadata">

**Author:** ![sunny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/sunny/32/16368_2.png) [@sunny](https://community.tempest.earth/u/sunny)\
**Post date:** [February 8, 2023, 6:10pm UTC](https://community.tempest.earth/t/limit-data-for-better-forcast-api/20057/2 "2023-02-08T18:10:28Z")

</div>

perhaps you wanted to use [https://swd.weatherflow.com/swd/rest/observations/device/xxxxxx](https://swd.weatherflow.com/swd/rest/observations/device/xxxxxx)  
where xxxxxx is your device id.

---

<div class="post-metadata">

**Author:** ![jake1164](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/jake1164/32/15243_2.png) [@jake1164](https://community.tempest.earth/u/jake1164)\
**Post date:** [February 8, 2023, 6:32pm UTC](https://community.tempest.earth/t/limit-data-for-better-forcast-api/20057/3 "2023-02-08T18:32:49Z")

</div>

I am aware of the observations/station api, it just does not have the fields I am looking to display.  
For example:

```auto
current_conditions: {
    "conditions":xx,
    "icon": xx,
    wind_direction_cardinal: WNW,
    }

```

Granted the wind direction I could calculate, but conditions / condition icon are what I want out of the better\_forecast that is not available in the observations api.

---

<div class="post-metadata">

**Author:** ![mabeatty1978](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/mabeatty1978/32/15139_2.png) [@mabeatty1978](https://community.tempest.earth/u/mabeatty1978)\
**Post date:** [February 9, 2023, 3:11am UTC](https://community.tempest.earth/t/limit-data-for-better-forcast-api/20057/4 "2023-02-09T03:11:39Z")

</div>

I asked the same question not to long ago. There was a proposed solution at the bottom of the thread, but I have not yet had a chance to try it out. If you do, please reply back.

> [@Forecast API limit to one day](https://community.tempest.earth/t/forecast-api-limit-to-one-day/19710/5):
>
> there are streaming json parsers that can help there too. I ran into the very same problem with a little arduino esp32. You wont be able to parse the entire json response into memory ever, but what you can do is if you know the structure, use a streaming json parser, and have it pull out the data you care about when you need it.

---

<div class="post-metadata">

**Author:** ![jake1164](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/jake1164/32/15243_2.png) [@jake1164](https://community.tempest.earth/u/jake1164)\
**Post date:** [February 10, 2023, 12:44pm UTC](https://community.tempest.earth/t/limit-data-for-better-forcast-api/20057/5 "2023-02-10T12:44:10Z")

</div>

This is very interesting, now I just need to find something that is micropython / circuitpython compatible.

Thanks, this was really helpful!

---

<div class="post-metadata">

**Author:** ![mabeatty1978](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/mabeatty1978/32/15139_2.png) [@mabeatty1978](https://community.tempest.earth/u/mabeatty1978)\
**Post date:** [February 10, 2023, 1:02pm UTC](https://community.tempest.earth/t/limit-data-for-better-forcast-api/20057/6 "2023-02-10T13:02:06Z")

</div>

The Pico W runs MicroPython

---

<div class="post-metadata">

**Author:** ![jake1164](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/jake1164/32/15243_2.png) [@jake1164](https://community.tempest.earth/u/jake1164)\
**Post date:** [February 10, 2023, 1:22pm UTC](https://community.tempest.earth/t/limit-data-for-better-forcast-api/20057/7 "2023-02-10T13:22:50Z")

</div>

Runs with either, I am currently using circuitpython.

> **[CircuitPython - Pico W Download](https://circuitpython.org/board/raspberry_pi_pico_w/)**
>
> The Raspberry Pi foundation changed single-board computing when they released the Raspberry Pi computer, now they’re ready to do the same for microcontrollers with the release of the brand new Raspberry Pi Pico W. This low-cost microcontroller board...
