Skill: fredhjc/ai-news-feed (version 1.1.1)

--- name: ai-news-feed description: Query the AI News Feed API for real-time AI/ML news from 57+ curated Twitter/X accounts. Use when the user asks about AI news, trending AI topics, what's happening in AI/ML, or wants to build news-powered features. Provides pre-enriched bilingual (EN/ZH) summaries, importance scores, and topic tags via REST API hosted on RapidAPI. --- # AI News Feed API Query pre-aggregated, LLM-enriched AI/ML news from 57+ Twitter/X accounts. Data is updated every 2 hours. ## API Access & Setup **Before making any API call**, check if the user has a RapidAPI key configured. If not, guide them through these steps: 1. **Sign up / Log in** at <https://rapidapi.com> (free) 2. **Subscribe** to the API at <https://rapidapi.com/jiachenfred/api/twitter-ai-news-feed> (free tier available, no credit card needed) 3. After subscribing, go to the API's **Endpoints** tab on RapidAPI — the `X-RapidAPI-Key` will be auto-filled in the code snippets on the right side. Copy it. 4. Store the key for future use (e.g. in an environment variable `RAPIDAPI_KEY`) **All requests must include these headers:** ``` X-RapidAPI-Key: <user's own key from step 3> X-RapidAPI-Host: twitter-ai-news-feed.p.rapidapi.com ``` **Base URL**: `https://twitter-ai-news-feed.p.rapidapi.com` **Response format**: All endpoints return JSON. See [references/api-spec.md](references/api-spec.md) for full response schemas. ## Endpoints ### Get Feed — `GET /v1/feed` Latest posts sorted by recency. | Param | Type | Default | Description | |---|---|---|---| | `lang` | `en` \| `zh` | `en` | Response language | | `limit` | 1-100 | 20 | Number of posts | | `offset` | int | 0 | Pagination | | `tags` | string | — | Comma-separated filter: `paper`, `model_release`, `funding`, `product_launch`, `opinion`, `tutorial`, `benchmark`, `open_source`, `regulation`, `industry` | | `min_importance` | 1-10 | — | Minimum importance score | | `since` | unix ts | — | Posts after this timestamp | Example: `GET /v1/feed?lang=zh&limit=5&tags=model_release,paper&min_importance=7` ### Get Trending — `GET /v1/feed/trending` Top posts ranked by importance within a time window. | Param | Type | Default | Description | |---|---|---|---| | `lang` | `en` \| `zh` | `en` | Response language | | `limit` | 1-50 | 10 | Number of posts | | `hours` | 1-168 | 24 | Time window (168 = 7 days) | Example: `GET /v1/feed/trending?lang=zh&hours=48&limit=10` ### Get Accounts — `GET /v1/accounts` List all 57+ monitored accounts. | Param | Type | Description | |---|---|---| | `category` | `official` \| `researcher` \| `media` \| `kol` | Filter by category | ### Get Account Posts — `GET /v1/accounts/{handle}/posts` Posts from a specific account (e.g. `/v1/accounts/karpathy/posts`). | Param | Type | Default | Description | |---|---|---|---| | `lang` | `en` \| `zh` | `en` | Response language | | `limit` | 1-100 | 20 | Number of posts | | `offset` | int | 0 | Pagination | ### Get Tags — `GET /v1/tags` All tags with post counts. No parameters. ### Health Check — `GET /health` Returns `{"status": "ok", "timestamp": "..."}`. ## Key Response Fields Each post in the response contains: - `content` — Original tweet text - `summary` — One-line LLM summary (language follows `lang` param) - `description` — Detailed 2-4 sentence LLM analysis (language follows `lang` param) - `tags` — Array of topic tags - `importance` — Score 1-10 (composite of LLM analysis + engagement metrics) - `metrics` — `{likes, retweets, replies, views}` - `tweetUrl` — Link to original tweet - `tweetedAt` — ISO 8601 publish time **(UTC, convert to user's local timezone before displaying)** - `account` — `{handle, name, category}` For complete JSON schemas, see [references/api-spec.md](references/api-spec.md). ## Making Requests Example curl (replace `YOUR_KEY` with the user's RapidAPI key): ```bash curl "https://twitter-ai-news-feed.p.rapidapi.com/v1/feed/trending?lang=zh&limit=5" \ -H "X-RapidAPI-Key: YOUR_KEY" \ -H "X-RapidAPI-Host: twitter-ai-news-feed.p.rapidapi.com" ``` ## Common Use Cases 1. **Get today's top AI news in Chinese**: `GET /v1/feed/trending?lang=zh&hours=24&limit=10` 2. **Find new model releases**: `GET /v1/feed?tags=model_release&min_importance=5` 3. **Track a specific researcher**: `GET /v1/accounts/karpathy/posts?lang=zh` 4. **Get funding news only**: `GET /v1/feed?tags=funding&min_importance=6` 5. **Weekly digest**: `GET /v1/feed/trending?hours=168&limit=20&lang=en` ## Monitored Account Categories - **Official** (23): OpenAI, Anthropic, Google AI, Meta AI, NVIDIA, Hugging Face, Mistral, xAI, Stability AI, Runway, Perplexity, ElevenLabs, Cursor, Replit, etc. - **Researcher** (13): Karpathy, Yann LeCun, Andrew Ng, Jeff Dean, Ilya Sutskever, Jim Fan, Demis Hassabis, Jeremy Howard, etc. - **KOL** (12): Swyx, Simon Willison, Logan Kilpatrick, Emad Mostaque, Linus Ekenstam, etc. - **Media** (9): MIT Tech Review, WIRED, The Verge, AI Breakfast, Ben's Bites, The Rundown AI, etc.

path: references/api-spec.md
content: # AI News Feed API — Response Schemas

## Post Object

Every feed/trending/account-posts endpoint returns an array of Post objects:

```json
{
  "id": "2027386252555919386",
  "content": "We have raised a $110 billion round of funding from Amazon, NVIDIA, and SoftBank.",
  "summary": "该公司从亚马逊、英伟达和软银处获得了1100亿美元的融资。",
  "description": "该公司宣布已从亚马逊、英伟达和软银处筹集了高达1100亿美元的资金。这笔巨额投资表明了对该公司愿景和能力的强烈信心。",
  "tags": ["funding"],
  "importance": 9,
  "media": [],
  "metrics": {
    "likes": 38942,
    "retweets": 2651,
    "replies": 4123,
    "views": 8440977
  },
  "tweetUrl": "https://x.com/sama/status/2027386252555919386",
  "tweetedAt": "2026-02-27T14:12:04.000Z",
  "account": {
    "handle": "sama",
    "name": "Sam Altman",
    "category": "researcher"
  }
}
```

### Field Reference

| Field | Type | Description |
|---|---|---|
| `id` | string | Tweet ID |
| `content` | string | Original tweet text (always English, as posted) |
| `summary` | string \| null | One-line LLM summary. Language depends on `lang` query param. |
| `description` | string \| null | Detailed 2-4 sentence LLM analysis. Language depends on `lang` param. May be null for older posts. |
| `tags` | string[] | Topic classification tags. Possible values: `paper`, `product_launch`, `model_release`, `funding`, `opinion`, `tutorial`, `benchmark`, `open_source`, `regulation`, `industry` |
| `importance` | integer | Composite score 1-10. Combines LLM importance (40%) + absolute engagement (30%) + relative engagement vs account baseline (30%). |
| `media` | string[] | Array of media URLs (images/videos) attached to the tweet. |
| `metrics.likes` | integer | Like count |
| `metrics.retweets` | integer | Retweet count |
| `metrics.replies` | integer | Reply count |
| `metrics.views` | integer | View/impression count |
| `tweetUrl` | string | Direct link to original tweet on X/Twitter |
| `tweetedAt` | string | ISO 8601 timestamp of when the tweet was posted **(always UTC with `Z` suffix — convert to user's local timezone before displaying)** |
| `account.handle` | string | Twitter handle (without @) |
| `account.name` | string | Display name |
| `account.category` | string | One of: `official`, `researcher`, `media`, `kol` |

## Feed Response — `GET /v1/feed`

```json
{
  "items": [Post, ...],
  "count": 20,
  "offset": 0,
  "lang": "en"
}
```

## Trending Response — `GET /v1/feed/trending`

```json
{
  "items": [Post, ...],
  "hours": 24,
  "count": 10,
  "lang": "en"
}
```

## Accounts Response — `GET /v1/accounts`

```json
{
  "items": [
    { "handle": "OpenAI", "name": "OpenAI", "category": "official" },
    { "handle": "karpathy", "name": "Andrej Karpathy", "category": "researcher" }
  ],
  "count": 57
}
```

## Account Posts Response — `GET /v1/accounts/{handle}/posts`

```json
{
  "account": { "handle": "karpathy", "name": "Andrej Karpathy", "category": "researcher" },
  "items": [Post, ...],
  "count": 20,
  "offset": 0,
  "lang": "en"
}
```

## Tags Response — `GET /v1/tags`

```json
{
  "items": [
    { "tag": "model_release", "count": 142 },
    { "tag": "product_launch", "count": 98 },
    { "tag": "funding", "count": 45 }
  ]
}
```

## Importance Score Breakdown

The `importance` field (1-10) is a composite of three signals:

- **LLM importance (40%)**: How newsworthy the content is, scored by Gemini
- **Absolute engagement (30%)**: Raw likes/views compared to all posts (log-normalized)
- **Relative engagement (30%)**: How this post compares to the same account's median engagement

This means a small researcher's viral post can score higher than a routine corporate announcement, even if the corporate post has more absolute engagement.

## Available Tags

| Tag | Description |
|---|---|
| `paper` | Academic paper, research result |
| `model_release` | New model released or updated |
| `product_launch` | New product or feature launch |
| `funding` | Investment, fundraising, acquisition |
| `opinion` | Commentary, analysis, hot take |
| `tutorial` | How-to, guide, educational content |
| `benchmark` | Performance comparison, leaderboard |
| `open_source` | Open-source release or contribution |
| `regulation` | Policy, law, government action related to AI |
| `industry` | General industry news, partnerships, hiring |


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)