Giter Site home page Giter Site logo

shusheng-l / icp_query Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hg-ha/icp_query

1.0 0.0 0.0 77 KB

基于Python3.8,全异步构建的高性能ICP备案查询模块和API,直接从工业和信息化部政务服务平台抓取实时数据,支持Web、APP、小程序、快应用名称查询,支持根据备案号查询,支持根据企业名称查询,同时提供发行版程序

Python 100.00%

icp_query's Introduction

ICP_Query

ICP备案查询,基于Python3.8,全异步构建的高性能ICP查询模块,直接从工业和信息化部政务服务平台抓取实时数据,支持Web、APP、小程序、快应用名称查询,支持根据备案号查询,支持根据企业名称查询,同时提供简单易用的高性能接口以及发行版程序

安装依赖

# 可以使用低版本包,基本都包含需要的模块
pip install -r requirements.txt

使用查询模块

import asyncio
from ymicp import beian

async def main(name):
    icp = beian()
    query = await icp.ymApp(name)
    print(query)

asyncio.run(main("微信"))

使用icpApi查询接口

1. 支持四种类型查询:
  • 网站: web
  • APP: app
  • 小程序: mapp
  • 快应用: kapp
2. 请求
  1. GET
    • URL: http://0.0.0.0:16181/query/{type}?search={name}

    • 示例: 查询域名 baidu.com 备案信息

      curl http://127.0.0.1:16181/query/web?search=baidu.com
      
    • 示例: 根据网站的备案号 京ICP证030173号 查询备案信息

      curl http://127.0.0.1:16181/query/web?search=京ICP证030173号
      
    • 示例: 根据企业名称查询备案信息

      curl http://127.0.0.1:16181/query/web?search=深圳市腾讯计算机系统有限公司
      
    • 示例: 根据企业名称查询备案信息,每页20条数据,查询第3页

      curl http://127.0.0.1:16181/query/web?search=深圳市腾讯计算机系统有限公司&pageNum=3&pageSize=20
      
  2. POST
    • headers : {"Content-Type": "application/json"}

    • URL: http://0.0.0.0:16181/query/{type}

    • Body: {"search": {name}}

    • 示例: 查询域名 baidu.com 备案信息

      curl -X POST -H "Content-Type: application/json" -d '{"search":"baidu.com"}' http://127.0.0.1:16181/query/web
      
    • 示例: 根据网站的备案号 京ICP证030173号 查询备案信息

      curl -X POST -H "Content-Type: application/json" -d '{"search":"京ICP证030173号"}' http://127.0.0.1:16181/query/web
      
    • 示例: 根据企业名称查询备案信息

      curl -X POST -H "Content-Type: application/json" -d '{"search":"深圳市腾讯计算机系统有限公司"}' http://127.0.0.1:16181/query/web
      
    • 示例: 根据企业名称查询备案信息,每页20条数据,查询第3页

      curl -X POST -H "Content-Type: application/json" -d '{"search":"深圳市腾讯计算机系统有限公司","pageNum":3,"pageSize":20}' http://127.0.0.1:16181/query/web
      
3. Linux 运行icpApi
  1. 源代码运行

    python3 icpApi.py
  2. 独立程序运行

    ./icpApi.bin
4. Windows 运行icpApi
  1. 源代码运行

    python3 icpApi.py
  2. 独立程序直接双击运行

5. 直接使用在线API

API文档

参数说明

参数 说明
lastPage 据查询数量有多少页
pages 同lastPage
pageSize 每页几条数据
pageNum 第几页
nextPage 下一页的页面序号
total 同pages
domain 备案的域名
domainId 域名id
limitAccess 是否限制接入
mainLicence ICP备案主体许可证号
natureName 主办单位性质
serviceLicence ICP备案服务许可证号
unitName 主办单位名称
updateRecordTime 审核通过日期
contentTypeName 服务前置审批项
cityId 城市ID
countyId 区县ID
contentTypeName 内容类型
mainUnitAddress 主体地址
serviceName 服务名称(APP、小程序或快应用名称)
version 服务版本

请喝茶吗

支付宝 微信
zfb wx 一铭API:1029212047
镜芯科技:376957298

其他项目

一铭API

icp_query's People

Contributors

hg-ha avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.