$url = 'http://data.gc.ca/data/en/api/action/package_show?id=98f1a129-f628-4ce4-b24d-6f16bf24dd64'; function CSVStrToArray($CSVStr){ $Data = explode("\n", $CSVStr); //split rows foreach($Data as &$Row) $Row = str_getcsv($Row, ","); //split cols return $Data; } $response=file_get_contents($url); $jsonDecode = SERVER::json_array($response); //SERVER::dump($jsonDecode); //fetch csv file url $list = $jsonDecode['result']['resources']; //SERVER::dump($list); $desiredLang = 'eng; CAN'; //Grab results in this language