USPTO ODP Go Client: Office Action and Trademark APIs
Version 1.4 of the uspto-odp Go client library adds two major API categories: Office Action search and Trademark Status & Document Retrieval (TSDR). USPTO migrated both from the legacy Developer Hub into the Open Data Portal, and the library now covers all of them.
As with previous releases, I found mismatches between USPTO's OpenAPI specifications and the actual API responses. USPTO had already incorporated my earlier feedback on the patent application spec fixes, and they've been responsive again this round. I've submitted corrections for the new Office Action and TSDR specs as well - type mismatches, missing fields, response structure corrections. The code generation pipeline patches these automatically until the official specs catch up.
Office Action APIs
The Office Action endpoints use the DSAPI pattern - form-encoded POST requests with Lucene/Solr query syntax. They share the same API key as the rest of ODP. Data is available from June 2018 onwards with a 180-day lag.
Eight new endpoints cover four categories:
Text retrieval searches office action records by application number, action type, mailed date, and other fields.
Citations cover Forms PTO-892 and PTO-1449 - the references cited in office actions. You can search by legal section code, reference identifier, and citation category.
Rejections are where it gets interesting. You can search by rejection type - 101, 102, 103, 112, double patenting - and filter by patent eligibility indicators: Alice, Bilski, Mayo, Myriad. This makes it straightforward to find all applications in a specific art unit that received an Alice rejection, for example.
Enriched citations contain AI/ML-extracted metadata from office actions, including statutes, rejected claims, and prior art references.
// Find applications with 103 rejections in art unit 1713
results, err := client.SearchOfficeActionRejections(ctx,
"hasRej103:1 AND groupArtUnitNumber:1713", 0, 10)
// Get available search fields
fields, err := client.GetOfficeActionRejectionFields(ctx)
Each category also has a /fields endpoint that returns the available search fields, so you can discover what's queryable without reading documentation.
Trademark Status & Document Retrieval
TSDR runs on a separate server (tsdrapi.uspto.gov) with its own API key, obtained from account.uspto.gov. The library handles both configurations cleanly - if you only need patent data, you don't need a TSDR key.
Seven wrapper methods cover trademark status, document listings, individual document info, PDF downloads, last-update timestamps, and batch status lookups across serial numbers, registration numbers, and international registration numbers.
// Get trademark status as JSON
status, err := client.GetTrademarkStatusJSON(ctx, "97123456")
// Download a Notice of Allowance as PDF
var buf bytes.Buffer
err := client.DownloadTrademarkDocument(ctx, "97123456", "NOA20230322", &buf)
// Batch lookup by serial numbers
result, err := client.GetTrademarkMultiStatus(ctx, "sn",
[]string{"97123456", "90001000"})
The TSDR API defaults to XML responses. The library supports content negotiation - GetTrademarkStatusJSON uses the Accept header to request JSON directly, while the XML endpoints return raw responses for cases where you need the full document structure.
Code Generation
The Office Action APIs ship as four separate OpenAPI specifications. The generation tool bundles these into a single corrected spec and generates typed Go code. The TSDR spec required similar treatment - fixing protocol-relative URLs, correcting field types, and removing unsupported JSON content types from XML-only endpoints.
The generation pipeline in cmd/gen/main.go applies 30+ patches automatically. Pure Go, no external dependencies.
Coverage
The library now provides 53 wrapper methods across all API categories:
- Patent Application: 13 endpoints
- Bulk Data: 3 endpoints
- Petition: 3 endpoints
- PTAB: 19 endpoints
- Office Action: 8 endpoints (new)
- TSDR: 7 endpoints (new)
These new endpoints are already available as MCP tools in Patent Connector v1.2, so you can query office actions and trademark data directly from ChatGPT or Claude.
Repository: github.com/patent-dev/uspto-odp
License: MIT
For consulting on patent data infrastructure or integrating USPTO APIs into your workflows, reach out through patent.dev.