This is a 2026 rewrite of our 2014 tutorial. The original pulled Spotify data through the Mashape API marketplace, which merged into RapidAPI in 2017 and no longer exists in that form; the Spotify Web API itself now requires OAuth 2.0 bearer tokens, so the "copy this header pair" flow cannot work. The rewrite uses a keyless public API so the component mechanics can be learned without an account, then points you to our OAuth 2.0 tutorial for authenticated APIs. The original screenshots have been removed because they no longer match.
In this post we walk through the basic steps required to pull JSON data from a REST API in Talend Studio and turn it into rows. The example calls Open-Meteo, a free weather API that needs no key, and extracts the current temperature and wind speed for San Antonio.
Step 1: Open Talend Studio
Open Talend Studio and create or open a project. Everything below works in Talend Studio 8 and in Qlik Talend Cloud's Studio; the same components existed in Talend Open Studio if you are still reading this from a legacy install.
Step 2: Create a new job
- Right click on Job Designs in the Repository window and select Create job
- Name the job
trest_extract
Step 3: Understand the API call
Open this URL in a browser:
https://api.open-meteo.com/v1/forecast?latitude=29.42&longitude=-98.49¤t=temperature_2m,wind_speed_10m
You get a JSON document like:
{
"latitude": 29.42,
"longitude": -98.49,
"timezone": "GMT",
"current_units": { "temperature_2m": "°C", "wind_speed_10m": "km/h" },
"current": {
"time": "2026-08-21T15:00",
"temperature_2m": 34.1,
"wind_speed_10m": 11.2
}
}
The values we want live under current. That is the JSONPath we will loop on.
Step 4: Add a tRESTClient component
Drop a tRESTClient onto the canvas. (The older tREST component also works for a simple GET, but tRESTClient handles headers, query parameters, and errors more cleanly and is what we use in real jobs.) Configure it:
- URL:
"https://api.open-meteo.com/v1/forecast" - HTTP Method:
GET - Accept Type:
JSON - Query parameters: add three rows:
latitude="29.42"longitude="-98.49"current="temperature_2m,wind_speed_10m"
Building the query string from parameters rather than pasting one URL makes it easy to drive the job from context variables later (for example a list of locations from a file feeding an Iterate link).
Step 5: Extract fields with tExtractJSONFields
Connect the Response output of tRESTClient to a tExtractJSONFields component. In its Component tab:
- Read By:
JsonPath - JSON field:
string(the response body column from tRESTClient) - Loop Jsonpath query:
"$.current" - Schema / Mapping: click Edit schema and add three columns, then map each:
| Column | Type | JSONPath query |
|---|---|---|
time | String | "time" |
temperature_2m | Double | "temperature_2m" |
wind_speed_10m | Double | "wind_speed_10m" |
Mapping queries are relative to the loop path, so "temperature_2m" means $.current.temperature_2m.
If you want the units as well, a second tExtractJSONFields looping on "$.current_units" gives you those; in most jobs you know the units and skip it.
Step 6: Log the output
Connect tExtractJSONFields to a tLogRow (Mode: Table) so you can see the rows. The finished job is three components in a line:
tRESTClient --Response--> tExtractJSONFields --Main--> tLogRow
Step 7: Run the job
Switch to the Run tab and click Run. You should see one row:
| time | temperature_2m | wind_speed_10m |
| 2026-08-21T15:00| 34.1 | 11.2 |
Replace tLogRow with a tDBOutput or tFileOutputDelimited and you have a working API-to-table load.
Step 8: Arrays and multiple rows
Most APIs return lists. Open-Meteo's hourly endpoint does:
https://api.open-meteo.com/v1/forecast?latitude=29.42&longitude=-98.49&hourly=temperature_2m
which returns parallel arrays under hourly.time and hourly.temperature_2m. For an array of objects (the common case, such as $.data[*] with one object per record) set the loop query to the array path and map the object fields. For Open-Meteo's parallel-array layout, loop on "$.hourly.time[*]" into one flow and on "$.hourly.temperature_2m[*]" into another, then join them on a tMap using a sequence number from Numeric.sequence("s", 1, 1). This is a quirk of this particular API, but it is a useful exercise in JSONPath.
The JSONPath syntax reference we still use is Stefan Goessner's original article; the component's Talend documentation is in the REST component reference.
Step 9: Where authentication comes in
Real APIs want a token. The job shape above does not change; you add a token-fetching subjob and an Authorization: Bearer ... header on tRESTClient, and you loop over pages. All of that is covered in Calling OAuth 2.0 APIs from Talend.
Troubleshooting
- Empty output, no error: the loop query does not match. Paste the response into a JSONPath tester and confirm the path; remember mapping queries are relative to the loop.
NumberFormatException: a column typed as Double received a string such as"N/A". Extract as String and convert in a tMap with a null check.- HTTP 4xx/5xx swallowed: enable Die on error on tRESTClient during development so failures are loud, and route the error flow to logging in production.
That is the whole pattern: call, extract, map. Everything else is handling the provider's particular shape of JSON.