#@title **Provide Site URL & Update Request Type** #@markdown Site URL will the exact URL you want to update or delete from the Google Search Index. **Also, please make a note that you have to provide URL only for the ownership verfied website. For any other URLs, it will not work.** siteURL = "https://guestpostus.blogspot.com/2024/02/what-is-guest-post-and-how-can-it_5.html" #@param {type:"string"} requestType = "URL_UPDATED" #@param ["URL_UPDATED", "URL_DELETED"] content = str({'url':siteURL,'type':requestType}) print("RESULT:");print('*'*50);print("URL and Update Request Type Configured!");print('*'*50); response, content = requests.request(ENDPOINT, method="POST", body=content) output = response['status'] if output == '200': print("Successfully Done!");print('*'*50); else: print("Error Code: {}".format(output));print('*'*50); print("Visit Here For More: https://developers.google.com/search/apis/indexing-api/v3/core-errors#api-errors"); print('*'*50);

Comments