explaingit

zhengyanglsun/iflow-search-js

Analysis updated 2026-06-24

11TypeScriptAudience · developerComplexity · 3/5LicenseSetup · easy

TLDR

Official JavaScript and TypeScript SDK monorepo for iFlow Search, a Chinese web, image, and page-fetch API shaped for AI agents. Ships a core client, LangChain tools, and an MCP server.

Mindmap

mindmap
  root((iflow-search-js))
    Inputs
      Search queries
      Image queries
      Web page URLs
      iFlow API key
    Outputs
      Structured search results
      Fetched web pages
      Image hits
      MCP tool calls
    Use Cases
      Add web search to a LangChain agent
      Wire iFlow into Claude Desktop
      Build a backend search service
      Fetch and summarize pages
    Tech Stack
      TypeScript
      pnpm
      LangChain
      MCP
Click or tap to explore — scroll the page freely

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

Give a LangChain agent web search by adding the three iflow tools to bindTools

USE CASE 2

Run the stdio MCP server so Claude Desktop or Claude Code can search the Chinese web

USE CASE 3

Call createIFlowSearchClient directly from a Node backend to power an internal lookup endpoint

USE CASE 4

Build a fetch-and-summarize pipeline using iflow_web_fetch then a local LLM

What is it built with?

TypeScriptpnpmLangChainLangGraphMCP

How does it compare?

zhengyanglsun/iflow-search-jsanousss007/ng-blatuiblockedpath/pi-xai-oauth
Stars111111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderateeasy
Complexity3/53/52/5
Audiencedeveloperdeveloperdeveloper

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

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires an iFlow API key from the operator and pnpm to work with the monorepo.

MIT license, use freely in commercial and personal projects with attribution.

In plain English

iflow-search-js is the official JavaScript and TypeScript SDK family for iFlow Search, a Chinese search API operated by Hangzhou Xingchen Qianxun Technology that offers web search, image search, and web page fetching. The output is shaped for AI consumption, meaning results come back as structured data that a language model can read directly. The repository is a pnpm monorepo with four parts. The first is @iflow-ai/search-core, a small framework-agnostic client with no runtime dependencies, intended for backend code or for people writing their own integrations. The second is @iflow-ai/search-langchain, which wraps the core into three LangChain tools called iflow_web_search, iflow_image_search, and iflow_web_fetch. The third is an example LangGraph agent that uses createReactAgent and shows how to wire those tools into an agent loop. The fourth is @iflow-ai/search-mcp, a stdio MCP server that exposes the same three tools to clients like Hermes, Claude Code, and Claude Desktop. The authors decided not to publish a separate LangGraph package because LangGraph already consumes LangChain tools directly, so the LangChain package is reused for both. The example agent directory is workspace-only and not meant to be installed as a dependency. Basic use is short. You import createIFlowSearchClient from the core package, pass an apiKey from the IFLOW_API_KEY environment variable along with attribution fields, then call methods like webSearch with a query and a count. Errors come back as a result object with ok false and a code and message rather than as thrown exceptions. The LangChain entry point is createIFlowSearchTools, which returns tools ready to hand to any agent that calls bindTools. Every outbound request adds IFlow-Source, IFlow-Integration, and IFlow-Integration-Version headers so the operator can see which adapter is calling. The MCP build also forwards IFlow-MCP-Client headers if the host sets IFLOW_MCP_CLIENT and IFLOW_MCP_CLIENT_VERSION. The README is explicit about not committing real API keys, and notes that the unit tests use mocked fetch with fake keys. The whole project is MIT licensed.

Copy-paste prompts

Prompt 1
Set up @iflow-ai/search-langchain in my Node project, read IFLOW_API_KEY from .env, and add iflow_web_search to a LangGraph createReactAgent
Prompt 2
Configure the @iflow-ai/search-mcp stdio server in Claude Desktop and make a test query for latest Hangzhou news
Prompt 3
Write a TypeScript script that calls createIFlowSearchClient.webSearch with count 10 and prints titles plus URLs
Prompt 4
Show me how to handle the ok false result shape from @iflow-ai/search-core instead of try-catch
Prompt 5
Set the IFlow-Integration and IFlow-Integration-Version headers correctly for a custom adapter built on @iflow-ai/search-core

Frequently asked questions

What is iflow-search-js?

Official JavaScript and TypeScript SDK monorepo for iFlow Search, a Chinese web, image, and page-fetch API shaped for AI agents. Ships a core client, LangChain tools, and an MCP server.

What language is iflow-search-js written in?

Mainly TypeScript. The stack also includes TypeScript, pnpm, LangChain.

What license does iflow-search-js use?

MIT license, use freely in commercial and personal projects with attribution.

How hard is iflow-search-js to set up?

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

Who is iflow-search-js for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.