EQ 选型数据接口
返回免费选型

将元件选型接入你的业务系统

只读 HTTPS / JSON 接口。网页注册账号用于免费在线选型;系统集成使用管理员单独分配的服务密钥,不使用网站密码,也不改变桌面软件授权。

接口地址与鉴权

https://xx.xtrans.top/v1/dq123-selection
Authorization: Bearer YOUR_API_KEY

请把密钥保存在你自己的服务端环境变量中,勿写入网页、前端 JavaScript、URL、日志或公开仓库。未配置跨站 CORS;第三方网页请经自己的后端调用。接口不收取本服务调用费用,仍受合理限速保护。

常用查询

用途GET 路径说明
数据统计/stats快照时间、覆盖状态、型号数量
厂家/manufacturers?q=正泰q 可不填,取得 factory_id
产品系列/series?factoryId=1取 is_leaf 对应的 series_id
型号搜索/search?q=DZ108-20&field=model&page=1全库前缀搜索;q 为 2–160 字符,每页 50 条,field 可为 orderNum
型号列表/models?seriesId=519&page=1&pageSize=50每页 1–300;可用 q 筛型号,或 selected 传逗号分隔选项 ID
精确产品及表价/product?seriesId=519&productId=15推荐取价接口,返回一条指定产品;不存在返回 404
选型参数/selection?seriesId=519&productId=15参数、选项和建议预选值;productId 可不填
图片/image?seriesId=519图片流,未下载时 404,同样需要鉴权
已下载样本/samples?seriesId=519仅 download_url 非空时能下载

立即试调:精确读取价格

curl --get 'https://xx.xtrans.top/v1/dq123-selection/product' \
  --data-urlencode 'seriesId=519' \
  --data-urlencode 'productId=15' \
  -H "Authorization: Bearer $CATALOG_API_KEY"

该产品在当前快照中为 DZ108-20/111 16A,表价 172.72 元。响应结构(只列关键字段):

{
  "schemaVersion": "catalog-product/v1",
  "item": {
    "series_id": 519,
    "product_id": "15",
    "model": "DZ108-20/111 16A",
    "price": 172.72
  },
  "currency": "CNY",
  "priceStatus": "table_price",
  "priceKind": "snapshot_list_price",
  "snapshot": { "status": "partial" }
}

Python 调用

import os, requests
response = requests.get(
    "https://xx.xtrans.top/v1/dq123-selection/product",
    params={"seriesId": 519, "productId": "15"},
    headers={"Authorization": "Bearer " + os.environ["CATALOG_API_KEY"]},
    timeout=15,
)
response.raise_for_status()
data = response.json()
if data["priceStatus"] == "table_price":
    print(data["item"]["model"], data["item"]["price"], data["currency"])
else:
    print("待询价")

集成约定