Skip to content
Advertisement

Python – save multiple responses from multiple requests

I am pulling JSON data from an api and I am looking to pass in a different parameter for each request and save each response

My current code

JavaScript

I save a response and print out the values.

JavaScript

This is fine and it works but I only store the first ID’s response.

How do I store the responses from all of the requests? So I’m looking to send multiple requests where the ID changes every time and save each response essentially.

I’m using python version 3.10.4 .

Advertisement

Answer

My code for this in case anyone stumbles across this.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement