https://newsapi.org/s/google-news-api
Я только что сделал ID и получил ключ api 1 месяц a go, и теперь, когда я запускаю этот код, его ошибка отправки:
<!DOCTYPE html>[![enter image description here][1]][1]
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>news</title>
</head>
<body>
<script>
//made free seprate ID for api key and test whose API key is this
fetch("http://newsapi.org/v2/top-headlines?sources=google-news-in&apiKey=353c319a91b44d769d3d857541d2acad", {
"method": "GET"
})
.then(res=>res.json())
.then(data=>{
console.log(data);
})
.catch(err => {
console.log(err);
});
</script>
</body>
</html>