/check-web-page-status

This endpoint is useful for checking the status of a web page and optionally verifying if a specific string is present in the page content. Additionally, it can send the result to a specified webhook URL.

Method: GET

Query Parameters:

  • url (required): The URL of the web page to check.
  • webhook (optional): A URL to which the result will be sent as a POST request in JSON format.
  • contains (optional): A string to search for within the content of the web page.

How to Make a Call:

To use this endpoint, make a GET request to the following URL with the necessary query parameters.

GET https://node.nodetrigger.com/check-web-page-status

Example Calls:

  1. Basic Usage Check the status of a web page:
   GET https://node.nodetrigger.com/check-web-page-status?url=https://example.com
  1. Checking for a Specific String and Using a Webhook Check the status of a web page, verify if it contains the string “hello world”, and send the result to a webhook:
   GET https://node.nodetrigger.com/check-web-page-status?url=https://example.com&contains=hello%20world&webhook=https://your-webhook-url.com

Response:

The response will be in JSON format and contain the following fields:

  • url: The URL of the checked web page.
  • status_code: The HTTP status code returned by the web page.
  • contains: The string that was searched for (if provided).
  • contains_found: A boolean indicating whether the string was found in the web page content.

Example Response:

{
    "url": "https://example.com",
    "status_code": 200,
    "contains": "hello world",
    "contains_found": true
}

Note: If there is an error fetching the URL, the response will contain an error message and a 500 status code.