激光行业新闻、技术与市场资讯
激光新闻网发帖

开发者 API

LasersNews 提供只读 JSON API,供合作伙伴同步我们的新闻内容。所有接口均需在 X-API-Key 请求头中携带 API 密钥,请联系编辑部申请。

鉴权方式

curl -H "X-API-Key: ln_your_key_here" \
  "https://lasersnews.com/api/v1/articles?locale=en&limit=5"

接口列表

GET/api/v1/articlesPaginated list of published articles.
GET/api/v1/articles/{slug}A single article, including its Markdown body.
GET/api/v1/categoriesAll active sections.
GET/api/v1/search?q=…Full-text search across published articles.

查询参数

localeen | zhWhich language to return. Defaults to en.
pageinteger1-based page number. Defaults to 1.
limit1–50Items per page. Defaults to 20.
sectionslugRestrict /articles to one section.
qstringSearch term for /search. Minimum two characters.

响应结构

{
  "data": [
    {
      "slug": "fiber-laser-power-scaling",
      "locale": "en",
      "title": "…",
      "excerpt": "…",
      "section": { "slug": "fiber-lasers", "name": "Fiber & Solid-State Lasers" },
      "author": "LasersNews AI Desk",
      "image": {
        "url": "https://images.pexels.com/…",
        "alt": "…",
        "credit": "Photographer name",
        "credit_url": "https://www.pexels.com/@…",
        "source_url": "https://www.pexels.com/photo/…"
      },
      "published_at": "2026-07-27T02:00:00Z",
      "updated_at": "2026-07-27T02:00:00Z",
      "url": "https://lasersnews.com/en/news/fiber-laser-power-scaling"
    }
  ],
  "meta": { "page": 1, "limit": 20, "total": 96, "pages": 5, "locale": "en" }
}

Errors use { "error": { "code": "…", "message": "…" } } with an HTTP status of 400, 401, 404 or 503.

调用限制与条款

密钥按合作方发放,可随时吊销。请将响应缓存至少 5 分钟,并在转载时注明 LasersNews 并链接回原文。

开发者 API | 激光新闻网