{
  "openapi": "3.0.1",
  "info": {
    "title": "USPTO Trademark Search, Owner & Gazette Monitor",
    "description": "Search official USPTO trademark records, inspect current status and ownership, retrieve recorded assignments and Gazette publications, and monitor typed changes.",
    "version": "0.1",
    "x-build-id": "cLSwjpMnz4acGOLCa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luminar~uspto-trademark-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luminar-uspto-trademark-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/luminar~uspto-trademark-monitor/runs": {
      "post": {
        "operationId": "runs-sync-luminar-uspto-trademark-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/luminar~uspto-trademark-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-luminar-uspto-trademark-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": {
          "operation": {
            "title": "What do you want to do?",
            "enum": [
              "trademark_search",
              "case_lookup",
              "portfolio",
              "assignment_search",
              "gazette"
            ],
            "type": "string",
            "description": "Chooses the official USPTO source workflow and therefore the records, requests and possible event charges.",
            "default": "trademark_search"
          },
          "mode": {
            "title": "Run type",
            "enum": [
              "baseline",
              "changes"
            ],
            "type": "string",
            "description": "Changes compares the exact normalized scope with its last successfully delivered state. Its first run safely initializes a Baseline instead of inventing historical alerts. Only Search/watch and Portfolio/watch add a complete watch-check unit; case, assignment and Gazette workflows use their own result or issue units.",
            "default": "baseline"
          },
          "maxBuyerChargeUsd": {
            "title": "Maximum Actor charge",
            "minimum": 0.01,
            "maximum": 500,
            "type": "number",
            "description": "Stops before source work if declared limits could exceed this event-charge ceiling. Zero-result search, case and assignment runs have no fixed scan event; a complete Gazette issue or selected search/portfolio watch can still be a delivered unit. Apify's own maximum cost setting remains separate.",
            "default": 5
          },
          "searchTerms": {
            "title": "Search terms",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Primary target for the default Search workflow and owner Portfolio discovery. Use plain text, or choose Wildcard matching for * and ?. Up to 20 official-register queries share the result cap; other workflows use their clearly grouped identifiers or party names below.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "searchField": {
            "title": "Search field",
            "enum": [
              "all",
              "wordmark",
              "owner",
              "goods_services",
              "serial",
              "registration",
              "mark_description",
              "design_code",
              "design_description"
            ],
            "type": "string",
            "description": "Limits each basic term to the selected official field.",
            "default": "all"
          },
          "searchMatchType": {
            "title": "Basic matching",
            "enum": [
              "contains",
              "exact",
              "prefix",
              "wildcard"
            ],
            "type": "string",
            "description": "Changes how basic terms are escaped and matched. Wildcard preserves only * and ?; raw Elasticsearch JSON is never accepted.",
            "default": "contains"
          },
          "advancedQueries": {
            "title": "Advanced official field clauses",
            "maxItems": 10,
            "type": "array",
            "description": "Optional AND/OR/NOT clauses over bounded official fields. These are converted to a locked request shape; buyer-supplied query JSON is prohibited.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "field",
                "value"
              ],
              "properties": {
                "field": {
                  "title": "Official field",
                  "description": "USPTO field group to search.",
                  "type": "string",
                  "enum": [
                    "all",
                    "wordmark",
                    "owner",
                    "goods_services",
                    "serial",
                    "registration",
                    "mark_description",
                    "design_code",
                    "design_description"
                  ]
                },
                "value": {
                  "title": "Search value",
                  "description": "Text or number to match in the selected field.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "operator": {
                  "title": "Combine with",
                  "description": "How this clause combines with the other clauses.",
                  "type": "string",
                  "enum": [
                    "AND",
                    "OR",
                    "NOT"
                  ],
                  "default": "AND"
                },
                "matchType": {
                  "title": "Match type",
                  "description": "How the field value is matched.",
                  "type": "string",
                  "enum": [
                    "contains",
                    "exact",
                    "prefix",
                    "wildcard"
                  ],
                  "default": "contains"
                }
              }
            }
          },
          "maxSearchResults": {
            "title": "Maximum search records",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Run-wide search cap. 500 is the tested contract boundary. Reaching it with more source hits reports CAPPED.",
            "default": 10
          },
          "serialNumbers": {
            "title": "Trademark serial numbers",
            "maxItems": 500,
            "uniqueItems": true,
            "type": "array",
            "description": "Exact eight-digit USPTO application serial numbers. Serial is the canonical monitoring identity.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{8}$",
              "maxLength": 8
            }
          },
          "registrationNumbers": {
            "title": "Registration numbers",
            "maxItems": 500,
            "uniqueItems": true,
            "type": "array",
            "description": "Official registration-number aliases. The Actor resolves each to a serial before state identity.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,8}$",
              "maxLength": 8
            }
          },
          "ownerNames": {
            "title": "Current owner names",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Portfolio search terms for the official current-owner field. Results are evidence records, not proof of legal title.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 160
            }
          },
          "includeDetails": {
            "title": "Add full current case details",
            "type": "boolean",
            "description": "Adds one official detail request per resolved serial for status, owner, attorney/correspondent, classes, history and documents. This increases requests and source bytes.",
            "default": true
          },
          "includeAssignments": {
            "title": "Add recorded assignment history",
            "type": "boolean",
            "description": "Adds official Assignment Center rows by resolved serial. A recorded assignment remains distinct from the current-owner field.",
            "default": false
          },
          "includeGazette": {
            "title": "Add Gazette publications",
            "type": "boolean",
            "description": "Portfolio only. Adds the selected official Gazette route and issue filters; complete XML can add hundreds of megabytes per issue.",
            "default": false
          },
          "assigneeNames": {
            "title": "Assignee names",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Assignment Center party search. Exact or partial matching is controlled below.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 160
            }
          },
          "assignorNames": {
            "title": "Assignor names",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional recorded-assignor party queries.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 160
            }
          },
          "assignmentNameMatch": {
            "title": "Assignment party matching",
            "enum": [
              "partial",
              "exact"
            ],
            "type": "string",
            "description": "Selects the official partial or exact assignee/assignor searchBy value.",
            "default": "partial"
          },
          "maxAssignmentRecords": {
            "title": "Maximum assignment records",
            "minimum": 1,
            "maximum": 2500,
            "type": "integer",
            "description": "Run-wide assignment cap. The deliberately conservative 2,500 boundary replaces larger unproved competitor limits.",
            "default": 100
          },
          "gazetteIssueDates": {
            "title": "Gazette issue dates",
            "maxItems": 4,
            "uniqueItems": true,
            "type": "array",
            "description": "Tuesday issue dates (YYYY-MM-DD). Leave empty to discover the latest published issue. The conservative XML-backed run boundary is four issues.",
            "items": {
              "type": "string",
              "minLength": 10,
              "maxLength": 10
            }
          },
          "gazetteRoute": {
            "title": "Gazette source route",
            "enum": [
              "xml_bulk",
              "api_filter"
            ],
            "type": "string",
            "description": "XML gives issue-backed bulk coverage and can transfer about 237 MB per issue. API filter is cheaper for narrow searches but only covers the declared filter.",
            "default": "xml_bulk"
          },
          "gazetteSearchTerms": {
            "title": "Gazette keywords",
            "maxItems": 25,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional case-insensitive mark, owner or goods keywords. Empty means no text filter.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "gazetteSearchIn": {
            "title": "Gazette fields to search",
            "maxItems": 4,
            "uniqueItems": true,
            "type": "array",
            "description": "Official filtered-search fields. Empty uses the source default and XML filtering checks all supported text fields.",
            "items": {
              "type": "string",
              "minLength": 4,
              "maxLength": 30
            }
          },
          "publicationReasons": {
            "title": "Publication reasons",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional official publication reason/code filter, such as OPPOSITION. Empty means all reasons.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 80
            }
          },
          "internationalClasses": {
            "title": "International classes",
            "maxItems": 45,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional Nice classes 1-45. Empty means all classes.",
            "items": {
              "type": "string"
            }
          },
          "maxGazetteRecords": {
            "title": "Maximum Gazette records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Run-wide Gazette match cap. XML parsing stops only after detecting one additional match, so CAPPED is explicit.",
            "default": 50
          },
          "watchId": {
            "title": "Monitoring scope name",
            "maxLength": 64,
            "type": "string",
            "description": "Optional human label for an isolated Changes state. The exact normalized inputs are also hashed, preventing accidental state reuse."
          },
          "includeUnchanged": {
            "title": "Include unchanged audit rows",
            "type": "boolean",
            "description": "Changes only. Adds free UNCHANGED rows; they are never billed as changes.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum delivered business rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Global business-row cap across every selected source. Reaching it while more matching data exists reports CAPPED.",
            "default": 1000
          },
          "maxTrackedItems": {
            "title": "Maximum state records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Changes state boundary. It must be at least the maximum possible business rows for the selected run.",
            "default": 2500
          },
          "maxRequests": {
            "title": "Maximum official requests",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Run-wide official-USPTO request and retry guard.",
            "default": 1000
          },
          "maxSourceBytes": {
            "title": "Maximum official source bytes",
            "minimum": 100000,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Run-wide transfer guard. One current full Gazette XML issue is about 237 MB.",
            "default": 300000000
          },
          "maxRuntimeSecs": {
            "title": "Maximum source-work runtime",
            "minimum": 30,
            "maximum": 1800,
            "type": "integer",
            "description": "Run-wide source-work runtime guard.",
            "default": 600
          },
          "requestIntervalMs": {
            "title": "Minimum request interval",
            "minimum": 250,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum delay between ordinary official requests. Retries add bounded backoff.",
            "default": 350
          },
          "_luminarQaFaultStage": {
            "title": "Luminar private QA fault stage",
            "type": "string",
            "description": "Factory-only fault request. Runtime rejects it unless the exact canonical rel-uspto build runs on the separately registered private QA Actor with matching Actor-key and fleet-isolation locks."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}