Skip to main content

How to Make an iPhone Widget From a JSON API

Track a kiln temperature, earthquake count, or service status on your iPhone. Pick one JSON field in Busybody, without writing code.

By Peter BrayPublished

An illustration using two native Busybody widgets and fictional kiln readings. One shows the cooling curve. The other tells the studio which stage the firing program has reached.

Pick one JSON field from the API response

Our sample pottery kiln has a programmed peak of 1,945 °F. Right now it's cooling at 184 °F. Both numbers come from the same JSON API. If I pick the programmed peak for my Busybody widget, I could spend the whole afternoon looking at 1,945 while the kiln cools.

{
  "kiln": {
    "program_peak_f": 1945,
    "temperature_f": 184,
    "stage": "Cooling"
  },
  "observed_at": "2026-11-19T17:41:00Z"
}

You need the HTTPS address that returns the data. If you're following along, you can use the USGS earthquake feed (opens in new tab) in place of the studio example. On iPhone, press and hold the link to copy its address. It needs no account or API key. For a dashboard that only offers a webpage, you can use a website widget to show a crop of the page.

Test the API request

In Busybody, tap + to open Add Source, then choose API Request. Paste the endpoint into API URL, give it a name you'll recognize in the widget picker, and leave Method on GET. For a private endpoint, enter the credentials its API requires under Authentication or Custom headers. Tap Test Request.

Studio kiln is the name you'll see when you add the widget. Use the address of your data source in place of the studio's example URL.

Pick a field and check the preview

Once you see Response received, go to Response and leave Display on Value. Tap Choose a field. Each row shows the field name, its full path, and the value the server sent. Busybody selects the field for you if there's only one number.

For the kiln, choose temperature_f under kiln and enter °F as the unit. The preview should read 184 °F. For USGS, search for count and choose the one under metadata. Use quakes as the unit. Your preview will show the current count.

Both fields use Fahrenheit. The path tells you which one is the thermometer, and the preview shows what you'll get on the widget.

If a number is missing from the picker, look at how the API writes it. 184 is a JSON number and can go on a chart. "184" is a string and appears under Text. The unit is just a label, so typing °C next to 184 won't convert the reading. You can switch fields and compare previews using the same test response.

Give the reading its own timestamp

Suppose the kiln last reported at 9:41 am Pacific, and you check it at 10 am. Which time do you want on the chart? Busybody normally uses the time it received the response. To plot the sensor's reading at 9:41, open Observation time, turn on Use a timestamp from the response, and choose observed_at. The sample kiln supplies an ISO 8601 date. For USGS, choose generated under metadata and set the format to Unix milliseconds. That's when USGS generated the whole feed.

Add the API widget to your iPhone Home Screen

Review the terms if prompted, then tap Add to save your source. On the Home Screen, touch and hold an empty spot, then tap Edit and Add Widget. Find Busybody, choose API Request, pick a size, and tap Add Widget. Touch and hold the new widget, tap Edit Widget, and select your saved source under API Request. Apple's widget instructions (opens in new tab)

Your first sample gives you a number. As Busybody collects more readings, the widget draws a line between them. Tap it to open the history. The sample chart above starts at 716 °F and ends six hours later at 184 °F. Apple schedules widget refreshes, so an Hourly preference can leave you looking at an older observation. How WidgetKit schedules updates (opens in new tab)

For the second kiln widget, use the same URL in another source, set Display to Text, choose JSON, and pick stage. Now the widget reads Cooling. Busybody includes one active source free. Tracking the temperature and stage in two sources at the same time takes Busybody Pro.

Three public APIs you can try without a key

Copy any of these endpoint links into API URL and use GET. The values below came back when I checked them. You'll get whatever the service reports when you tap Test Request.

Native widget views rendered from one saved response from each public feed. The earthquake widget has one observation so far.

Count earthquakes in the past 24 hours

The USGS magnitude 4.5+ endpoint (opens in new tab) returns a list of earthquakes, with a count for the whole list at $["metadata"]["count"]. My test returned 12. Pick that field in Value and name the source M4.5+ past day. A dip in the chart makes sense here. An earthquake drops out of the count when it passes the 24 hour mark. USGS feed definitions (opens in new tab)

Put GitHub's service status into words

Use GitHub's status endpoint (opens in new tab), set Display to Text, and leave Response format on JSON. Choose $["status"]["description"]. GitHub returned All Systems Operational. The nearby indicator field said none. Both are strings, but only one tells me what I wanted to know when I glanced at my phone. GitHub Status API (opens in new tab)

Follow how many euros one US dollar buys

Paste the Frankfurter USD to EUR endpoint (opens in new tab) into Busybody. With Value selected, rate is the only numeric field. My test returned 0.91054. I'd name the source USD to EUR and use EUR per USD for the unit. That keeps the direction clear a week later, when I've forgotten which currency I put first. Frankfurter supplies reference rates. Frankfurter exchange rate documentation (opens in new tab)

Three widget recipes for your own endpoints

An illustration of two Busybody widgets using fictional data. The queue returns a number inside JSON. The ferry sends a sentence as the entire response.

Open requests. Suppose your help desk takes a search via POST. Set Body format to JSON and enter {"query":"open_requests"}. If the reply is {"count":42}, select Value, choose count, and name the source Open requests. Busybody sets POST requests to Manual at first. For a search like this one, you can choose a Requested refresh interval under Updates to collect readings. Each refresh sends the POST again. Use the search endpoint here. A ticket creation endpoint could open another ticket at every refresh.

Which pier is the ferry using? Suppose the ferry operator's text endpoint returns East pier closed. Use the west pier for today's sailings. Choose Text and set Response format to Plain text. There's no JSON field to select. The sentence itself goes on the widget.

Open docks at your bike stop. Say the station on Fourth Street has four open docks. You find its open_docks field and see 4 in the preview. Check the path before you save it. If it reads $["stations"][0]["open_docks"], the widget will follow whichever station comes first in the list. I'd use a station specific URL or an API query that filters to Fourth Street's station ID. That way, tomorrow's count is still for the stop on my route.

Bless up! 🙏✨