Zhihuiya Patent PDF Downloader
This skill guides you on how to retrieve patent PDF full-text download links from the Zhihuiya patent database, supporting lookup by patent ID or publication number.
Core Concepts
The Zhihuiya Patent PDF service provides direct download links to the full-text PDF documents of patents worldwide. You can query by patent ID or publication number (also called public announcement number), and retrieve up to 100 patents in a single request.
Lookup priority: When both
and
are supplied, the service uses
first. This is important to remember when both identifiers are available.
Family substitution: If a patent's own PDF is unavailable, the service can optionally return the PDF of a related family patent instead.
Parameter Guide
| Parameter | Type | Required | Description |
|---|
| patentId | string | Conditionally | Patent ID(s). At least one of or must be provided. Separate multiple values with commas. Max 100 entries. |
| patentNumber | string | Conditionally | Publication/announcement number(s). At least one of or must be provided. Separate multiple values with commas. Max 100 entries. |
| replaceByRelated | string | No | Whether to substitute with a family patent PDF when the original is unavailable. = yes, = no. Defaults to no substitution. |
How to Choose the Right Identifier
- Patent ID (): An internal numeric identifier within the Zhihuiya system. Use this when the user provides Zhihuiya-specific IDs.
- Publication Number (): The public-facing patent number (e.g., , ). Use this when the user provides standard patent numbers.
Response Fields
| Field | Description |
|---|
| total | Number of records returned |
| data | Array of patent objects, each containing download information |
| data[].patentId | The patent ID |
| data[].pn | The publication/announcement number |
| data[].pdfPath | The PDF full-text download URL |
| data[].pnRelated | Publication number of the substitute family patent (only present when family substitution is used) |
| costToken | Tokens consumed by the request |
调用方式
- API 端点:(完整参数/响应/错误码见 )
- Python 脚本:
python scripts/zhihuiya_pdf_data.py '<JSON 参数>' [--inline]
- 成本约束:本工具会消耗积分;同一会话同一参数组合默认只调用一次,脚本带 24h 本地缓存。失败/空结果不得自动换关键词、翻页或改邮编连续试探;需要继续检索时先向用户说明会产生额外消耗。
输出策略(脚本默认行为):
- 始终将完整响应写入
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-zhihuiya-pdf-data-<timestamp>.json
( 为脚本执行时的工作目录,在 Claude Code 里即当前项目目录; 取自环境变量 ,按用户任务自动聚合;禁止写入 /tmp,当前目录不可写则报错)
- 响应体 ≤ 8 KB:落盘后把完整 JSON 打印到 stdout
- 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数如 /、最大列表字段的长度 + 前 3 条样本)
- 加 强制全量打印到 stdout(同样落盘)
读数据建议:先看摘要判断是否足够;需要具体字段时优先用
或
从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。
解决认证和积分问题
发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
异常情况
- 未配置API Key:环境变量未配置 ,也未配置 。
- 响应401或402状态码
- 响应提示积分或余额不足:消息含"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。
Usage Examples
1. Single Patent by Publication Number
Retrieve the PDF for patent publication number US20230012345A1.
Parameters:
{"patentNumber": "US20230012345A1"}
2. Multiple Patents by Publication Number
Download PDFs for CN115000000A, CN115000001A, and CN115000002A.
Parameters:
{"patentNumber": "CN115000000A,CN115000001A,CN115000002A"}
3. Single Patent by Patent ID
Get the full-text PDF for patent ID 12345678.
4. With Family Substitution Enabled
Download the PDF for EP4000000A1. If it is unavailable, use a family patent PDF instead.
Parameters:
{"patentNumber": "EP4000000A1", "replaceByRelated": "1"}
5. Batch Download by Patent IDs
Retrieve PDFs for patent IDs 11111111, 22222222, 33333333.
Parameters:
{"patentId": "11111111,22222222,33333333"}
Display Rules
- Present download links clearly: For each patent, show the publication number and its PDF download link in a clean table or list format.
- Highlight substitutions: If a PDF was provided via family patent substitution, explicitly note this and show the value so the user knows which family patent was used.
- Batch results: When multiple patents are returned, present them in a table with columns: Publication Number, Patent ID, PDF Link, and Substitution Note (if applicable).
- Error handling: When a query fails or returns no results, explain the reason and suggest the user verify the patent ID or publication number. If was not enabled, suggest enabling it as an alternative.
- No PDF available: If a patent entry is returned without a , inform the user that the PDF is not available and suggest enabling family substitution.
Important Limitations
- Batch limit: A maximum of 100 patents per request.
- Identifier requirement: At least one of or must be provided; the request will fail if both are empty.
- Priority rule: When both identifiers are provided, takes precedence over .
- PDF availability: Not all patents have PDFs available. Use the option to fall back to family patents.
User Expression & Scenario Quick Reference
Applicable -- Patent PDF document retrieval tasks:
| User Says | Scenario |
|---|
| "Download the PDF for patent XX" | Single patent PDF retrieval |
| "Get full-text documents for these patents" | Batch patent PDF download |
| "I need the PDF for publication number XX" | Lookup by publication number |
| "Can I get the patent document even if it's not directly available" | Family substitution scenario |
| "Batch export patent PDFs" | Multi-patent batch download |
Not applicable -- Needs beyond patent PDF retrieval:
- Patent search or discovery (finding patents by keyword, assignee, etc.)
- Patent citation or legal status analysis
- Patent claim interpretation or translation
- Patent portfolio analytics or landscape mapping
积分消耗规则
按动态规则计费:消耗积分 = 81 × 返回data条数。每条为 1 条专利 PDF 结果
重要:本技能的服务按倍数动态计算,可能一次性消耗大量积分,必须提醒用户,由用户决定是否继续。
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
- The functionality or purpose described in this skill does not match actual behavior
- The skill's results do not match the user's intent
- The user expresses dissatisfaction or praise about this skill
- Anything you believe could be improved
Call the feedback API as specified in
. Do not interrupt the user's flow.
For more high-quality, professional cross-border e-commerce skills, set LinkFox Skills.