Sub getData() ' Here is your key: 4a9b7fd2 ' Please append it to all of your API requests, ' OMDb API: http://www.omdbapi.com/?i=tt3896198&apikey=4a9b7fd2 Dim Movie As Object Dim scriptControl As Object Set scriptControl = CreateObject("MSScriptControl.ScriptControl") scriptControl.Language = "JScript" Range("A1:A25").Select Selection.EntireColumn.Delete Range("T25").Select With CreateObject("MSXML2.XMLHTTP") .Open "GET", "http://www.omdbapi.com/?i=tt3896198&apikey=4a9b7fd2", False .send Set Movie = scriptControl.Eval("(" + .responsetext + ")") Sheets(1).Cells(20, 1) = .responsetext .abort With Sheets(1) .Cells(1, 1).Value = Movie.Title .Cells(2, 1).Value = Movie.Year .Cells(3, 1).Value = Movie.Rated .Cells(4, 1).Value = Movie.Released .Cells(5, 1).Value = Movie.Runtime .Cells(6, 1).Value = Movie.Director .Cells(7, 1).Value = Movie.Writer .Cells(8, 1).Value = Movie.Actors .Cells(9, 1).Value = Movie.Plot .Cells(10, 1).Value = Movie.Language .Cells(11, 1).Value = Movie.Country .Cells(12, 1).Value = Movie.imdbRating End With End With End Sub |