Created
June 24, 2023 09:42
-
-
Save anemochore/bee40cc008385d082121356ad79c7092 to your computer and use it in GitHub Desktop.
search api of justwatch.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//run on console on https://www.justwatch.com/ | |
//other usages are on https://github.com/Fredwuz/node-justwatch-api etc. | |
var query = '진격의 거인'; | |
var locale = 'ko_KR'; | |
var endpoint = '/titles/'+locale+'/popular'; | |
var url = 'https://apis.justwatch.com/content' + endpoint; | |
var params = { | |
fields: ['id', 'title', 'object_type', 'original_release_year', 'scoring', 'full_path', 'external_ids', 'original_title'], | |
query: query, | |
page_size: 10, | |
}; | |
var resp = await fetch(url, { | |
method: 'POST', | |
body: JSON.stringify(params), | |
}); | |
var j = await resp.json(); | |
console.log(j); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment