nytimes

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

New York Times Skill

New York Times Skill

Access premium journalism and news coverage from The New York Times.
获取《纽约时报》的优质新闻报道内容。

Quick Install

快速安装

bash
curl -sSL https://canifi.com/skills/nytimes/install.sh | bash
Or manually:
bash
cp -r skills/nytimes ~/.canifi/skills/
bash
curl -sSL https://canifi.com/skills/nytimes/install.sh | bash
或者手动安装:
bash
cp -r skills/nytimes ~/.canifi/skills/

Setup

配置

Configure via canifi-env:
bash
undefined
通过canifi-env进行配置:
bash
undefined

First, ensure canifi-env is installed:

首先,确保已安装canifi-env:

canifi-env set NYTIMES_API_KEY "your_api_key" canifi-env set NYTIMES_EMAIL "your_email" canifi-env set NYTIMES_PASSWORD "your_password"
undefined
canifi-env set NYTIMES_API_KEY "your_api_key" canifi-env set NYTIMES_EMAIL "your_email" canifi-env set NYTIMES_PASSWORD "your_password"
undefined

Privacy & Authentication

隐私与身份验证

Your credentials, your choice. Canifi LifeOS respects your privacy.
您的凭据,由您掌控。 Canifi LifeOS 尊重您的隐私。

Option 1: Manual Browser Login (Recommended)

选项1:手动浏览器登录(推荐)

If you prefer not to share credentials with Claude Code:
  1. Complete the Browser Automation Setup using CDP mode
  2. Login to the service manually in the Playwright-controlled Chrome window
  3. Claude will use your authenticated session without ever seeing your password
如果您不想与Claude Code共享凭据:
  1. 使用CDP模式完成浏览器自动化配置
  2. 在Playwright控制的Chrome窗口中手动登录该服务
  3. Claude将使用您的已认证会话,且绝不会看到您的密码

Option 2: Environment Variables

选项2:环境变量

If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果您愿意共享凭据,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
注意:存储在canifi-env中的凭据仅能在您的本地机器上访问,绝不会被传输。

Capabilities

功能

  1. Article Access: Read articles across news, opinion, and feature sections
  2. Section Browsing: Browse by section including World, Politics, Business, Tech
  3. Search Archives: Search the complete NYT archive dating back to 1851
  4. Saved Articles: Save articles to your account for later reading
  5. Newsletter Management: Subscribe to and manage NYT newsletters
  1. 文章访问:阅读新闻、观点和特稿板块的文章
  2. 板块浏览:按板块浏览,包括国际、政治、商业、科技等
  3. 档案搜索:搜索1851年至今的完整《纽约时报》档案
  4. 文章收藏:将文章保存到您的账户以便稍后阅读
  5. 通讯管理:订阅和管理《纽约时报》的通讯

Usage Examples

使用示例

Get Top Stories

获取头条新闻

User: "Show me today's top stories from the New York Times"
Assistant: Returns top headlines from the home section
用户:“给我展示今天《纽约时报》的头条新闻”
助手:返回首页板块的头条标题

Search Articles

搜索文章

User: "Search NYT for articles about artificial intelligence from the last month"
Assistant: Returns matching articles with headlines and summaries
用户:“搜索《纽约时报》过去一个月关于人工智能的文章”
助手:返回匹配的文章及标题和摘要

Browse Section

浏览板块内容

User: "Show me the latest NYT Technology articles"
Assistant: Returns recent technology section articles
用户:“给我展示《纽约时报》最新的科技板块文章”
助手:返回近期科技板块的文章

Save Article

收藏文章

User: "Save this NYT article to my account"
Assistant: Saves article to your NYT saved list
用户:“把这篇《纽约时报》的文章保存到我的账户”
助手:将文章保存到您的《纽约时报》收藏列表

Authentication Flow

身份验证流程

  1. Register for API key at developer.nytimes.com
  2. API key provides access to article search and top stories
  3. Full article access requires subscription
  4. Use credentials for authenticated features
  1. 在developer.nytimes.com注册获取API密钥
  2. API密钥可用于访问文章搜索和头条新闻功能
  3. 完整文章访问需要订阅权限
  4. 使用凭据访问需身份验证的功能

Error Handling

错误处理

ErrorCauseSolution
401 UnauthorizedInvalid API keyVerify API key
403 ForbiddenSubscription requiredSubscribe to access full articles
429 Rate LimitedAPI limit exceededWait and retry with backoff
404 Not FoundArticle not foundCheck article URL or ID
错误原因解决方法
401 未授权API密钥无效验证API密钥
403 禁止访问需要订阅权限订阅以访问完整文章
429 请求受限超出API请求限制等待后重试,采用退避策略
404 未找到文章不存在检查文章URL或ID

Notes

注意事项

  • Free API tier: 500 requests/day, 5 requests/minute
  • Subscription required for full article access
  • Archive API covers 1851 to present
  • Games and Cooking require separate subscriptions
  • Wirecutter reviews included with subscription
  • 免费API层级:每日500次请求,每分钟5次请求
  • 完整文章访问需要订阅
  • 档案API覆盖1851年至今的内容
  • 游戏和烹饪板块需要单独订阅
  • Wirecutter评测包含在订阅服务中