json.extract! search, :id, :query, :created_at, :updated_at json.url search_url(search, format: :json)