Skip to main content

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

๐Ÿ“‹ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

patsnap_pythonsdk-0.1.0.tar.gz (83.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

patsnap_pythonsdk-0.1.0-py3-none-any.whl (38.1 kB view details)

Uploaded Python 3

File details

Details for the file patsnap_pythonsdk-0.1.0.tar.gz.

File metadata

  • Download URL: patsnap_pythonsdk-0.1.0.tar.gz
  • Upload date:
  • Size: 83.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for patsnap_pythonsdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3c164bee3d3cd917457f8b5eef023ee202e7de9e166e87dc80423f03aec01141
MD5 404663768e3e2bb916c887c71eb82955
BLAKE2b-256 0de1f406a4ade58c4f21da1588dc87881acceff0684ba411db43bc8acc7e857f

See more details on using hashes here.

File details

Details for the file patsnap_pythonsdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for patsnap_pythonsdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5bf33af327d8d62e2e8ad45a9a188b207e4d1ad51eb71f0b3f2709e873639dbd
MD5 a9871e10686d13119dbdd1174c7b4482
BLAKE2b-256 907250f2c85e22ff2ed2950ce109a047d16ae1d8af756b00919019725bb3d0ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page