extract data from api response python