Skip to content
プロジェクト

DevnorsAI/devnors-data-python

GitHubで見る

概要

Devnors Data - Python SDK:インターフェース、データAPI、裁判文書、法律案件、法令・規則、法条文、企業登記情報、企業年次報告、税番号・インボイス、失信被执行人の照会、執行対象者、キーワード指数、WeChat指数、人気検索ランキング、Weiboの人気検索、Douyinの人気検索、荷物追跡、配送会社コード、統合検索、/v1/data/query、APIキー、MCP、AIエージェント

ビジネス・金融

この数値の測り方

計測したスター増加

24時間
+3
7日間
+42
15日間
+89
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Devnors Data Python SDK

简体中文 | English

Use Devnors Data from Python with one API Key.

Call legal cases, laws, enterprise data, content indexes, academic research (papers / patents / journals / scholars), express tracking, and more through a single POST /v1/data/query gateway. Every hit is designed for AI agents, with official-source traceability where applicable.

Install

pip install devnors-data

Quick Start

Create an API Key in the developer console, then:

from devnors_data import DevnorsData

client = DevnorsData(api_key="devnors_sk_live_xxx")  # or set DEVNORS_API_KEY

# Legal judgment documents
res = client.legal_cases("民间借贷 利息", top_k=10)
for hit in res["hits"]:
    print(hit.get("case_no"), hit.get("title"))

# Law articles
laws = client.legal_laws("合同解除 违约金")

# Unified entry for any domain / type
res = client.query(domain="legal", type="case", query="劳动争议", top_k=5)
print(res["units"], "tokens used")

Async:

import asyncio
from devnors_data import AsyncDevnorsData

async def main():
    client = AsyncDevnorsData(api_key="devnors_sk_live_xxx")
    res = await client.legal_cases("交通事故 责任认定")
    print(res["total_hits"])

asyncio.run(main())

Token

Use your Devnors Data API Key in one of these ways:

DevnorsData(api_key="devnors_sk_live_xxx")

or:

DEVNORS_API_KEY=devnors_sk_live_xxx

Optional private / self-hosted base URL:

DEVNORS_DATA_BASE_URL=https://data.devnors.com

Things You Can Do

Search Chinese legal judgment documents for private lending disputes.
Look up current PRC law articles about contract termination and liquidated damages.
Query company registration details with a credit code or company name.
Check whether a company is on the dishonest judgment debtor list.
Get Baidu suggest keywords for "lawyer".
Track a parcel with company code and tracking number.
Search academic papers, patents, journals, or scholars, then fetch a detail by ID.
Paginate legal case hits until I have 100 results.

Retry and Pagination

  • Automatic retry for 429 / 5xx / connection errors (bounded exponential backoff). Non-retryable errors such as 400 / 401 / 402 / 501 are never retried. Disable with DevnorsData(..., max_retries=0).
  • Pagination helper: paginate(...) walks pages using total_hits.
for hit in client.paginate("legal", "case", "借贷纠纷", page_size=20, max_items=100):
    print(hit.get("case_no"))

Billing and Errors

  • Successful calls return units (tokens charged) and request_id.
  • Insufficient balance raises DevnorsDataError(code="insufficient_balance", status=402).
  • Rate limit raises code="rate_limited" (429).
  • Each DevnorsDataError includes code / retryable / next_action / request_id.

Data Domains

domain type status
legal case / law_article / law_catalog live
content keyword_index / suggest_list / keyword_word / bidword / wechat_index_v2 live
enterprise company_detail_v2 / annual_report_list / annual_report_detail / account_open / company_tag / same_legal_company / key_person / shareholder / branch_org / industrial_commercial_change / taxpayer_basic / tax_credit_level / tax_illegal / tax_illegal_major / tax_illegal_major_detail / operation_except / admin_punishment / judgment_list / court_notice_list / court_trial_list / cases_info_list / termination_case_list / serious_illegal / exec_person / breach_of_trust / listed_company / listed_company_neeq live
cloud express / express_com / web_search / invoice_ocr live
research paper_search / patent_search / journal_search / paper_detail / patent_detail / journal_detail / scholar_search / scholar_detail live

Docs: https://data.devnors.com/docs

Related

License

MIT

関連プロジェクトを探す

読み込み中…