'Is there any way to limit json request items?
Is there any way to limit how many items I want to get from a JSON
request?
the code I use:
import json
import requests
url = 'https://api.github.com/users'
response = json.loads((requests.get(url)).text)
the JSON
response may have thousands of different items and getting all of it may take so much time but I want to get for example first 100
and be done so fast, is there any optimal way to do this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|