<?php
$baseUrl = 'http://nominatim.openstreetmap.org/search?format=json&limit=1';
$name = urlencode( 'Amsterdam, the Netherlands' );
$data = file_get_contents( "{$baseUrl}&q={$name}" );
$json = json_decode( $data );
var_dump( $json[0] );
?>
Output
NULL