javascript
const apiKey = 'd737ef42706a4ad6ad4f14bd34f3f914'; // Replace with your actual API key
const url = 'https://assistantpharmacy.blogspot.com/p/indixnow.html'; // Replace with the URL of your post
fetch('https://www.bing.com/IndexNow?url=' + encodeURIComponent(url) + '&key=' + apiKey, {
method: 'GET',
})
.then(response => {
if (response.ok) {
console.log('IndexNow notification sent successfully.');
} else {
console.error('Failed to send IndexNow notification:', response.statusText);
}
})
.catch(error => {
console.error('Error sending IndexNow notification:', error);
});