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.1.tar.gz (81.3 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.1-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

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

Hashes for patsnap_pythonsdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 576d7dd4edd02da4d4dda4f05cf8372a4a55b7d4b0d939da1962275b4d5c50a7
MD5 5817eef7ac4f54b854fc0a1581586955
BLAKE2b-256 5b9235b8ec27c4b8eacd7cd329be973f4b150653018758baec119dfcb5a4095e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for patsnap_pythonsdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de77dff209d02284540833b6a942b45f86558b9d7b487c007cd0cc9ad2d2595a
MD5 bca2b88861c097838763d379babe1700
BLAKE2b-256 0462298ddc5f760a5c7e7a1fca502d3abeda852ae27bbb257780a48825201bff

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