Avec un petit bloc code :

Le bloc :
$tags=$scenario->getTags();
$dept=$tags['#département#'];
$url = 'https://data.opendatasoft.com/api/records/1.0/search/?dataset=vigilance-meteorologique%40public&q='.$dept.'&lang=fr&rows=1&facet=couleur&facet=risque_valeur';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
if ($data !== false)
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($data !== false && $status === 200) {
$decoded = json_decode($data);
$record=$decoded->records[0];
$tags['#risque#']=$record->fields->risque_valeur;
$tags['#niveau#']=$record->fields->couleur;
$tags['#commentaire#']=$record->fields->vigilancecommentaire_texte;
$scenario->setTags($tags);
}
else {
$scenario->setLog("Erreur, le site a retourné le code : ".$status);
}