Skip to content

fix(database-lookup): retire dead PatentsView search API for ODP - #245

Open
Divyansh151005 wants to merge 1 commit into
K-Dense-AI:mainfrom
Divyansh151005:fix/database-lookup-patentsview-odp
Open

fix(database-lookup): retire dead PatentsView search API for ODP#245
Divyansh151005 wants to merge 1 commit into
K-Dense-AI:mainfrom
Divyansh151005:fix/database-lookup-patentsview-odp

Conversation

@Divyansh151005

@Divyansh151005 Divyansh151005 commented Aug 30, 2026

Copy link
Copy Markdown

Summary

references/uspto.md still taught https://search.patentsview.org/api/v1/ as the primary PatentsView search API. After USPTO's 2026-03-20 Open Data Portal migration that host is NXDOMAIN, so every agent following the skill hard-fails. The old patentsview.org/apis/keyrequest flow is also obsolete.

This PR:

  • Rewrites the PatentsView section around the ODP transition guide and the published PatentsView bulk dataset pages
  • Marks PatentSearch as paused (no invented replacement search URL)
  • Swaps the credentials row from PATENTSVIEW_API_KEY / keyrequest to USPTO_ODP_API_KEY / https://data.uspto.gov/apikey
  • Notes the pause in database_selection_guide.md
  • Replaces the 404 ClinicalTrials bulk URL AllAPIJSON.zip with the working AllPublicXML.zip → legacy public-xml zip path
  • Bumps metadata.version to "1.4"

PEDS and TSDR sections are unchanged.

Type of change

  • Update to an existing skill

Skills touched

  • database-lookup

How this was tested

$ host search.patentsview.org
Host search.patentsview.org not found: 3(NXDOMAIN)

$ curl -sI -L https://api.patentsview.org/patents/query
# 301 → https://data.uspto.gov/support/transition-guide/patentsview (200)

$ curl -sI https://clinicaltrials.gov/AllAPIJSON.zip
# 404

$ curl -sIL https://clinicaltrials.gov/AllPublicXML.zip
# 301 → /api/legacy/public-xml?format=zip
# 200 application/zip  content-disposition: attachment; filename=ctg-public-xml.zip

$ curl -sI https://data.uspto.gov/support/transition-guide/patentsview
# 200

$ uv run skills-ref validate ./skills/database-lookup
Valid skill: skills/database-lookup

$ uv run --with pytest python -m pytest tests/_meta -q
10 passed, 1213 subtests passed

Checked 2026-08-30 against USPTO's published transition guidance (PatentSearch paused; bulk tables on ODP).

Related issues and references

Fixes #243.

Checklist

Skill format

  • The skill directory name and the name frontmatter match exactly.
  • The skill directory contains only SKILL.md, references/, scripts/, and assets/.
  • SKILL.md has valid YAML frontmatter and a Markdown body.
  • Only the six spec-defined top-level fields are present; everything else lives under metadata.
  • metadata is a block mapping, not single-line JSON, and scalar values are quoted where needed.
  • metadata.version exists, is quoted, and is bumped.
  • The description says both what the skill does and when an agent should use it.

Validation and tests

  • uv run skills-ref validate ./skills/database-lookup passes.
  • tests/_meta passes.
  • Security scanner — docs-only change; scanner not run.

Content and safety

  • Examples and scripts were tested, or are clearly marked as illustrative.
  • No secrets, credentials, private data, or unsafe instructions are included.
  • Credentials the skill needs are named in the credentials table (USPTO_ODP_API_KEY).

Notes for reviewers

  • I did not invent a replacement PatentSearch base URL; USPTO has not published one yet. Agents are steered to ODP bulk datasets and told to surface the pause when interactive search is requested.
  • USPTO_ODP_API_KEY is the local .env name for the ODP key (header per ODP docs). Old PATENTSVIEW_API_KEY values are incompatible per USPTO.

search.patentsview.org no longer resolves after the 2026-03-20 USPTO
Open Data Portal migration, so documented PatentSearch examples hard-fail.
Point agents at the ODP transition guide and PatentsView bulk dataset
pages, replace the obsolete PatentsView keyrequest credential row, note
PatentSearch pause in the selection guide, and replace the 404
ClinicalTrials AllAPIJSON.zip bulk URL with the working public XML dump.

Fixes K-Dense-AI#243

@rajpratham1 rajpratham1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uspto.md still contains outdated PatentsView API instructions after documenting that the PatentSearch API is paused/unavailable. The later sections still reference PATENTSVIEW_API_KEY, the old key-request URL, and the old API as working. Please remove or update these remaining references so the documentation consistently points users to USPTO ODP and USPTO_ODP_API_KEY.

@Divyansh151005

Copy link
Copy Markdown
Author

Thanks for the review, @rajpratham1 — I double-checked the tip of this branch (fe2d6a1) against your notes.

Claim: later sections still reference PATENTSVIEW_API_KEY

On this PR head, that string does not appear anywhere under skills/database-lookup/:

$ git grep PATENTSVIEW_API_KEY HEAD -- skills/database-lookup
# (no matches)

What changed vs main:

  • SKILL.md credentials row: PATENTSVIEW_API_KEY + patentsview.org/apis/keyrequestUSPTO_ODP_API_KEY + https://data.uspto.gov/apikey
  • uspto.md no longer documents loading PATENTSVIEW_API_KEY from .env

If you were looking at the GitHub diff, the PATENTSVIEW_API_KEY / keyrequest lines show only on the removed (red) side from main.

Claim: old key-request URL / old API still presented as working

The only remaining mentions of the old hosts are explicit do-not-use / historical notes:

  • Status block: PatentSearch at search.patentsview.org is unavailable (NXDOMAIN); do not call it; do not register at the old keyrequest flow
  • Auth section: ODP key from data.uspto.gov/apikey; old PatentSearch keys are not compatible; env var is USPTO_ODP_API_KEY
  • Historical note: legacy hosts must not be used until USPTO republishes an ODP-hosted replacement
  • Limitations: PatentSearch is paused; use ODP bulk datasets

There are no remaining search endpoint examples (GET /patent/?…&api_key=…) in the PR.

Live re-check (2026-08-30)

$ host search.patentsview.org
Host search.patentsview.org not found: 3(NXDOMAIN)

$ curl -sI https://patentsview.org/apis/keyrequest
# 301 → https://data.uspto.gov/support/transition-guide/patentsview

That matches USPTO’s ODP PatentsView transition guide: PatentSearch paused; previously issued PatentSearch keys incompatible; bulk data on ODP.

If the ask is to remove even the historical mentions

Happy to do a follow-up commit that drops the old host/keyrequest strings entirely and keeps only ODP links — but as written, the tip already points agents at ODP + USPTO_ODP_API_KEY, not at a live PatentSearch flow. Let me know which you prefer (or if a maintainer wants a different wording).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(database-lookup): PatentsView search.patentsview.org API is NXDOMAIN after ODP migration

2 participants