[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81538":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":26,"discoverSource":27},81538,"ohmytrends","iswangwenbin\u002Fohmytrends","iswangwenbin","ohmytrends is a Bun-only API \u002F CLI for querying Google Trends and Baidu Index","https:\u002F\u002Fx.com\u002Fiswangwenbin",null,"TypeScript",32,5,26,0,2,6,43.93,"MIT License",false,"main",[],"2026-06-12 04:01:34","# ohmytrends\n\n> [!IMPORTANT]\n> Use a dedicated secondary account for login instead of an important personal account. Please keep query frequency reasonable and avoid high-volume or batch requests. ohmytrends can only help retrieve trend data when your logged-in session can normally access the corresponding service; it cannot bypass Google Trends, Baidu Index, or any external system's rate limits, risk controls, account permissions, or access restrictions.\n\nEnglish | [简体中文](README.zh-CN.md)\n\n`ohmytrends` is a Bun-only API \u002F CLI for querying Google Trends and Baidu Index\n\nIt lets you log in manually when needed, then uses the authenticated page\ncontext to request and parse trend data. The project does not bypass login,\npaid permissions, or third-party access controls.\n\n## Features\n\n- Query Google Trends and Baidu Index from one Bun CLI.\n- Collect Baidu search\u002Ffeed indexes, overview rows, and Google timeline\u002Frelated\n  queries.\n- Compare multiple keywords with unified range options and Google `--geo`\n  support.\n- Use authenticated sessions through a guided manual login flow when needed.\n- Output readable tables, unified JSON, or serve a local JSON API.\n- Debug with visible-browser mode and build a single-file executable.\n\n## Requirements\n\n- Bun 1.3 or newer. This project is Bun-only. npm \u002F Node.js runtime is not supported.\n- Network access to Baidu Index or Google Trends.\n- Your own authorized account session when a service requires login.\n\n## Install And Run\n\n1. Install Bun 1.3 or newer:\n\n```bash\ncurl -fsSL https:\u002F\u002Fbun.com\u002Finstall | bash\n```\n\n2. Install dependencies:\n\n```bash\nbun install\n```\n\nFor development mode:\n\n```bash\nbun run dev\n```\n\n3. Start the local API server:\n\n```bash\nbun run start\n```\n\nThe first run will guide you through manual login when Baidu or Google needs an\naccount session.\n\n4. Query from another terminal:\n\n```bash\n# Submit a query and copy the returned pollUrl.\ncurl \"http:\u002F\u002F127.0.0.1:3000\u002Fapi\u002Ftrends?words=gemini%2Cclaude&source=all&range=30d\"\n\n# Poll until status is succeeded or failed.\ncurl \"http:\u002F\u002F127.0.0.1:3000\u002Fapi\u002Ftrends\u002F\u003Cquery-id>\"\n\n# Or wait on the same endpoint.\ncurl \"http:\u002F\u002F127.0.0.1:3000\u002Fapi\u002Ftrends?words=gemini%2Cclaude&source=all&range=30d&wait=true\"\n```\n\nRun a CLI query instead:\n\n```bash\nbun run get -- --words \"gemini,claude\"\n```\n\nPrint JSON:\n\n```bash\nbun run get -- --words \"gemini,claude\" --format json\n```\n\nBuild a local binary:\n\n```bash\nbun run build\n.\u002Fbin\u002Fohmytrends get --words \"gemini,claude\"\n```\n\n## API\n\n```bash\nbun run start\n# Submit a query and copy the returned pollUrl.\ncurl \"http:\u002F\u002F127.0.0.1:3000\u002Fapi\u002Ftrends?words=gemini%2Cclaude&source=all&range=30d\"\n\n# Poll until status is succeeded or failed.\ncurl \"http:\u002F\u002F127.0.0.1:3000\u002Fapi\u002Ftrends\u002F\u003Cquery-id>\"\n\n# Or wait on the same endpoint.\ncurl \"http:\u002F\u002F127.0.0.1:3000\u002Fapi\u002Ftrends?words=gemini%2Cclaude&source=all&range=30d&wait=true\"\n```\n\n`\u002Fapi\u002Ftrends` returns a queued query id by default. Poll the returned `pollUrl`\nuntil the status is `succeeded` or `failed`. Results are stored in SQLite, so\nthey remain available after the server restarts.\n\n## Usage\n\nSee [`docs\u002Fcli-usage.md`](docs\u002Fcli-usage.md) for the full CLI reference: commands, options, environment variables, login flow, Google \u002F Baidu usage details, and the unified JSON output schema.\n\n## Development\n\n```bash\n# Install project dependencies.\nbun install\n\n# Run generated CSS build, type checking, and tests.\nbun run ci\n\n# Start the interactive CLI in development defaults.\nbun run dev\n\n# Start development mode with a visible browser kept open for debugging.\nbun run dev:debug\n\n# Query one keyword and print JSON output.\nbun run get -- --words \"gemini\" --format json\n\n# Build the local single-file executable.\nbun run build\n\n# Run release validation and a dry-run package build.\nbun run release:check\n```\n\nThe CI workflow runs type checking and Bun tests on pull requests.\n\nProject structure:\n\n- `src\u002Fcli.ts` command entrypoint and orchestration.\n- `src\u002Foptions.ts` CLI argument parsing.\n- `src\u002Foutput.ts` JSON writing and terminal tables.\n- `src\u002Fbaidu.ts` Baidu Index login, page search, overview parsing, and trend decoding.\n- `src\u002Fgoogle.ts` Google login, timeline collection, and related queries.\n- `src\u002Fbrowser-utils.ts` shared browser\u002Fprofile helpers and status overlay.\n- `src\u002Foverview.ts` shared overview row parsing.\n- `src\u002Ftypes.ts` shared data types.\n- `src\u002Fconfig.ts` defaults and URL builders.\n\n## Agent Skill\n\nCodex \u002F agent skill support lives in the companion\n`ohmytrends-skills` repository. Keep this repository focused on the CLI, HTTP\nAPI, binaries, docs, and JSON schema.\n\n## Privacy\n\nBrowser profiles can contain cookies, sessions, local storage, and account data.\nNever commit or publish:\n\n- `profiles\u002F`\n- `data\u002F`\n- `exports\u002F`\n- `bin\u002F`\n- logs\n- `.env` files\n- custom browser profile directories\n\nThe default `.gitignore` excludes common local profile, build, and output paths.\n\n## Disclaimer\n\nThis project automates access through your own browser session. Use it only with\naccounts and data you are authorized to access. Third-party sites may change\ntheir HTML, APIs, login flow, rate limits, or terms at any time. This project\ndoes not bypass access controls and does not guarantee availability of any\nthird-party service.\n\n`ohmytrends` is an independent open-source CLI project and is not affiliated\nwith Baidu, Google, or any similarly named website.\n","ohmytrends 是一个仅支持 Bun 的 API\u002FCLI 工具，用于查询 Google Trends 和百度指数。它允许用户在需要时手动登录，然后利用认证后的页面上下文请求和解析趋势数据，不绕过任何登录、付费权限或第三方访问控制。项目支持从单一 CLI 查询多个关键词的趋势，并提供多种输出格式如可读表格、统一 JSON 或本地 JSON API 服务。适用于需要对比分析不同关键词在 Google 和百度平台上表现的研究人员或开发者。使用前需安装 Bun 1.3 或更高版本，并确保网络可以访问到 Baidu Index 或 Google Trends。","2026-06-11 04:05:26","CREATED_QUERY"]