Icon

Challenge 12 - Getting Brewery Data

<p><strong>Challenge 12: Getting Brewery Data</strong></p><p><strong>Level:&nbsp;</strong>Medium<br><br><strong>Description:&nbsp;</strong>Did you know that August 2nd is International Beer Day? To celebrate one of the world’s oldest beverages, you are tasked with retrieving all worldwide brewery data from&nbsp; the <strong>OpenBreweryDB</strong> REST API, which provides data on the breweries in paginated responses. Build a loop that makes successive requests to each page of the API until all data is retrieved.<br><br>Not interested in beer? Feel free to use any API of your choice! Find more public APIs here: <strong>https://publicapis.io/</strong></p>

URL: OpenBreweryDB https://www.openbrewerydb.org/
URL: OpenBreweryDB API Documentation https://www.openbrewerydb.org/documentation/

Challenge 12: Getting Brewery Data


Level: Medium

Description: Did you know that August 2nd is International Beer Day? To celebrate one of the world’s oldest beverages, you are tasked with retrieving all worldwide brewery data from the OpenBreweryDB REST API, which provides data on the breweries in paginated responses. Build a loop that makes successive requests to each page of the API until all data is retrieved.

Not interested in beer? Feel free to use any API of your choice! Find more public APIs here: https://publicapis.io/

Alternative loop nodes


Parse the datafrom JSON
JSON Path
Ungroup extractedlists
Ungroup
Current page =current iteration + 1
Math Formula (Variable)
Retrieve data fromthe current page
GET Request
Collect the datafrom all the pages
Loop End
Get the number of breweries
GET Request
Add page tothe base URL
String Manipulation (Variable)
Create pagesvariable
Table Row to Variable
Extract the totalnumber of breweries
JSON Path
Max number of resultsper page is 200Calculate the totalnumber of pages
Math Formula
Start the loop
Generic Loop Start
Collect the datafrom all the pagesStop when the currentpage is the last page
Variable Condition Loop End
Results View
Start the loopwith as many iterationsas many pages
Counting Loop Start

Nodes

Extensions

Links