As the name implies, how to use python to elegantly access the API and parse and save the JSON content in a relational database (MYSQL) for later access?
Here I saved the data on the pandas object. But how do I create a mysql database, save json content on it and access the content for later use?
import json, requests
import pandas as pd
from pandas.io.json import json_normalize
url = 'https://api-v2.themuse.com/jobs'
for i in range(100):
data = json.loads(requests.get(
url=url,
params={'page': i}
).text)['results']
data_norm = pd.read_json(json.dumps(data))
user4679594
source
share