[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73584":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":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},73584,"node-DeepResearch","jina-ai\u002Fnode-DeepResearch","jina-ai","Keep searching, reading webpages, reasoning until it finds the answer (or exceeding the token budget)","https:\u002F\u002Fsearch.jina.ai",null,"TypeScript",5181,454,30,48,0,3,7,15,9,38.97,"Apache License 2.0",false,"main",[26,27],"deepresearch","deepsearch","2026-06-12 02:03:15","# DeepResearch\n\n[Official UI](https:\u002F\u002Fsearch.jina.ai\u002F) | [UI Code](https:\u002F\u002Fgithub.com\u002Fjina-ai\u002Fdeepsearch-ui) | [Stable API](https:\u002F\u002Fjina.ai\u002Fdeepsearch) | [Blog](https:\u002F\u002Fjina.ai\u002Fnews\u002Fa-practical-guide-to-implementing-deepsearch-deepresearch)\n\nKeep searching, reading webpages, reasoning until an answer is found (or the token budget is exceeded). Useful for deeply investigating a query.\n\n> [!IMPORTANT]  \n> Unlike OpenAI\u002FGemini\u002FPerplexity's \"Deep Research\", we focus solely on **finding the right answers via our iterative process**. We don't optimize for long-form articles, that's a **completely different problem** – so if you need quick, concise answers from deep search, you're in the right place. If you're looking for AI-generated long reports like OpenAI\u002FGemini\u002FPerplexity does, this isn't for you.\n\n```mermaid\n---\nconfig:\n  theme: mc\n  look: handDrawn\n---\nflowchart LR\n subgraph Loop[\"until budget exceed\"]\n    direction LR\n        Search[\"Search\"]\n        Read[\"Read\"]\n        Reason[\"Reason\"]\n  end\n    Query([\"Query\"]) --> Loop\n    Search --> Read\n    Read --> Reason\n    Reason --> Search\n    Loop --> Answer([\"Answer\"])\n\n```\n\n## [Blog Post](https:\u002F\u002Fjina.ai\u002Fnews\u002Fa-practical-guide-to-implementing-deepsearch-deepresearch)\n\nWhether you like this implementation or not, I highly recommend you to read DeepSearch\u002FDeepResearch implementation guide I wrote, which gives you a gentle intro to this topic.\n\n- [English Part I](https:\u002F\u002Fjina.ai\u002Fnews\u002Fa-practical-guide-to-implementing-deepsearch-deepresearch), [Part II](https:\u002F\u002Fjina.ai\u002Fnews\u002Fsnippet-selection-and-url-ranking-in-deepsearch-deepresearch)\n- [中文微信公众号 第一讲](https:\u002F\u002Fmp.weixin.qq.com\u002Fs\u002F-pPhHDi2nz8hp5R3Lm_mww), [第二讲](https:\u002F\u002Fmp.weixin.qq.com\u002Fs\u002FapnorBj4TZs3-Mo23xUReQ)\n- [日本語: DeepSearch\u002FDeepResearch 実装の実践ガイド](https:\u002F\u002Fjina.ai\u002Fja\u002Fnews\u002Fa-practical-guide-to-implementing-deepsearch-deepresearch)\n\n## Try it Yourself\n\nWe host an online deployment of this **exact** codebase, which allows you to do a vibe-check; or use it as daily productivity tools.\n\nhttps:\u002F\u002Fsearch.jina.ai\n\nThe official API is also available for you to use:\n\n```\nhttps:\u002F\u002Fdeepsearch.jina.ai\u002Fv1\u002Fchat\u002Fcompletions\n```\n\nLearn more about the API at https:\u002F\u002Fjina.ai\u002Fdeepsearch\n\n\n\n\n## Install\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fjina-ai\u002Fnode-DeepResearch.git\ncd node-DeepResearch\nnpm install\n```\n\n[安装部署视频教程 on Youtube](https:\u002F\u002Fyoutu.be\u002FvrpraFiPUyA)\n\nIt is also available on npm but not recommended for now, as the code is still under active development.\n\n\n## Usage\n\nWe use Gemini (latest `gemini-2.0-flash`) \u002F OpenAI \u002F [LocalLLM](#use-local-llm) for reasoning, [Jina Reader](https:\u002F\u002Fjina.ai\u002Freader) for searching and reading webpages, you can get a free API key with 1M tokens from jina.ai. \n\n```bash\nexport GEMINI_API_KEY=...  # for gemini\n# export OPENAI_API_KEY=... # for openai\n# export LLM_PROVIDER=openai # for openai\nexport JINA_API_KEY=jina_...  # free jina api key, get from https:\u002F\u002Fjina.ai\u002Freader\n\nnpm run dev $QUERY\n```\n\n### Official Site\n\nYou can try it on [our official site](https:\u002F\u002Fsearch.jina.ai).\n\n### Official API\n\nYou can also use [our official DeepSearch API](https:\u002F\u002Fjina.ai\u002Fdeepsearch):\n\n```\nhttps:\u002F\u002Fdeepsearch.jina.ai\u002Fv1\u002Fchat\u002Fcompletions\n```\n\nYou can use it with any OpenAI-compatible client. \n\nFor the authentication Bearer, API key, rate limit, get from https:\u002F\u002Fjina.ai\u002Fdeepsearch.\n\n#### Client integration guidelines\n\nIf you are building a web\u002Flocal\u002Fmobile client that uses `Jina DeepSearch API`, here are some design guidelines:\n- Our API is fully compatible with [OpenAI API schema](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fapi-reference\u002Fchat\u002Fcreate), this should greatly simplify the integration process. The model name is `jina-deepsearch-v1`.\n- Our DeepSearch API is a reasoning+search grounding LLM, so it's best for questions that require deep reasoning and search.\n- Two special tokens are introduced `\u003Cthink>...\u003C\u002Fthink>`. Please render them with care.\n- Citations are often provided, and in [Github-flavored markdown footnote format](https:\u002F\u002Fgithub.blog\u002Fchangelog\u002F2021-09-30-footnotes-now-supported-in-markdown-fields\u002F), e.g. `[^1]`, `[^2]`, ...\n- Guide the user to get a Jina API key from https:\u002F\u002Fjina.ai, with 1M free tokens for new API key.\n- There are rate limits, [between 10RPM to 30RPM depending on the API key tier](https:\u002F\u002Fjina.ai\u002Fcontact-sales#rate-limit).\n- [Download Jina AI logo here](https:\u002F\u002Fjina.ai\u002Flogo-Jina-1024.zip)\n\n## Demo\n> was recorded with `gemini-1.5-flash`, the latest `gemini-2.0-flash` leads to much better results!\n\nQuery: `\"what is the latest blog post's title from jina ai?\"`\n3 steps; answer is correct!\n![demo1](.github\u002Fvisuals\u002Fdemo.gif)\n\nQuery: `\"what is the context length of readerlm-v2?\"`\n2 steps; answer is correct!\n![demo1](.github\u002Fvisuals\u002Fdemo3.gif)\n\nQuery: `\"list all employees from jina ai that u can find, as many as possible\"` \n11 steps; partially correct! but im not in the list :(\n![demo1](.github\u002Fvisuals\u002Fdemo2.gif)\n\nQuery: `\"who will be the biggest competitor of Jina AI\"` \n42 steps; future prediction kind, so it's arguably correct! atm Im not seeing `weaviate` as a competitor, but im open for the future \"i told you so\" moment.\n![demo1](.github\u002Fvisuals\u002Fdemo4.gif)\n\nMore examples:\n\n```\n# example: no tool calling \nnpm run dev \"1+1=\"\nnpm run dev \"what is the capital of France?\"\n\n# example: 2-step\nnpm run dev \"what is the latest news from Jina AI?\"\n\n# example: 3-step\nnpm run dev \"what is the twitter account of jina ai's founder\"\n\n# example: 13-step, ambiguious question (no def of \"big\")\nnpm run dev \"who is bigger? cohere, jina ai, voyage?\"\n\n# example: open question, research-like, long chain of thoughts\nnpm run dev \"who will be president of US in 2028?\"\nnpm run dev \"what should be jina ai strategy for 2025?\"\n```\n\n## Use Local LLM\n\n> Note, not every LLM works with our reasoning flow, we need those who support structured output (sometimes called JSON Schema output, object output) well. Feel free to purpose a PR to add more open-source LLMs to the working list.\n\nIf you use Ollama or LMStudio, you can redirect the reasoning request to your local LLM by setting the following environment variables:\n\n```bash\nexport LLM_PROVIDER=openai  # yes, that's right - for local llm we still use openai client\nexport OPENAI_BASE_URL=http:\u002F\u002F127.0.0.1:1234\u002Fv1  # your local llm endpoint\nexport OPENAI_API_KEY=whatever  # random string would do, as we don't use it (unless your local LLM has authentication)\nexport DEFAULT_MODEL_NAME=qwen2.5-7b  # your local llm model name\n```\n\n\n## OpenAI-Compatible Server API\n\nIf you have a GUI client that supports OpenAI API (e.g. [CherryStudio](https:\u002F\u002Fdocs.cherry-ai.com\u002F), [Chatbox](https:\u002F\u002Fgithub.com\u002FBin-Huang\u002Fchatbox)) , you can simply config it to use this server.\n\n![demo1](.github\u002Fvisuals\u002Fdemo6.gif)\n\nStart the server:\n```bash\n# Without authentication\nnpm run serve\n\n# With authentication (clients must provide this secret as Bearer token)\nnpm run serve --secret=your_secret_token\n```\n\nThe server will start on http:\u002F\u002Flocalhost:3000 with the following endpoint:\n\n### POST \u002Fv1\u002Fchat\u002Fcompletions\n```bash\n# Without authentication\ncurl http:\u002F\u002Flocalhost:3000\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"jina-deepsearch-v1\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": \"Hello!\"\n      }\n    ]\n  }'\n\n# With authentication (when server is started with --secret)\ncurl http:\u002F\u002Flocalhost:3000\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer your_secret_token\" \\\n  -d '{\n    \"model\": \"jina-deepsearch-v1\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": \"Hello!\"\n      }\n    ],\n    \"stream\": true\n  }'\n```\n\nResponse format:\n```json\n{\n  \"id\": \"chatcmpl-123\",\n  \"object\": \"chat.completion\",\n  \"created\": 1677652288,\n  \"model\": \"jina-deepsearch-v1\",\n  \"system_fingerprint\": \"fp_44709d6fcb\",\n  \"choices\": [{\n    \"index\": 0,\n    \"message\": {\n      \"role\": \"assistant\",\n      \"content\": \"YOUR FINAL ANSWER\"\n    },\n    \"logprobs\": null,\n    \"finish_reason\": \"stop\"\n  }],\n  \"usage\": {\n    \"prompt_tokens\": 9,\n    \"completion_tokens\": 12,\n    \"total_tokens\": 21\n  }\n}\n```\n\nFor streaming responses (stream: true), the server sends chunks in this format:\n```json\n{\n  \"id\": \"chatcmpl-123\",\n  \"object\": \"chat.completion.chunk\",\n  \"created\": 1694268190,\n  \"model\": \"jina-deepsearch-v1\",\n  \"system_fingerprint\": \"fp_44709d6fcb\",\n  \"choices\": [{\n    \"index\": 0,\n    \"delta\": {\n      \"content\": \"...\"\n    },\n    \"logprobs\": null,\n    \"finish_reason\": null\n  }]\n}\n```\n\nNote: The think content in streaming responses is wrapped in XML tags:\n```\n\u003Cthink>\n[thinking steps...]\n\u003C\u002Fthink>\n[final answer]\n```\n\n\n## Docker Setup\n\n### Build Docker Image\nTo build the Docker image for the application, run the following command:\n```bash\ndocker build -t deepresearch:latest .\n```\n\n### Run Docker Container\nTo run the Docker container, use the following command:\n```bash\ndocker run -p 3000:3000 --env GEMINI_API_KEY=your_gemini_api_key --env JINA_API_KEY=your_jina_api_key deepresearch:latest\n```\n\n### Docker Compose\nYou can also use Docker Compose to manage multi-container applications. To start the application with Docker Compose, run:\n```bash\ndocker-compose up\n```\n\n## How Does it Work?\n\nNot sure a flowchart helps, but here it is:\n\n```mermaid\nflowchart TD\n    Start([Start]) --> Init[Initialize context & variables]\n    Init --> CheckBudget{Token budget\u003Cbr\u002F>exceeded?}\n    CheckBudget -->|No| GetQuestion[Get current question\u003Cbr\u002F>from gaps]\n    CheckBudget -->|Yes| BeastMode[Enter Beast Mode]\n\n    GetQuestion --> GenPrompt[Generate prompt]\n    GenPrompt --> ModelGen[Generate response\u003Cbr\u002F>using Gemini]\n    ModelGen --> ActionCheck{Check action\u003Cbr\u002F>type}\n\n    ActionCheck -->|answer| AnswerCheck{Is original\u003Cbr\u002F>question?}\n    AnswerCheck -->|Yes| EvalAnswer[Evaluate answer]\n    EvalAnswer --> IsGoodAnswer{Is answer\u003Cbr\u002F>definitive?}\n    IsGoodAnswer -->|Yes| HasRefs{Has\u003Cbr\u002F>references?}\n    HasRefs -->|Yes| End([End])\n    HasRefs -->|No| GetQuestion\n    IsGoodAnswer -->|No| StoreBad[Store bad attempt\u003Cbr\u002F>Reset context]\n    StoreBad --> GetQuestion\n\n    AnswerCheck -->|No| StoreKnowledge[Store as intermediate\u003Cbr\u002F>knowledge]\n    StoreKnowledge --> GetQuestion\n\n    ActionCheck -->|reflect| ProcessQuestions[Process new\u003Cbr\u002F>sub-questions]\n    ProcessQuestions --> DedupQuestions{New unique\u003Cbr\u002F>questions?}\n    DedupQuestions -->|Yes| AddGaps[Add to gaps queue]\n    DedupQuestions -->|No| DisableReflect[Disable reflect\u003Cbr\u002F>for next step]\n    AddGaps --> GetQuestion\n    DisableReflect --> GetQuestion\n\n    ActionCheck -->|search| SearchQuery[Execute search]\n    SearchQuery --> NewURLs{New URLs\u003Cbr\u002F>found?}\n    NewURLs -->|Yes| StoreURLs[Store URLs for\u003Cbr\u002F>future visits]\n    NewURLs -->|No| DisableSearch[Disable search\u003Cbr\u002F>for next step]\n    StoreURLs --> GetQuestion\n    DisableSearch --> GetQuestion\n\n    ActionCheck -->|visit| VisitURLs[Visit URLs]\n    VisitURLs --> NewContent{New content\u003Cbr\u002F>found?}\n    NewContent -->|Yes| StoreContent[Store content as\u003Cbr\u002F>knowledge]\n    NewContent -->|No| DisableVisit[Disable visit\u003Cbr\u002F>for next step]\n    StoreContent --> GetQuestion\n    DisableVisit --> GetQuestion\n\n    BeastMode --> FinalAnswer[Generate final answer] --> End\n```\n","DeepResearch 是一个用于深度查询和网页阅读以找到答案的工具，直到找到答案或超出预设的令牌预算。其核心功能包括迭代式的搜索、阅读和推理过程，旨在通过不断探索来精准定位问题的答案。项目采用 TypeScript 编写，并利用 Gemini 或 OpenAI 等语言模型进行推理，结合 Jina Reader 进行网页搜索与内容提取。适合需要对特定问题进行深入研究并期望获得准确、简洁答案的场景使用，如学术研究、技术调查等。",2,"2026-06-11 03:46:16","high_star"]