{
  "openapi": "3.0.1",
  "info": {
    "title": "Nostr Public Notes Monitor - Verified Relay Watchlists",
    "description": "Export signature-verified public Nostr notes from two relays. Filter by author, hashtag or keyword, deduplicate IDs, retain provenance and optionally skip previously saved notes. No key needed.",
    "version": "1.0",
    "x-build-id": "JZxWQQN9NgQJw6el9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maydit~nostr-public-notes-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maydit-nostr-public-notes-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/maydit~nostr-public-notes-monitor/runs": {
      "post": {
        "operationId": "runs-sync-maydit-nostr-public-notes-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/maydit~nostr-public-notes-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-maydit-nostr-public-notes-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": {
          "relays": {
            "title": "Public relays",
            "type": "array",
            "description": "Select one or both supported anonymous public relays. Only wss://relay.damus.io and wss://nos.lol are accepted; no credentials, alternate hosts or custom paths. Omitted input uses both.",
            "items": {
              "type": "string"
            }
          },
          "authors": {
            "title": "Author public keys",
            "type": "array",
            "description": "Optional exact 64-character hexadecimal public keys, at most 20. Multiple keys use OR. Does not resolve usernames or npub values, enrich profiles, or identify a real person.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Optional at most 10 exact Nostr t-tag values; leading # is removed. Tag matching is case sensitive, as in the relay protocol. Multiple values use OR. Author, tag, time and keyword groups combine with AND. When this field is omitted and no authors or keywords are given, the run samples the nostr tag (logged in the run) instead of an unfiltered window; pass an empty list explicitly to read the unfiltered window.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Content keywords",
            "type": "array",
            "description": "Optional at most 10 case-insensitive substrings, matched with OR locally after retrieving the bounded relay window. This is not a relay-wide full-text search; increase perRelayLimit if the window is too narrow.",
            "items": {
              "type": "string"
            }
          },
          "since": {
            "title": "Window start",
            "type": "string",
            "description": "Optional inclusive ISO8601 timestamp with timezone, for example 2026-10-01T00:00:00Z. Omitted start is lookbackHours before until. Windows may span at most 366 days."
          },
          "until": {
            "title": "Window end",
            "type": "string",
            "description": "Optional inclusive ISO8601 timestamp with timezone. Omitted end freezes at the current run start. Use fixed since/until timestamps for repeatable historical windows. Future endpoints over five minutes ahead are rejected."
          },
          "lookbackHours": {
            "title": "Lookback hours",
            "minimum": 1,
            "maximum": 8760,
            "type": "integer",
            "description": "Used only when since is omitted: look back this many hours from until. Default 168 means seven days.",
            "default": 168
          },
          "perRelayLimit": {
            "title": "Events requested per relay",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Request this many stored events per relay, from 1 to 100. Duplicate, invalid and locally filtered events can reduce saved results. The relay may return fewer, and this does not promise a full historical export.",
            "default": 10
          },
          "maxResults": {
            "title": "Maximum saved notes",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum distinct verified notes saved across relays. Default 20 fits both ten-event windows. Unchanged notes skipped by onlyChanges do not consume this cap. At most 200 candidates can be retrieved with two relays.",
            "default": 20
          },
          "comparePrevious": {
            "title": "Compare saved observations",
            "type": "boolean",
            "description": "Use a named key-value store to compare signed note snapshots for this exact watchlist. The first run warns and returns matching notes as new, establishing history only after confirmed dataset writes.",
            "default": false
          },
          "onlyChanges": {
            "title": "Only notes not previously saved or changed",
            "type": "boolean",
            "description": "Enables comparison and skips unchanged signed snapshots. A valid empty repeat warns and succeeds. Signed kind1 content is immutable, so repeated IDs normally remain unchanged. No deletions are inferred.",
            "default": false
          },
          "snapshotName": {
            "title": "History name",
            "type": "string",
            "description": "1-80 letters, numbers, underscores or hyphens. Separate logical workflows with different names. History also includes relay/filter/window settings. Run only one writer at a time per exact scope; concurrent changes are detected before commit but storage is not transactional.",
            "default": "default"
          },
          "relayTimeoutSeconds": {
            "title": "Time per relay",
            "minimum": 3,
            "maximum": 30,
            "type": "integer",
            "description": "Total DNS, connection and bounded-response allowance per relay, from 3 to 30 seconds, further limited by the run deadline. Missing EOSE is reported as partial even when some notes were received.",
            "default": 12
          },
          "maxRunSeconds": {
            "title": "Run time budget",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Own wall-clock budget, default 240 seconds, further limited by the platform timeout minus a 25-second reserve. Source calls, verification loops and output respect the remaining budget.",
            "default": 240
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}