{
  "openapi": "3.0.1",
  "info": {
    "title": "USPTO Trademark Watch: New Filings Leads & Brand Alerts",
    "description": "Daily USPTO trademark filings as scored DTC brand leads, plus brand-watch alerts for look-alike marks, oppositions and status changes.",
    "version": "0.1",
    "x-build-id": "GdliftGmNRnYBz9zh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingly_contest_7cb~uspto-trademark-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingly_contest_7cb-uspto-trademark-watch",
        "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/kingly_contest_7cb~uspto-trademark-watch/runs": {
      "post": {
        "operationId": "runs-sync-kingly_contest_7cb-uspto-trademark-watch",
        "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/kingly_contest_7cb~uspto-trademark-watch/run-sync": {
      "post": {
        "operationId": "run-sync-kingly_contest_7cb-uspto-trademark-watch",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "newFilings",
              "brandWatch",
              "both"
            ],
            "type": "string",
            "description": "newFilings = lead feed of new applications. brandWatch = alerts for marks similar to your watch list, opposition publications and status changes. both = run both in one pass.",
            "default": "newFilings"
          },
          "lookbackDays": {
            "title": "Look back (days)",
            "minimum": 0,
            "maximum": 92,
            "type": "integer",
            "description": "Filing dates to cover, counted back from today (US Eastern), used when 'Filed from' is empty. USPTO search data typically shows a filing about one day after it is filed, so keep at least 2-3 days and rely on dedupe.",
            "default": 3
          },
          "dateFrom": {
            "title": "Filed from (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional fixed start filing date. Overrides 'Look back'."
          },
          "dateTo": {
            "title": "Filed to (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional end filing date (inclusive). Defaults to today (US Eastern). Max range 92 days."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep filings whose mark (or goods/services text, see scope) contains any of these words. Empty = no keyword filter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordScope": {
            "title": "Keyword scope",
            "enum": [
              "markAndGoods",
              "mark"
            ],
            "type": "string",
            "description": "Where keywords are matched.",
            "default": "markAndGoods"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop filings containing any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "classes": {
            "title": "International (Nice) classes",
            "type": "array",
            "description": "Keep filings in any of these classes, e.g. 3, 25, 35. Empty = all classes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "owners": {
            "title": "Owner name contains",
            "type": "array",
            "description": "Keep filings whose owner/applicant name contains any of these strings (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Owner US states",
            "type": "array",
            "description": "Two-letter codes or full names, e.g. FL, Texas. Based on the owner's state of address as listed by USPTO.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Owner countries",
            "type": "array",
            "description": "Country names as USPTO lists them, e.g. UNITED STATES, CANADA, CHINA. 'US'/'USA' also work.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "entityTypes": {
            "title": "Owner entity types",
            "type": "array",
            "description": "E.g. LIMITED LIABILITY COMPANY, INDIVIDUAL, CORPORATION, PARTNERSHIP, OTHER. Substring match.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "filingBases": {
            "title": "Filing basis",
            "type": "array",
            "description": "1a = use in commerce, 1b = intent to use, 44d, 44e, 66a.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "proSeOnly": {
            "title": "Only filings without an attorney (pro se)",
            "type": "boolean",
            "description": "Approximation: no attorney of record is listed in USPTO search data.",
            "default": false
          },
          "minLeadScore": {
            "title": "Minimum DTC lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0-100 heuristic. See README for the scoring rules.",
            "default": 0
          },
          "maxResults": {
            "title": "Max new filings per run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the lead feed after this many new filings are output.",
            "default": 1000
          },
          "watchMarks": {
            "title": "Watch marks",
            "type": "array",
            "description": "Brand-watch list. Each item: {\"mark\": \"GLOSSIER\", \"classes\": [\"3\"], \"label\": \"client A\"}. Classes are optional; when set, matches outside them are down-weighted. Optional per mark: \"ignoreOwners\": [\"Your Company\"] to skip filings by those owners (e.g. your own).",
            "default": []
          },
          "similarityThreshold": {
            "title": "Similarity threshold",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Alert when the similarity score (0-100) is at or above this value.",
            "default": 80
          },
          "oppositionWatch": {
            "title": "Scan marks published for opposition",
            "type": "boolean",
            "description": "Also compare watch marks against marks published in the Official Gazette during the last N days (opposition deadline = publication date + 30 days).",
            "default": true
          },
          "oppositionLookbackDays": {
            "title": "Opposition look back (days)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Publication dates to scan for opposition alerts.",
            "default": 7
          },
          "watchSerials": {
            "title": "Serial numbers to track",
            "type": "array",
            "description": "Application serial numbers to monitor for status changes (published, registered, abandoned, other status changes).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trackStatusOfMatches": {
            "title": "Track status of matched filings",
            "type": "boolean",
            "description": "Automatically add filings that triggered a similarity alert to the status-tracking list.",
            "default": true
          },
          "onlyNew": {
            "title": "Only output filings not seen in earlier runs",
            "type": "boolean",
            "description": "Dedupe across runs using a named key-value store.",
            "default": true
          },
          "profileId": {
            "title": "Watch profile ID",
            "type": "string",
            "description": "Separate dedupe/alert state per profile (e.g. one per client). Use letters, digits, - and _.",
            "default": "default"
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store used for cross-run state.",
            "default": "uspto-trademark-watch-state"
          },
          "enrichContacts": {
            "title": "Enrich contacts from TSDR (opt-in)",
            "type": "boolean",
            "description": "Off by default. When on, fetches each output filing's public TSDR status page and adds attorney/correspondent name, e-mail and phone. Street addresses are never collected. You are responsible for lawful use (e.g. CAN-SPAM, GDPR) of any contact data.",
            "default": false
          },
          "maxEnrichments": {
            "title": "Max enrichments per run",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on TSDR lookups per run.",
            "default": 50
          },
          "enrichMinLeadScore": {
            "title": "Only enrich filings with lead score at least",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Saves cost by enriching only higher-scoring leads.",
            "default": 0
          },
          "usptoApiKey": {
            "title": "USPTO TSDR API key (optional)",
            "type": "string",
            "description": "Optional. If set, enrichment uses the official TSDR API (tsdrapi.uspto.gov) with your key instead of the public status page."
          },
          "slackWebhookUrl": {
            "title": "Slack incoming webhook URL",
            "type": "string",
            "description": "Optional. Posts a short digest (no e-mails or phone numbers) after each run."
          },
          "webhookUrl": {
            "title": "Webhook URL (JSON digest)",
            "type": "string",
            "description": "Optional. Receives a JSON POST with summary counts and the top items."
          },
          "digestMaxItems": {
            "title": "Digest items",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Max filings and max alerts listed in the digest.",
            "default": 20
          },
          "requestIntervalSecs": {
            "title": "Seconds between USPTO requests",
            "minimum": 0.5,
            "type": "number",
            "description": "Polite throttle for USPTO requests. Enrichment never goes faster than 1.5 s (public pages) or 1.0 s (API key).",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}