{
  "openapi": "3.0.1",
  "info": {
    "title": "Dataset New Items Alerts: Email, Slack, Discord & Telegram",
    "description": "Get an email, Slack, Discord, Telegram or webhook alert with only the new items from any Apify scraper's dataset. Remembers what was sent, filters with simple rules (price < 500), one digest per run. Failed sends are free.",
    "version": "1.0",
    "x-build-id": "vcamB0VQf10nI7Lft"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/genesis.labs.co~dataset-new-items-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-genesis.labs.co-dataset-new-items-alerts",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/genesis.labs.co~dataset-new-items-alerts/runs": {
      "post": {
        "operationId": "runs-sync-genesis.labs.co-dataset-new-items-alerts",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/genesis.labs.co~dataset-new-items-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-genesis.labs.co-dataset-new-items-alerts",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "The dataset to watch. In an integration (\"Run another Actor when a run succeeds\" on your scraper or task) set this to {{resource.defaultDatasetId}} so every finished run is checked."
          },
          "onlyNew": {
            "title": "Only new items",
            "type": "boolean",
            "description": "Alert only on items never sent before (remembered across runs). Off: every matching item in the dataset is sent each run.",
            "default": true
          },
          "keyFields": {
            "title": "Key fields (what makes an item new)",
            "type": "array",
            "description": "Fields that identify an item, e.g. url, or title + company. Dot paths work (offer.id). URLs are compared without tracking parameters, www or trailing slashes; text is compared case-insensitively.",
            "items": {
              "type": "string"
            }
          },
          "memoryName": {
            "title": "Memory name",
            "pattern": "^[a-zA-Z0-9-]{0,40}$",
            "type": "string",
            "description": "Optional. Runs with the same memory name share the list of already-sent items (stored in a key-value store in your account). Empty: one memory per source Actor + channels + filters, created automatically."
          },
          "firstRun": {
            "title": "First run",
            "enum": [
              "notify",
              "silent"
            ],
            "type": "string",
            "description": "What to do when the memory is new. Silent is handy when a scraper already has hundreds of items and you only want future ones.",
            "default": "notify"
          },
          "resetMemory": {
            "title": "Reset memory",
            "type": "boolean",
            "description": "Forget all remembered items for this memory and treat everything as new.",
            "default": false
          },
          "filters": {
            "title": "Alert rules (filters)",
            "type": "array",
            "description": "Send only items that match, one rule per line: \"price < 500\", \"title contains remote\", \"title !contains senior\", \"rating >= 4.5\", \"postedAt >= 2026-11-01\", \"url matches /jobs/\", \"email exists\". Operators: = != > >= < <= contains !contains matches exists empty.",
            "items": {
              "type": "string"
            }
          },
          "filterMode": {
            "title": "Filter logic",
            "enum": [
              "all",
              "any"
            ],
            "type": "string",
            "description": "How multiple rules combine.",
            "default": "all"
          },
          "emailTo": {
            "title": "Email to",
            "type": "array",
            "description": "The email address of YOUR Apify account (Apify's free apify/send-mail Actor, which this uses, delivers only to the account owner; no SMTP needed). To email other people, send the webhook to Zapier, Make or n8n.",
            "items": {
              "type": "string"
            }
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Incoming webhook from your Slack app (https://hooks.slack.com/services/...). Stored encrypted."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Server Settings > Integrations > Webhooks > Copy Webhook URL. Stored encrypted."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Token of your bot from @BotFather (123456789:AA...). Stored encrypted."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Chat, group or channel to post to: a number like -1001234567890, or @channelusername. The bot must be a member (or you must have sent it /start)."
          },
          "webhookUrl": {
            "title": "Webhook URL (Zapier, Make, n8n, your API)",
            "type": "string",
            "description": "Receives one JSON POST per run with the new items (event, newItemCount, items, datasetId, sourceRunId...)."
          },
          "webhookHeaders": {
            "title": "Webhook headers",
            "type": "object",
            "description": "Optional extra HTTP headers for the webhook, e.g. {\"Authorization\": \"Bearer ...\"}."
          },
          "title": {
            "title": "Message title",
            "type": "string",
            "description": "Email subject and message heading. Variables: {{count}}, {{date}}, {{datasetId}}, {{memoryName}}, {{checked}}.",
            "default": "{{count}} new items"
          },
          "intro": {
            "title": "Intro text",
            "type": "string",
            "description": "Optional line under the title, e.g. \"New apartments under $1,500 in Tempe\". Same variables as the title."
          },
          "titleField": {
            "title": "Title field",
            "type": "string",
            "description": "Field used as each item's headline. Empty: detected automatically (title, name, headline...)."
          },
          "linkField": {
            "title": "Link field",
            "type": "string",
            "description": "Field with the item's URL, used as the link. Empty: detected automatically (url, link...)."
          },
          "fields": {
            "title": "Fields to show",
            "type": "array",
            "description": "Up to 12 extra fields shown under each item, e.g. price, location, postedAt. Empty: up to 4 short fields are picked automatically.",
            "items": {
              "type": "string"
            }
          },
          "imageField": {
            "title": "Image field (Discord thumbnail)",
            "type": "string",
            "description": "Optional field with an image URL, shown as a thumbnail in Discord."
          },
          "maxItemsInMessage": {
            "title": "Max items in message",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Items listed in email, Slack, Discord and Telegram. The rest are counted (\"+N more\") with a link to the dataset.",
            "default": 20
          },
          "maxItemsInWebhook": {
            "title": "Max items in webhook",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Full items included in the webhook JSON.",
            "default": 100
          },
          "sendWhenNothingNew": {
            "title": "Send a message when nothing is new",
            "type": "boolean",
            "description": "Off: no message (and no charge) when there are no new items. On: send a short \"No new items\" heartbeat.",
            "default": false
          },
          "discordUsername": {
            "title": "Discord bot name",
            "type": "string",
            "description": "Optional name shown as the sender in Discord."
          },
          "dryRun": {
            "title": "Dry run (preview, send nothing)",
            "type": "boolean",
            "description": "Build the messages and save previews in the dataset without sending, charging or updating memory.",
            "default": false
          },
          "maxItemsToCheck": {
            "title": "Max items to check",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Safety limit on items read from the dataset per run.",
            "default": 1000000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}