Created
May 8, 2023 23:54
-
-
Save extrasleepy/53237bf43025efa5ee2623263e71ca7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
from requests import get | |
app_id = 'your id' | |
app_key = 'your app key' | |
url = 'https://api.edamam.com/api/recipes/v2?type=public&q=chicken&app_id='+app_id+'&app_key='+app_key+'&cuisineType=American' | |
one_food = get(url).json() | |
print (one_food['hits'][0]['recipe']['label']) | |
print ('\n') | |
print (one_food['hits'][0]['recipe']['ingredientLines']) | |
print ('\n') | |
another_food = get(url).json() | |
print (another_food['hits'][1]['recipe']['label']) | |
print ('\n') | |
print (another_food['hits'][1]['recipe']['ingredientLines']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment