Skip to content
프로젝트

DevnorsAI/devnors-data-python

GitHub에서 보기

소개

Devnors Data - Python SDK: 인터페이스, 데이터 API, 판결문, 법률 사건, 법령, 법조문, 기업 등록, 기업 연차보고서, 세금계산서, 채무불이행 판결 채무자 조회, 강제집행 대상자, 키워드 지수, 위챗 지수, 인기 검색어 순위, 웨이보 인기 검색어, 더우인 인기 검색어, 택배 조회, 택배사 코드, 통합 조회, /v1/data/query, API 키, MCP, AI 에이전트

비즈니스 및 금융

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
+3
in 7 days
+42
in 15 days
+89
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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

관련 프로젝트 살펴보기

불러오는 중…