Mashape sends back a response object, not an array. To access parts of the object you need to point at the object keys with php - here's the relevant section on unirest.io:
Response Reference
Upon recieving a response Unirest returns the result in the form of an Object, this object >should always have the same keys for each language regarding to the response details.
'code'
- HTTP Response Status Code (Example200
)
'headers
' - HTTP Response Headers
'body'
- Parsed response body where applicable, for example JSON responses are parsed to Objects / Associative Arrays.
'raw_body'
- Un-parsed response body
So if you're doing something like print_r($response);
to give us this, do echo $response -> raw_body;
instead, then parse that as JSON (or get the parsed 'body' key).