Metadata-Version: 2.4
Name: research-sources
Version: 0.2.1
Summary: Read-only research sources (X, Reddit, Hacker News, YouTube, LinkedIn and App Store reviews) for agents, as one JSON CLI
Author: Samuel Zhang
License-Expression: MIT
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES
Requires-Python: >=3.11
Project-URL: Repository, https://github.com/SamuelZ12/research-sources
Description-Content-Type: text/markdown

# research-sources (`rsrc`)

`rsrc` is a command-line tool that lets an AI agent read sites that web search covers poorly: X, Reddit, Hacker News, YouTube and [three more](#sources).

- **Finds what web search misses.** In a five-topic test, an agent with an early `rsrc` cited at least four URLs per topic that web search alone did not.
- **Fast.** Most lookups take under a second. On X and Reddit, `rsrc` was 2 to 12 times faster than Agent-Reach.
- **Honest.** A login wall, a CAPTCHA page or the wrong post is an error, never a result. `rsrc` had no false success in 264 test runs on its six sources.
- **Free.** No API keys. Only X search and Reddit search need your own session.

The [measurements](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/docs/comparisons.md) have the method and limits behind each number.

```sh
rsrc x read https://x.com/karpathy/status/1886192184808149383
rsrc hn search "vibe coding"
rsrc youtube read https://youtu.be/7xTGNNLPyMI
```

Each command prints one JSON object with the text, author, date and engagement of each item. The [output reference](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/docs/output.md) shows a full example.

## Install

You need Python 3.11 or newer and [uv](https://docs.astral.sh/uv/). `rsrc` has no other Python dependencies.

```sh
uv tool install research-sources
rsrc check hn appstore
```

The check sends one request to each source and prints the outcome under `meta.sources`.

Sites change, so update now and then with `uv tool upgrade research-sources`. Once a day `rsrc` asks PyPI for the newest version, and when yours is older it says so in `meta.notes` with the command to run. `RSRC_NO_UPDATE_CHECK=1` turns that off.

Then give your agent the [skill](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/skills/research-sources/SKILL.md), which says which command answers which question and what to do on each error:

```sh
npx skills add SamuelZ12/research-sources
```

Claude Code and Codex can also install it as a plugin:

```sh
claude plugin marketplace add SamuelZ12/research-sources && claude plugin install research-sources@research-sources
codex plugin marketplace add SamuelZ12/research-sources && codex plugin add research-sources@research-sources
```

Otherwise, copy the `skills/research-sources` folder into the folder your agent loads skills from. Then ask something like "What is Hacker News saying about Claude Code this month?"

## Sources

| Source | Commands | Extra setup |
|---|---|---|
| X | `x read`, `x thread`, `x replies`, `x timeline`, `x search` | [Your own X session](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/docs/x-session.md), for `x search` only |
| Reddit | `reddit read`, `reddit search` | [Ego Lite](https://lite.ego.app/), for search and live threads. Without it, `reddit read` uses the public [Arctic Shift](https://github.com/ArthurHeitmann/arctic_shift) archive |
| Hacker News | `hn search`, `hn read` | None |
| YouTube | `youtube search`, `youtube read` (details and transcript) | `yt-dlp`, and `deno` for `youtube read` and `check youtube` |
| LinkedIn | `linkedin read` (public post and comments), `linkedin profile` (public profile summary) | None |
| Instagram | `instagram read` (public posts and reels, with optional media downloads) | [Ego Lite](https://lite.ego.app/), and `curl` for downloads |
| App Store | `appstore search`, `appstore read` (listing and reviews) | None |

Each command starts with `rsrc`, and `--help` lists its flags. On a Mac with Homebrew, `brew install yt-dlp deno` covers YouTube. X and Reddit commands can act as your own account, so keep their volume low. The [source reference](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/docs/sources.md) has the full syntax and what each source returns and omits.

## How it works

`rsrc` has no scraper farm, proxy or API key. Each command either asks a public service or loads a page in your own browser.

| Source | Where the data comes from | Uses your account |
|---|---|---|
| X posts, threads, replies | [FxTwitter](https://github.com/FxEmbed/FxEmbed), a public service that serves X posts as JSON | No |
| X search, X timeline | X itself, as the account signed in to Ego Lite, a cookie pair or Chrome. A timeline falls back to FxTwitter when no session is set up | Yes |
| Reddit search, live threads | reddit.com pages loaded in a background tab of Ego Lite | Yes, if Ego Lite is signed in to Reddit |
| Reddit threads without Ego Lite | The public [Arctic Shift](https://github.com/ArthurHeitmann/arctic_shift) archive. No request goes to Reddit | No |
| Hacker News | The public Algolia HN API | No |
| YouTube | `yt-dlp` on your machine | No |
| LinkedIn | One HTTPS request for the public post or profile page, with no cookies | No |
| Instagram | Instagram's public post metadata and [FastDL](https://fastdl.app/) in an Ego Lite task space | No Instagram account |
| App Store | Apple's public storefront and review feed | No |

**Can it get my account limited or banned?** Only the rows marked "Yes" touch an account, and there the risk is real: X and Reddit restrict automated access, and they see those requests as you. `rsrc` keeps the volume small. A search is capped at 25 requests and a timeline at five. On a rate limit, a login wall or a verification page it stops with an error and does not retry or switch routes. If you would rather not take the risk, use only the commands that need no account.

## Output

Every command prints one JSON object with the same fields on stdout, on success and on failure. Exit `0` means at least one item, and `66` means none. Exit `2` means bad arguments or setup. Exit `1` means a runtime failure with a code such as `rate_limited`, `blocked` or `not_found`. The [output reference](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/docs/output.md) has the full shape and every error code.

## How it compares

- **Want a finished brief?** Use [last30days](https://github.com/mvanhorn/last30days-skill). It searches many sites, scores the results and writes the report.
- **Need Chinese platforms such as Bilibili and Xiaohongshu?** Use [Agent-Reach](https://github.com/Panniantong/Agent-Reach), which has a longer site list.
- **Already have web search?** Use `rsrc`. It adds each site's own results in one shape and does nothing else.

On 2026-11-25 the three tools ran the same 34 lookups in two sessions about 16 hours apart; 12 of the lookups were on sources `rsrc` has since dropped. On LinkedIn, Agent-Reach reported success on 12 runs that returned a not-found page or a sign-up page. The [full table](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/docs/comparisons.md#4-rsrc-agent-reach-and-last30days-on-the-same-lookups) has every result, including the four lookups a new `rsrc` install fails without a login.

## Limits

- **Read-only.** `rsrc` never posts, likes, follows or trades.
- **No ranking, merging or caching.** Each list is that site's own results in that site's order, fetched again on every command.
- **Not a web search.** Pair it with one.
- **Only what web search misses.** For GitHub, use the [GitHub CLI](https://cli.github.com/) (`gh`). For other sites, use web search or a page fetch.
- **Unofficial routes.** `rsrc` reads X, Reddit, YouTube, LinkedIn, Instagram and the App Store without their official APIs. X, Reddit and LinkedIn restrict automated access in their terms, and X or Reddit can limit an account that `rsrc` uses. A route can change or block without notice, and then `rsrc` fails with an error code. You are responsible for following each site's terms.
- **Early software.** One maintainer. Live sources have been tested on macOS only.

## Contributing

[`CONTRIBUTING.md`](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/CONTRIBUTING.md) has the setup and the rules a change must keep.

## License

[MIT](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/LICENSE). The request shape for X's web search is ported from @steipete/bird v0.8.0 (MIT, Copyright (c) 2025 Peter Steinberger). bird is no longer published. Its notice is in [`THIRD_PARTY_NOTICES`](https://github.com/SamuelZ12/research-sources/blob/v0.2.1/THIRD_PARTY_NOTICES).
