{
  "openapi": "3.0.1",
  "info": {
    "title": "Nostr Keyword, Hashtag & Author Monitor",
    "description": "Monitor public Nostr relays for keywords (NIP-50 search), hashtags or authors (npub/hex). Notes are de-duplicated across relays with relay lists, njump links and author profiles. New-only monitor mode; no keys or login. $0.50 per 1,000 notes.",
    "version": "1.0",
    "x-build-id": "r6UWmOD50nOkA6NS0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tali-works~nostr-keyword-hashtag-author-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tali-works-nostr-keyword-hashtag-author-monitor",
        "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/tali-works~nostr-keyword-hashtag-author-monitor/runs": {
      "post": {
        "operationId": "runs-sync-tali-works-nostr-keyword-hashtag-author-monitor",
        "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/tali-works~nostr-keyword-hashtag-author-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-tali-works-nostr-keyword-hashtag-author-monitor",
        "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": {
          "keywords": {
            "title": "Keywords (search)",
            "type": "array",
            "description": "Words or phrases to find in notes (max 20 per run), via NIP-50 full-text search on the search relays below. Best-effort: only relays that support NIP-50 can search, and none index everything. Results are re-checked locally so only notes that really contain a keyword are kept. Single-word keywords are also tried as hashtags on the normal relays.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags to collect, with or without # (max 50 per run), matched with the #t tag filter on every relay. Results are de-duplicated across relays (duplicates are free).",
            "items": {
              "type": "string"
            }
          },
          "authors": {
            "title": "Authors",
            "type": "array",
            "description": "Accounts to follow (max 1,000 per run): PUBLIC keys only - npub1..., nprofile1..., 64-char hex pubkeys, or an njump.me/primal.net profile URL containing an npub. NEVER paste an nsec1... private key: this Actor doesn't need one, drops it, and you should treat a pasted nsec as compromised.",
            "items": {
              "type": "string"
            }
          },
          "filterKeywords": {
            "title": "Keyword filter (client-side)",
            "type": "array",
            "description": "Optional. Keep only notes (from any source) whose text or hashtags contain at least one of these words, case-insensitive. Use it to filter hashtag or author pulls without relying on search relays.",
            "items": {
              "type": "string"
            }
          },
          "lookbackHours": {
            "title": "Lookback (hours)",
            "minimum": 0,
            "type": "integer",
            "description": "Only notes from the last N hours (ignored if 'Since' is set). 0 = no time limit, but relays prune old notes, so deep history is incomplete.",
            "default": 24
          },
          "since": {
            "title": "Since",
            "type": "string",
            "description": "Optional start date/time (ISO, e.g. 2026-10-01T00:00:00Z) or Unix timestamp. Overrides Lookback. Uses each note's self-reported created_at."
          },
          "until": {
            "title": "Until",
            "type": "string",
            "description": "Optional end date/time (ISO) or Unix timestamp. Leave empty for 'up to now'."
          },
          "maxItems": {
            "title": "Max notes",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum notes to output, which is also your cost cap ($0.50 per 1,000 notes). Newest first, shared fairly across your keywords, hashtags and authors. Each relay query also stops at 5,000 notes / 40 pages.",
            "default": 200
          },
          "onlyNew": {
            "title": "Monitor mode: only new notes",
            "type": "boolean",
            "description": "Remember the notes earlier runs returned (named key-value store 'nostr-monitor-state') and output only notes not seen before. First run = baseline. Schedule hourly/daily for alerts. Already-seen notes are not charged.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name for this monitor's memory, e.g. 'brand-alerts'. Runs with the same name share the list of already-returned notes, so you can edit keywords without starting over. Default: keyed by your keywords/hashtags/authors/filter, so changing them starts a fresh baseline."
          },
          "enrichProfiles": {
            "title": "Add author profiles (kind 0)",
            "type": "boolean",
            "description": "Look up each author's name, display name, NIP-05, picture, about and lightning address.",
            "default": true
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Skip notes that reply to another note (replies are included by default).",
            "default": false
          },
          "strictKeywordMatch": {
            "title": "Strict keyword match",
            "type": "boolean",
            "description": "Drop search results that don't literally contain one of the keywords (NIP-50 relays can match loosely).",
            "default": true
          },
          "keywordsAsHashtags": {
            "title": "Also try single-word keywords as hashtags",
            "type": "boolean",
            "description": "Query #keyword on the normal relays too, so keyword monitoring still works when search relays are down.",
            "default": true
          },
          "relays": {
            "title": "Relays",
            "type": "array",
            "description": "Relays for hashtag and author queries, as wss:// URLs (max 15). snort.social (in-memory) and nostr.wine (paid) are skipped. nostr.wellorder.net was removed from the defaults on Oct 26 2026 (broken TLS certificate).",
            "default": [
              "wss://relay.damus.io",
              "wss://nos.lol",
              "wss://relay.primal.net",
              "wss://purplepag.es"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchRelays": {
            "title": "Search relays (NIP-50)",
            "type": "array",
            "description": "Relays used for keyword search, as wss:// URLs (max 15). Must support NIP-50. Best-effort: relay.nostr.band publishes no NIP-11 info and may be unreachable; the others are tried too.",
            "default": [
              "wss://relay.nostr.band",
              "wss://search.nos.today",
              "wss://relay.ditto.pub"
            ],
            "items": {
              "type": "string"
            }
          },
          "profileRelays": {
            "title": "Profile relays",
            "type": "array",
            "description": "Relays for author profile (kind 0) lookups, as wss:// URLs (max 15).",
            "default": [
              "wss://purplepag.es",
              "wss://relay.damus.io",
              "wss://relay.primal.net"
            ],
            "items": {
              "type": "string"
            }
          },
          "verifySignatures": {
            "title": "Verify signatures",
            "type": "boolean",
            "description": "Check every event id and Schnorr signature and drop forged ones.",
            "default": true
          },
          "relayTimeoutSecs": {
            "title": "Relay timeout (s)",
            "minimum": 3,
            "type": "integer",
            "description": "Max wait for a relay to connect or send its next message. Slow or dead relays are logged and skipped.",
            "default": 15
          },
          "relayBudgetSecs": {
            "title": "Time budget per relay query (s)",
            "minimum": 10,
            "type": "integer",
            "description": "Total time allowed per relay per query, including paging.",
            "default": 90
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}