{
  "openapi": "3.1.0",
  "info": {
    "title": "G62 Patent Search API",
    "version": "0.1.0",
    "description": "Public patent research through one account-scoped bearer token. Submit an asynchronous search, then retrieve the same operation ID. REST, MCP and the website share the same credit ledger. One successfully completed search costs one credit. Preserve source and coverage caveats. Public information only; do not upload confidential invention descriptions."
  },
  "servers": [
    {
      "url": "https://g62.ai"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/api/v1/status": {
      "get": {
        "operationId": "getSearchReadiness",
        "summary": "Check account access and search readiness without a search charge",
        "responses": {
          "200": {
            "description": "Account-specific readiness, balance eligibility and token submission budget.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "state",
                    "online",
                    "canSubmit"
                  ],
                  "properties": {
                    "state": {
                      "type": "string"
                    },
                    "online": {
                      "type": "boolean"
                    },
                    "canSubmit": {
                      "type": "boolean"
                    },
                    "creditCost": {
                      "type": "integer",
                      "const": 1
                    },
                    "remainingSubmissions": {
                      "type": "integer"
                    },
                    "oauthSupported": {
                      "type": "boolean",
                      "const": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/searches": {
      "post": {
        "operationId": "submitPatentSearch",
        "summary": "Submit public information once; retry with the same idempotency key",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^live-[a-zA-Z0-9-]{8,100}$",
              "description": "A caller-generated live- UUID used for this search and every retry. Reusing it with changed inputs fails."
            },
            "description": "Caller-generated live-UUID. Reuse this exact key and identical input after disconnects. A different key can start another billable search."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              },
              "example": {
                "mode": "patent",
                "text": "US3087624A",
                "cutoff": "auto",
                "office": "all",
                "k": 20,
                "publicInformation": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Search state and, when complete, source-linked candidates. A returned result is a research lead, not a verified claim chart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Search"
                }
              }
            }
          },
          "202": {
            "description": "Accepted or still running. Poll the Location with GET; Retry-After is seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Search"
                }
              }
            }
          },
          "400": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/searches/{operationId}": {
      "get": {
        "operationId": "getPatentSearch",
        "summary": "Read this account’s existing search; never submit another job",
        "parameters": [
          {
            "in": "path",
            "name": "operationId",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^live-[a-zA-Z0-9-]{8,100}$",
              "description": "A caller-generated live- UUID used for this search and every retry. Reusing it with changed inputs fails."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search state and, when complete, source-linked candidates. A returned result is a research lead, not a verified claim chart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Search"
                }
              }
            }
          },
          "400": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Request failed. Inspect error.code. Retry uncertain submissions using the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "requestId"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "G62 developer token",
        "description": "Create a token from the Connect section of your G62 dashboard. Use Authorization: Bearer TOKEN. Do not place credentials in URLs."
      }
    },
    "schemas": {
      "SearchRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "mode",
          "text",
          "publicInformation"
        ],
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "patent",
              "text",
              "figure"
            ]
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2500,
            "description": "US/EP publication number for patent mode, otherwise a public search description."
          },
          "cutoff": {
            "type": "string",
            "description": "YYYY-MM-DD, none, or auto for patent mode."
          },
          "office": {
            "type": "string",
            "enum": [
              "US",
              "EP",
              "all"
            ],
            "default": "all"
          },
          "k": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 100
          },
          "claim": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 100
          },
          "publicInformation": {
            "type": "boolean",
            "const": true,
            "description": "Must be true only when the user authorizes searching public patent information."
          }
        }
      },
      "Search": {
        "type": "object",
        "required": [
          "operationId",
          "state"
        ],
        "properties": {
          "operationId": {
            "type": "string",
            "pattern": "^live-[a-zA-Z0-9-]{8,100}$",
            "description": "A caller-generated live- UUID used for this search and every retry. Reusing it with changed inputs fails."
          },
          "state": {
            "type": "string",
            "description": "queued or running: poll; done: read result; failed: known failure; uncertain: operator reconciliation required. Never automatically resubmit an uncertain job."
          },
          "jobId": {
            "type": "string"
          },
          "creditCost": {
            "type": "integer"
          },
          "charged": {
            "type": "number"
          },
          "pollAfterMs": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "evidenceNotice": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "description": "Coverage and ranking metadata plus patent candidates. Abstracts are not automatically matched passages; full-text coverage varies by source.",
            "additionalProperties": true,
            "properties": {
              "hits": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "pn": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "abstract_snippet": {
                      "type": "string"
                    },
                    "pub": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Publication date as YYYYMMDD when known."
                    }
                  }
                }
              },
              "partial": {
                "type": "boolean",
                "description": "Preserve coverage caveats; a populated list is not proof of exhaustive retrieval."
              }
            }
          }
        }
      }
    }
  }
}
