function semanticScholarURL(id, params = {}, method = 'paper') {
const API_URL = 'https://api.semanticscholar.org/graph/v1/';
const queryString = Object.entries(params)
.map(([key, value]) => `${key}=${encodeURIComponent(value)}`)
.join('&');
return `${API_URL}${method}/${id}?${queryString}`;
}