explaingit

iswangwenbin/ohmytrends

Analysis updated 2026-05-18

30TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

A command-line tool and local API server that fetches Google Trends and Baidu Index search-trend data using your own account session.

Mindmap

mindmap
  root((ohmytrends))
    What it does
      Fetch Google Trends data
      Fetch Baidu Index data
      CLI and local API server
    Tech stack
      TypeScript
      Bun runtime
      SQLite
    Use cases
      Compare keyword trends
      Query via local API
      Cache repeated queries
    Audience
      Developers
      Marketers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Compare search interest for multiple keywords over a date range.

USE CASE 2

Run it as a local server and query it from scripts or other tools.

USE CASE 3

Pull Baidu Index search and feed data alongside Google Trends.

USE CASE 4

Compile it into a single-file binary for use without installing Bun.

What is it built with?

TypeScriptBunSQLite

How does it compare?

iswangwenbin/ohmytrendsalbertaworlds/japanese-text-cleanerayangabryl/ngx-digit-flow
Stars303030
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires the Bun runtime, not Node.js, plus a manual login step on first use.

In plain English

ohmytrends is a command-line tool and local API server for fetching search trend data from Google Trends and Baidu Index. It lets you query both services from one place, compare multiple keywords, set a date range, and get the results as a formatted table or JSON. You can also run it as a background server that accepts requests over a local URL, which makes it easier to integrate with scripts or other tools. The tool works by controlling a browser using your own logged-in account session. It does not bypass any login requirements or access controls: if a service requires you to sign in, the tool walks you through a manual login step the first time, then reuses that session for subsequent queries. Results are cached in a local SQLite database so repeated queries for the same keywords do not need to hit the service again, and the data remains available after a server restart. For Google Trends, the tool collects timeline data (how search interest for a keyword changes over time) and related queries. For Baidu Index, it collects search index values, feed index values, and overview row data. Geographic filtering is supported for Google queries. The API server accepts a keyword list and a time range, queues the request, and returns a poll URL you can check until the query completes. The project requires Bun, a JavaScript runtime that is distinct from Node.js. It does not run with npm or Node.js. The README notes that query frequency should be kept reasonable to avoid triggering rate limits or risk controls on the services being queried, and recommends using a secondary account rather than a primary personal account. It can be compiled into a single-file binary for use without a Bun installation on the target machine.

Copy-paste prompts

Prompt 1
Help me install ohmytrends with Bun and run my first keyword comparison.
Prompt 2
Show me how to start ohmytrends as a local API server and query it.
Prompt 3
Explain how ohmytrends handles login sessions for Google Trends and Baidu.
Prompt 4
Walk me through compiling ohmytrends into a standalone binary.

Frequently asked questions

What is ohmytrends?

A command-line tool and local API server that fetches Google Trends and Baidu Index search-trend data using your own account session.

What language is ohmytrends written in?

Mainly TypeScript. The stack also includes TypeScript, Bun, SQLite.

How hard is ohmytrends to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is ohmytrends for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.