Watch

The Watch API lets you monitor websites for changes over time. Create watch jobs that automatically check for updates on your chosen schedule and notify you via email when content changes. Perfect for monitoring competitor websites, tracking product updates, or staying informed about important webpage modifications.

Quick example

Create a watch job to monitor a website for changes:

curl https://api.supacrawler.com/api/v1/watch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/pricing",
    "frequency": "daily",
    "notify_email": "[email protected]",
    "notification_preference": "changes_only"
  }'

Watch created

{
  "success": true,
  "watch_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Watch job created successfully"
}
curl https://api.supacrawler.com/api/v1/watch/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_API_KEY"

Watch details with results

{
  "success": true,
  "watch": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "url": "https://example.com/pricing",
    "frequency": "daily",
    "notify_email": "[email protected]",
    "include_html": false,
    "include_image": false,
    "last_check": "2023-06-10T15:30:00Z",
    "last_notification": "2023-06-10T15:30:00Z",
    "status": "active",
    "created_at": "2023-06-01T12:00:00Z"
  },
  "results": [
    {
      "id": "650e8400-e29b-41d4-a716-446655440001",
      "executed_at": "2023-06-10T15:30:00Z",
      "has_changed": true,
      "change_type": "text",
      "content_hash": "a1b2c3d4e5f6..."
    },
    {
      "id": "750e8400-e29b-41d4-a716-446655440002",
      "executed_at": "2023-06-09T15:30:00Z",
      "has_changed": false,
      "change_type": null,
      "content_hash": "a1b2c3d4e5f6..."
    }
  ]
}

The watch response model

Watch responses contain information about the watch configuration and results.

Properties

  • Name
    success
    Type
    boolean
    Description

    Indicates whether the operation was successful.

  • Name
    watch_id
    Type
    string
    Description

    Unique identifier for the watch job (creation response).

  • Name
    message
    Type
    string
    Description

    Success message for the operation (creation/deletion response).

  • Name
    watch
    Type
    object
    Description

    Watch job details (status response).

    • Name
      id
      Type
      string
      Description

      Unique identifier for the watch job.

    • Name
      user_id
      Type
      string
      Description

      User ID who created the watch job.

    • Name
      url
      Type
      string
      Description

      The URL being monitored.

    • Name
      selector
      Type
      string
      Description

      CSS selector for targeted monitoring (if specified).

    • Name
      frequency
      Type
      string
      Description

      Check frequency: hourly, daily, weekly, monthly, or custom.

    • Name
      custom_frequency
      Type
      string
      Description

      Custom cron expression (only when frequency is custom).

    • Name
      notify_email
      Type
      string
      Description

      Email address for notifications.

    • Name
      include_html
      Type
      boolean
      Description

      Whether to include HTML content in notifications.

    • Name
      include_image
      Type
      boolean
      Description

      Whether to include screenshots in notifications.

    • Name
      full_page
      Type
      boolean
      Description

      Whether to take full-page screenshots.

    • Name
      quality
      Type
      integer
      Description

      Screenshot quality (1-100).

    • Name
      last_check
      Type
      string
      Description

      Timestamp of the last check execution.

    • Name
      last_notification
      Type
      string
      Description

      Timestamp of the last notification sent.

    • Name
      cron_job_name
      Type
      string
      Description

      Internal cron job identifier.

    • Name
      created_at
      Type
      string
      Description

      Timestamp when the watch job was created.

    • Name
      updated_at
      Type
      string
      Description

      Timestamp when the watch job was last updated.

    • Name
      status
      Type
      string
      Description

      Current watch status: active, paused.

  • Name
    results
    Type
    array
    Description

    Array of recent watch check results.

    • Name
      id
      Type
      string
      Description

      Unique identifier for the check result.

    • Name
      watch_job_id
      Type
      string
      Description

      ID of the associated watch job.

    • Name
      content
      Type
      string
      Description

      Markdown content of the checked page (if available).

    • Name
      html_content
      Type
      string
      Description

      HTML content (only when include_html is enabled).

    • Name
      content_hash
      Type
      string
      Description

      Hash of the content for change detection.

    • Name
      image_url
      Type
      string
      Description

      URL to screenshot image (only when include_image is enabled).

    • Name
      has_changed
      Type
      boolean
      Description

      Whether changes were detected in this check.

    • Name
      change_type
      Type
      string
      Description

      Type of change detected: text, visual, or both.

    • Name
      executed_at
      Type
      string
      Description

      Timestamp when the check was executed.


POST/v1/watch

Create a watch job

This endpoint creates a new watch job that will periodically check a URL for content changes and notify you when changes are detected.

Required attributes

  • Name
    url
    Type
    string
    Description

    The URL to monitor for changes. Must be a valid HTTP or HTTPS URL.

  • Name
    frequency
    Type
    string
    Description

    How often to check for changes: hourly, daily, weekly, monthly, or custom.

Optional attributes

  • Name
    selector
    Type
    string
    Description

    CSS selector to target a specific element on the page. If omitted, monitors the full page content.

  • Name
    notification_preference
    Type
    string
    Description

    Email notification behavior when notify_email is provided. Allowed values: "changes_only" (default) or "all_runs".

  • Name
    notify_email
    Type
    string
    Description

    Email address to receive notifications when changes are detected. If not provided, changes will be logged but no email notifications sent.

  • Name
    include_html
    Type
    boolean
    Description

    Include HTML content in notifications and storage (default: false).

  • Name
    include_image
    Type
    boolean
    Description

    Include screenshot in notifications and storage (default: false).

  • Name
    full_page
    Type
    boolean
    Description

    Take a full-page screenshot instead of just the viewport (default: false). Only applicable when include_image is true.

  • Name
    quality
    Type
    integer
    Description

    Screenshot quality (1-100). Default is 80. Values > 80 are considered high-quality and cost more credits.

  • Name
    custom_frequency
    Type
    string
    Description

    Custom cron expression when using frequency="custom" (e.g., "0 9 * * MON-FRI" for weekdays at 9am).

Request

POST
/v1/watch
curl https://api.supacrawler.com/api/v1/watch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/pricing",
    "frequency": "daily",
    "notification_preference": "changes_only",
    "notify_email": "[email protected]",
    "include_html": true
  }'

Advanced examples

curl https://api.supacrawler.com/api/v1/watch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/products",
    "frequency": "daily", 
    "notification_preference": "all_runs",
    "notify_email": "[email protected]",
    "include_image": true,
    "full_page": true,
    "quality": 90
  }'

Response

{
  "success": true,
  "watch_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Watch job created successfully"
}

GET/v1/watch/{id}

Get watch job status

This endpoint allows you to check the status and results of a specific watch job.

Path parameters

  • Name
    id
    Type
    string
    Description

    The unique watch job ID returned when creating the watch job.

Request

GET
/v1/watch/{id}
curl https://api.supacrawler.com/api/v1/watch/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "watch_id": "550e8400-e29b-41d4-a716-446655440000",
  "url": "https://example.com/pricing",
  "status": "active",
  "frequency": "daily",
  "last_check": "2023-06-10T15:30:00Z",
  "has_changes": true,
  "results": [
    {
      "executed_at": "2023-06-10T15:30:00Z",
      "has_changed": true,
      "change_type": "text",
      "content_snippet": "Pricing updated with new enterprise tier...",
      "image_url": "https://storage.supacrawler.com/screenshots/watch-550e8400-e29b-41d4-a716-446655440000-2023-06-10.png"
    },
    {
      "executed_at": "2023-06-09T15:30:00Z",
      "has_changed": false,
      "change_type": "",
      "content_snippet": "No changes detected",
      "image_url": ""
    }
  ]
}

GET/v1/watch

List all watch jobs

This endpoint returns a list of all your active watch jobs.

Request

GET
/v1/watch
curl https://api.supacrawler.com/api/v1/watch \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "total": 2,
  "watches": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "user_id": "user-123",
      "url": "https://example.com/pricing",
      "frequency": "daily",
      "notify_email": "[email protected]",
      "include_html": true,
      "include_image": false,
      "last_check": "2023-06-10T15:30:00Z",
      "status": "active",
      "created_at": "2023-06-01T12:00:00Z",
      "updated_at": "2023-06-10T15:30:00Z"
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440003",
      "user_id": "user-123",
      "url": "https://competitor.com/features",
      "frequency": "weekly",
      "selector": ".feature-list",
      "notify_email": "[email protected]",
      "include_html": false,
      "include_image": true,
      "last_check": "2023-06-07T12:00:00Z",
      "status": "active",
      "created_at": "2023-06-02T09:00:00Z",
      "updated_at": "2023-06-07T12:00:00Z"
    }
  ]
}

DELETE/v1/watch/{id}

Delete a watch job

This endpoint allows you to delete a watch job. Once deleted, the job will stop monitoring the URL and will no longer send notifications.

Path parameters

  • Name
    id
    Type
    string
    Description

    The unique watch job ID to delete.

Request

DELETE
/v1/watch/{id}
curl -X DELETE https://api.supacrawler.com/api/v1/watch/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "message": "Watch job deleted successfully"
}

Frequency options

The watch API supports different frequency options to suit your monitoring needs:

Hourly

Check for changes every hour. Ideal for time-sensitive content that changes frequently.

Daily

Check for changes once per day (at approximately the same time the watch was created). This is the recommended option for most use cases.

Weekly

Check for changes once per week. Good for content that changes infrequently.

Monthly

Check for changes once per month. Suitable for very stable content with rare updates.

Custom

Specify your own schedule using a cron expression. This gives you maximum flexibility to define exactly when checks should happen.

Custom schedule examples

# Every weekday at 9 AM
"0 9 * * MON-FRI"

# Every 6 hours
"0 */6 * * *"

# Every Monday and Thursday at 2 PM
"0 14 * * MON,THU"

Notification behavior

When a watch job detects changes, it will:

  1. Record the change in your watch history
  2. Send an email notification to the specified email address
  3. Include relevant content based on your configuration:
    • Always: Text of what changed
    • If include_html: Full HTML content
    • If include_image: Screenshot of the page

Email notifications include:

  • Subject line with the URL that changed
  • Time of detection
  • Type of change detected
  • Link to view full details
  • Content differences (highlighted where possible)

Best practices

Choosing the right frequency

  • Start with less frequent checks (daily/weekly) and adjust as needed
  • Consider the nature of the content you're monitoring
  • Remember that higher frequency checks consume more credits

Using selectors effectively

For the most efficient monitoring, use CSS selectors to target specific elements:

curl https://api.supacrawler.com/api/v1/watch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/pricing",
    "frequency": "daily",
    "notify_email": "[email protected]",
    "selector": "#pricing-table"
  }'

Common selector examples:

  • .main-content - Target elements with class "main-content"
  • #product-description - Target element with ID "product-description"
  • table.pricing - Target pricing tables
  • .blog-post p - Target paragraphs within blog posts

Reducing noise

To avoid notification fatigue:

  • Monitor only specific elements that matter to you
  • Choose appropriate check frequencies
  • Consider using weekly monitoring for less critical content

Error handling

  • Name
    400 Bad Request
    Description

    Invalid watch parameters or missing required fields.

  • Name
    401 Unauthorized
    Description
    Invalid or missing API key.
  • Name
    404 Not Found
    Description
    Watch job ID not found.
  • Name
    429 Too Many Requests
    Description

    Rate limit exceeded or too many watch jobs.

Error response example

{
  "success": false,
  "error": "Invalid frequency specified. Must be one of: hourly, daily, weekly, monthly, custom"
}

Watch credits consumption

Watch jobs consume credits based on several factors. Understanding these costs will help you optimize your monitoring strategy.

Base cost calculation

For each check:

  • Base cost: 10 credits
  • JavaScript rendering: +5 credits (enabled by default)
  • Include HTML: +2 credits
  • Include screenshot (standard quality): +5 credits
  • Include screenshot (high quality): +7 credits
  • Full-page screenshot (standard quality): +8 credits
  • Full-page screenshot (high quality): +10 credits

Frequency multipliers explained

The cost per month depends on how frequently your watch job runs:

  • Hourly: 24 checks per day × 30 days = 720 checks per month
  • Daily: 1 check per day × 30 days = 30 checks per month
  • Weekly: 1 check per week × 4 weeks = 4 checks per month
  • Monthly: 1 check per month = 1 check per month

Detailed examples with calculations

Credit consumption scenarios:

ConfigurationCredits per checkChecks per monthMonthly total
Basic daily watch
Base (10) + JS (5)
1530450
Hourly watch with HTML
Base (10) + JS (5) + HTML (2)
1772012,240
Weekly with standard screenshot
Base (10) + JS (5) + Screenshot (5)
20480
Weekly with high-quality fullpage
Base (10) + JS (5) + HQ Fullpage (10)
254100
Monthly check (basic)
Base (10) + JS (5)
15115

Common use cases and recommended configurations

Use case recommendations:

Competitor price monitoring

Recommendation: Daily checks with selector targeting price elements

Configuration: frequency: "daily", selector: ".pricing-table"

Why: Prices typically don't change hourly, but you want to stay current with market changes

Monthly cost: 450 credits (15 credits × 30 days)

Flash sale detection

Recommendation: Hourly checks with standard quality screenshot

Configuration: frequency: "hourly", include_image: true

Why: Limited-time offers can appear anytime; visual confirmation helps verify the offer

Monthly cost: 14,400 credits (20 credits × 24 hours × 30 days)

E-commerce product listing changes

Recommendation: Daily checks with full-page screenshot

Configuration: frequency: "daily", include_image: true, full_page: true

Why: Capture the complete product inventory and layout changes

Monthly cost: 810 credits (27 credits × 30 days)

Legal compliance monitoring

Recommendation: Weekly checks with HTML included

Configuration: frequency: "weekly", include_html: true, selector: ".terms-conditions"

Why: Legal terms change infrequently; full HTML helps verify exact changes

Monthly cost: 68 credits (17 credits × 4 weeks)

Industry blog updates

Recommendation: Daily checks with specific content targeting

Configuration: frequency: "daily", selector: ".blog-content"

Why: Stay current with industry news without overwhelming notifications

Monthly cost: 450 credits (15 credits × 30 days)

Recommended Beta Parameters

For this beta release, we recommend focusing on these core parameters:

  • Required: url, frequency, notify_email
  • Recommended: selector (for targeted monitoring)
  • Optional: include_html (for detailed content comparison)

Advanced screenshot options can be added as needed but may consume more credits.

Credit-saving tips

  • Use selectors to monitor specific elements instead of entire pages
  • Choose appropriate frequencies based on how often the content actually changes
  • Disable JavaScript rendering for simple static pages (saves 5 credits per check)
  • Only include screenshots when visual verification is necessary
  • Use standard quality (80%) screenshots unless high fidelity is required
  • Start with weekly monitoring and adjust based on change frequency

Was this page helpful?