require 'json'
require 'net/http'
require 'uri'
def open(url)
Net::HTTP.get(URI.parse(url))
end
json = open('https://geocode-maps.yandex.ru/1.x/?format=json&geocode=%D0%A2%D0%B2%D0%B5%D1%80%D1%81')
data = JSON.parse(json)
puts data['response']['GeoObjectCollection']['featureMember'][0]['GeoObject']['metaDataProperty']['GeocoderMetaData']['text']
ideone.com/2aE2iL