This endpoint allows users to check the status of a web page by providing a URL. It retrieves the web page and checks whether it contains specific content, if specified. Users can also use a webhook to receive the results in real-time.
Endpoint Information
- Method: GET
- Endpoint URL: https://node.nodetrigger.com/api/check-web-page-status
- Content Type: application/json
Parameters
- url (required): The URL of the web page you want to check.
- webhook (optional): A webhook URL to which the results will be sent.
- contains (optional): Text content you want to check for in the web page.
Example Requests
Here are some example requests you can use to interact with the endpoint:
GET https://node.nodetrigger.com/api/check-web-page-status?url=https://example.com
GET https://node.nodetrigger.com/api/check-web-page-status?url=https://example.com&contains=hello
GET https://node.nodetrigger.com/api/check-web-page-status?url=https://example.com&webhook=https://webhook.site/your-webhook
Notes
- Ensure the URL parameter is provided, as it is required for the endpoint to function.
- If you want the endpoint to check for content within the web page, use the “contains” parameter and specify the text you are looking for.
- The status_code in the response indicates the HTTP status code of the web page that was checked.
- If you provide a webhook URL, ensure it can accept JSON payloads.
- In case of an error, such as the URL being inaccessible, you’ll receive an error message explaining the issue.
“`