Unofficial Python SDK for Patsnap's patent and innovation intelligence APIs
Project description
Patsnap Python SDK
โ ๏ธ This is an unofficial Python SDK for Patsnap's APIs. This SDK is NOT officially supported or endorsed by Patsnap. Use at your own discretion and ensure compliance with Patsnap's terms of service.
A comprehensive Python SDK for accessing Patsnap's patent and innovation intelligence APIs with a clean, intuitive interface.
๐ Installation
pip install patsnap-pythonSDK
โก Quick Start
import patsnap_pythonSDK as patsnap
# Configure the SDK
patsnap.configure(
client_id="your_client_id",
client_secret="your_client_secret"
)
# Search for AI patents
results = patsnap.analytics.search.query_search(
query_text="TACD: artificial intelligence",
limit=10
)
print(f"Found {results.data.total_search_result_count:,} AI patents")
for patent in results.data.results[:3]:
print(f"- {patent.title}")
๐ Usage Examples
Patent Search
# Search by patent number
patent = patsnap.patents.search.by_number(patent_number="US10123456B2")
# Search by company
results = patsnap.patents.search.by_current_assignee(
assignee="Apple Inc.",
limit=50
)
# Semantic search
similar = patsnap.patents.search.by_semantic_text(
text="machine learning artificial intelligence neural networks",
limit=25
)
# Visual search with single image
visual_results = patsnap.patents.search.by_image(
url="https://example.com/patent_diagram.jpg",
patent_type="D", # Design patents
model=1, # Smart Recommendation
limit=50
)
# Multi-image comprehensive search
multi_results = patsnap.patents.search.by_multiple_images(
urls=[
"https://example.com/front_view.jpg",
"https://example.com/back_view.jpg",
"https://example.com/side_view.jpg"
],
patent_type="D",
model=1,
limit=75
)
Analytics Operations
# Get patent count
count = patsnap.analytics.search.count(
query_text="TACD: artificial intelligence"
)
# Execute analytics query
results = patsnap.analytics.search.query(
query_text="TACD: machine learning",
limit=100
)
# Get field statistics
stats = patsnap.analytics.search.filter(
query="TTL: blockchain",
field="ASSIGNEE",
limit=50
)
Image Upload Workflow
# Upload image and get public URL
upload_result = patsnap.patents.search.upload_image(
image="path/to/patent_diagram.jpg"
)
# Use uploaded image for search
search_results = patsnap.patents.search.by_image(
url=upload_result.url,
patent_type="U", # Utility patents
model=4, # Shape & color
limit=30
)
๐ ๏ธ CLI Interface
The SDK includes a powerful command-line interface for API exploration:
# Show all available namespaces and methods
patsnap help
# Get detailed help for specific operations
patsnap help patents.search
patsnap help analytics.search
# Explore method details
patsnap help patents.search.by_image
๐ Documentation
- Quick Start Guide
- Contributing Guide
- Implementation Documentation
- CLI Usage Guide
- Patent Search Examples
- Analytics Examples
๐ Complete Endpoint Checklist
๐ Patent Search Operations (patsnap.patents.search)
- โ
by_number()- [P069] Patent Number Search (requires higher subscription) - โ
by_original_assignee()- [P004] Original Applicant Search - โ
by_current_assignee()- [P005] Current Assignee Search - ๐ง
by_defense_applicant()- [P006] Defense Patent Search - โ
by_similarity()- [P007] Similar Patent Search - โ
by_semantic_text()- [P008] Semantic Search - โ
upload_image()- [P010] Image Upload - ๐ง
by_image()- [P060] Single Image Search - ๐ง
by_multiple_images()- [P061] Multiple Image Search
๐ Analytics Operations (patsnap.analytics.search)
- โ
query_count()- [P001] Analytics Query Count - โ
query_search()- [P002] Analytics Query Search - โ
query_filter()- [P003] Analytics Query Filter
๐ Patent Data Operations (patsnap.patents.data) - Planned
- ๐ง
simple_biblio()- [P011] Simple Biblio - ๐ง
biblio()- [P012] Full Biblio - ๐ง
legal_status()- [P013] Legal Status - ๐ง
family()- [P014] Patent Family - ๐ง
cited_by()- [P015] Cited By Patents - ๐ง
citations()- [P016] Patent Citations - ๐ง
claims()- [P018] Claims - ๐ง
description()- [P019] Description - ๐ง
pdf()- [P020] PDF Download
๐ง AI Operations (patsnap.ai) - Planned
- ๐ง
agent.create_weekly_brief()- [AI63-1] Weekly Brief - ๐ง
agent.create_monthly_brief()- [AI63-2] Monthly Brief - ๐ง
ocr.create_task()- [AI60] OCR Recognition - ๐ง
translation.translate()- [AI61] AI Translation - ๐ง
ner.drug_entities()- [AI01] Drug NER - ๐ง
analysis.technical_qa()- [AI36-1] Technical Q&A
๐ข Company Analytics (patsnap.analytics.companies) - Planned
- ๐ง
word_cloud()- [A101] Innovation Word Cloud - ๐ง
strategy_radar()- [A102] Portfolio Strategy Radar - ๐ง
key_technologies()- [A103] Key Technologies - ๐ง
trends()- [A104] Application Trends - ๐ง
portfolio_overview()- [A105] Portfolio Overview
๐ Drug & Life Sciences (patsnap.drugs) - Planned
- ๐ง
search.general()- [B007] Drug Search - ๐ง
search.core_patents()- [B009] Core Patent Search - ๐ง
search.literature()- [B011] Literature Search - ๐ง
search.clinical_trials()- [B012] Clinical Trials - ๐ง
data.basic_info()- [B018] Drug Basic Info
Legend:
- โ Working - Tested and functional
- โ ๏ธ Limited - Requires higher API subscription
- ๐ง Implemented - Code complete, needs testing
- ๐ง Planned - Not yet implemented
Total: 250+ endpoints planned | Current: 11 implemented |
๐ง Requirements
- Python 3.8+
- Valid Patsnap API credentials
- Internet connection for API access
โ๏ธ License
MIT License - see LICENSE file for details.
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details on:
- Development setup and guidelines
- Code standards and testing requirements
- How to implement new endpoints
- Documentation and example requirements
โ ๏ธ Important Notes
- Unofficial SDK: While the author works for Patsnap, this is not officially supported by Patsnap
- API Compliance: Ensure your usage complies with Patsnap's terms of service
- Rate Limits: Respect API rate limits and usage guidelines
- Data Privacy: Handle patent and proprietary data responsibly
- Testing: Always test thoroughly in development before production use
๐ Support & Community
- Issues: Report bugs and request features via GitHub Issues
- Discussions: Join community discussions for questions and ideas
- Contributing: See CONTRIBUTING.md for development guidelines
- Examples: Comprehensive examples available in the examples/ directory
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file patsnap_pythonsdk-0.1.1.tar.gz.
File metadata
- Download URL: patsnap_pythonsdk-0.1.1.tar.gz
- Upload date:
- Size: 81.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
576d7dd4edd02da4d4dda4f05cf8372a4a55b7d4b0d939da1962275b4d5c50a7
|
|
| MD5 |
5817eef7ac4f54b854fc0a1581586955
|
|
| BLAKE2b-256 |
5b9235b8ec27c4b8eacd7cd329be973f4b150653018758baec119dfcb5a4095e
|
File details
Details for the file patsnap_pythonsdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: patsnap_pythonsdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 38.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de77dff209d02284540833b6a942b45f86558b9d7b487c007cd0cc9ad2d2595a
|
|
| MD5 |
bca2b88861c097838763d379babe1700
|
|
| BLAKE2b-256 |
0462298ddc5f760a5c7e7a1fca502d3abeda852ae27bbb257780a48825201bff
|