Google search API

  1. What do you want to achieve?
    I want to use the google search API in lua.
    Basically trying to test google API here in roblox.

  2. What is the issue?
    The output says ‘Can’t parse JSON’

local http = game:GetService("HttpService")

local key = "can't show this on dev forum, but this is where I put the key."
local id = "e436ddcaffbe639cd"
local search = "cat"

local result = http:JSONDecode("https://www.googleapis.com/customsearch/v1?key=" .. key .."&cx=017576662512468239146:omuauf_lfve&q=lectures&callback=hndlr")
print(result)

This is where google describes the usage.

It’s because you’re decoding the URL itself. You need to instead decode the result of an HTTP request. Do something like http:GetAsync() first. Check out the International Space Station example on this page to see what I’m talking about.