Skip to main content

tianyancha - 天眼查 API

Tianyancha SDK for python, which based on https://open.tianyancha.com/

install

pip install tianyancha

Usage

All API supported! please visit Supported methods for more information!

from tianyancha import Tianyancha

token = "TOKEN"
word = "北京百度网讯科技有限公司"
tyc = Tianyancha(token)
ret = tyc.search(word=word)  # Limited to use `keyword arguments`
{
  "error_code": 0,
  "reason": "ok",
  "result": {
    "items": [
      {
        "regNumber": "110108002734659",
        "regStatus": "在业",
        "creditCode": "91110000802100433B",
        "estiblishTime": "2001-06-05 00:00:00.0",
        "regCapital": "1342128万人民币",
        "companyType": 1,
        "name": "<em>北京百度网讯科技有限公司</em>",
        "id": 22822,
        "orgNumber": "802100433",
        "type": 1,
        "base": "北京",
        "legalPersonName": "梁志祥"
      },
      {
        "regNumber": "440106000623068",
        "regStatus": "在业",
        "creditCode": "91440101675657502F",
        "estiblishTime": "2008-05-20 00:00:00.0",
        "regCapital": "-",
        "companyType": 1,
        "name": "<em>北京百度网讯科技有限公司</em>广州分公司",
        "id": 139572971,
        "orgNumber": "675657502",
        "type": 1,
        "base": "广东",
        "legalPersonName": "沈抖"
      },
      ...
    ],
    "total": 56
  }
}

More usages

Request APIs as below, they are equal:

ret1 = tyc.get('ic/changeinfo/2.0', {'keyword': keyword})
ret2 = tyc.ic_changeinfo(keyword=keyword)

Sync newest APIs from official website and update document.

python tianyancha/sync.py > API.md

Tests

just run pytest

Changelog

  • 2024-09-23 0.2.1 sync new methods from tianyancha.com
  • 2020-12-11 0.1.2 path bugfix and generate documents for all methods
  • 2020-12-11 0.1.1 support all methods
  • 2020-12-11 0.1.0 support basic search for tianyancha

Refs

Official API Document: https://open.tianyancha.com/api_list

Release files for tianyancha 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tianyancha 0.2.1
File Interpreter ABI Platform
tianyancha-0.2.1-py3-none-any.whl Python 3 none any Details

Release files / tianyancha-0.2.1-py3-none-any.whl

Download URL tianyancha-0.2.1-py3-none-any.whl
Size 37.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45a9392a360de2d583012f06a9f4bb854e62f85abc0a51f5507a386031591d5c
BLAKE2b-256 checksum
How to use checksums
3372ba0f00cd978197e3e5a2e251deef225413897e851def7ec59eb961ee65db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.9

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.1.3

3 release files

0.1.2

3 release files

0.1.1

3 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page