require('md5') require('json') require("socket.http") local api_url = 'http://yilmazugurlu.me/static/js/api.json' local app_id = 'final12439812' local api_key = md5.sumhexa(app_id .. os.date('%Y-%m-%d')) local requrest_url = string.format('%s?key=%s', api_url, api_key) -- get data from api, returns 4 item at once response, header_code, headers, response_code = socket.http.request(requrest_url) -- decode to table response = json.decode(response) -- print for i,v in ipairs(response) do print (string.format('%s: %s - %s / %s TL.', v.id, v.kitap_adi, v.yazar_adi, v.fiyati)) end