OA Citations Models

models.oa_citations - Data models for USPTO Office Action Citations API.

This module provides data models for representing responses from the USPTO Office Action Citations API (v2). These models cover citation data from Office Actions mailed from October 1, 2017 to 30 days prior to the current date, derived from Form PTO-892, Form PTO-1449, and Office Action text.

class pyUSPTO.models.oa_citations.OACitationRecord(id='', patent_application_number='', action_type_category='', legal_section_code='', reference_identifier='', parsed_reference_identifier='', group_art_unit_number='', work_group='', tech_center='', paragraph_number='', applicant_cited_examiner_reference_indicator=None, examiner_cited_reference_indicator=None, office_action_citation_reference_indicator=None, create_user_identifier='', create_date_time=None, obsolete_document_identifier='')[source]

Bases: object

A single citation record from the OA Citations API.

id

Unique record identifier (hex hash).

patent_application_number

Patent application number.

action_type_category

Type of action (e.g., "rejected").

legal_section_code

Legal section code (e.g., "101", "103").

reference_identifier

Free-text citation reference string.

parsed_reference_identifier

Extracted publication number from the reference.

group_art_unit_number

Group art unit number.

work_group

Work group code.

tech_center

Technology center code.

paragraph_number

Paragraph number within the Office Action.

applicant_cited_examiner_reference_indicator

Whether the applicant cited this as an examiner reference.

examiner_cited_reference_indicator

Whether the examiner cited this reference.

office_action_citation_reference_indicator

Whether this is an Office Action citation reference.

create_user_identifier

User who created the record (e.g., "ETL_SYS").

create_date_time

Timestamp when this record was created.

obsolete_document_identifier

Legacy IFW document identifier.

action_type_category: str = ''
applicant_cited_examiner_reference_indicator: bool | None = None
create_date_time: datetime | None = None
create_user_identifier: str = ''
examiner_cited_reference_indicator: bool | None = None
classmethod from_dict(data)[source]

Create an OACitationRecord from a dictionary.

Parameters:

data (dict[str, Any]) – Dictionary containing citation record data from API response.

Returns:

An instance of OACitationRecord.

Return type:

OACitationRecord

group_art_unit_number: str = ''
id: str = ''
legal_section_code: str = ''
obsolete_document_identifier: str = ''
office_action_citation_reference_indicator: bool | None = None
paragraph_number: str = ''
parsed_reference_identifier: str = ''
patent_application_number: str = ''
reference_identifier: str = ''
tech_center: str = ''
to_dict()[source]

Convert the OACitationRecord instance to a dictionary.

Returns:

Dictionary with camelCase keys matching the API format.

None values are omitted.

Return type:

dict[str, Any]

work_group: str = ''
class pyUSPTO.models.oa_citations.OACitationsFieldsResponse(api_key=None, api_version_number=None, api_url=None, api_documentation_url=None, api_status=None, field_count=0, fields=<factory>, last_data_updated_date=None)[source]

Bases: object

Response from the OA Citations API fields endpoint.

Contains metadata about the API including available field names and the last data update timestamp.

api_key

The dataset key (e.g., "oa_citations").

api_version_number

API version (e.g., "v2").

api_url

The URL of this fields endpoint.

api_documentation_url

URL to the API documentation.

api_status

Publication status (e.g., "PUBLISHED").

field_count

Number of available fields.

fields

List of available field names.

last_data_updated_date

Timestamp of the last data update (non-standard format).

api_documentation_url: str | None = None
api_key: str | None = None
api_status: str | None = None
api_url: str | None = None
api_version_number: str | None = None
field_count: int = 0
fields: list[str]
classmethod from_dict(data, include_raw_data=False)[source]

Create an OACitationsFieldsResponse from a dictionary.

Parameters:
  • data (dict[str, Any]) – Dictionary containing API response data.

  • include_raw_data (bool) – Unused. Present for FromDictProtocol conformance.

Returns:

An instance of OACitationsFieldsResponse.

Return type:

OACitationsFieldsResponse

last_data_updated_date: str | None = None
to_dict()[source]

Convert the OACitationsFieldsResponse instance to a dictionary.

Returns:

Dictionary representation with camelCase keys.

Return type:

dict[str, Any]

class pyUSPTO.models.oa_citations.OACitationsResponse(num_found=0, start=0, docs=<factory>, raw_data=None)[source]

Bases: object

Response from the OA Citations API search endpoint.

The API returns a Solr-style response with start, numFound, and docs. The outer envelope key is "response".

num_found

Total number of matching records.

start

The start index of the first result in this page.

docs

List of citation records in this page.

raw_data

Optional raw JSON data from the API response (for debugging).

property count: int

Return total result count for pagination compatibility.

docs: list[OACitationRecord]
classmethod from_dict(data, include_raw_data=False)[source]

Create an OACitationsResponse from a dictionary.

Handles both the raw API envelope ({"response": {...}}) and a pre-unwrapped dictionary.

Parameters:
  • data (dict[str, Any]) – Dictionary containing API response data.

  • include_raw_data (bool) – If True, store the raw JSON for debugging.

Returns:

An instance of OACitationsResponse.

Return type:

OACitationsResponse

num_found: int = 0
raw_data: str | None = None
start: int = 0
to_dict()[source]

Convert the OACitationsResponse instance to a dictionary.

Returns:

Dictionary wrapped in the "response" envelope

matching the API format.

Return type:

dict[str, Any]