← All posts

Deep Research API: What It Is and How to Build One

Quick answer: A deep research API turns a question into a report. Instead of one search and one answer, it plans sub-questions, runs many searches, reads full pages across many sources, and synthesizes a cited answer. It is the difference between a lookup and an investigation. You can buy a hosted research agent or build your own on top of a search-and-fetch API, and which you choose comes down to how much control and transparency you need.

Everyone has done the naive version: one search, top result, paraphrase, done. It works until the question is actually hard. A deep research API is what you use when a single search does not cut it and you need something closer to what a diligent human analyst would produce.

What a Deep Research API Actually Does

The single-search flow is one hop. A deep research flow is a loop with four distinct jobs:

  1. Plan. Break the question into sub-questions. "Is vendor X a good fit for us" becomes pricing, security posture, integration surface, and reputation.
  2. Search broadly. Run searches for each sub-question, often several angles per question, to gather candidate sources.
  3. Read many sources. Pull the full content of the promising results, not just snippets, so the model reasons over real text instead of headlines.
  4. Synthesize with citations. Combine what it read into a coherent answer, resolve contradictions between sources, and attach citations so the reader can verify.

The output is not a link list. It is a structured, sourced answer that reflects reading across the web. That is the whole point of the pattern.

How It Differs From a Single Search Call

Aspect Single search call Deep research
Input One query One question, decomposed
Searches run One Many, across sub-questions
Sources read Top result or a snippet Many full pages
Reasoning None or shallow Cross-source synthesis
Output Links or a short answer Cited report
Latency Sub-second Seconds to minutes
Cost Low Higher (more calls)

The tradeoff is honest: deep research costs more time and more calls. You use it when the answer quality justifies that, not for a quick fact lookup where a single search is the right tool.

What to Look For (Build or Buy)

Whether you buy a hosted research agent or build your own, judge it on the same criteria:

  • Full-content retrieval. The quality ceiling is set by whether the agent reads real page content or just snippets. Snippet-only research is shallow research.
  • Source transparency. You should be able to see which sources fed the answer. Citations are not decoration, they are how you trust the output.
  • Breadth control. Can you tune how many sources it reads and how deep it goes? Different questions warrant different depth.
  • Freshness. It must hit the live web, not a stale index.
  • Portability. If retrieval is welded to one model vendor, you are locked in. Prefer a retrieval layer you can point at any model.

Build vs Buy

Buy a hosted research agent when you want an answer with minimal engineering and you are comfortable with the vendor's choices about depth, sources, and format. It is the fastest path to a working feature.

Build your own when you need control: your own source filtering, your own synthesis prompt, your own output schema, your own cost ceiling, and the ability to inspect every step. Building is more work, but the deep research pattern is not complicated to assemble once you have a good search-and-fetch API underneath it. If you want a full walkthrough, how to build a deep research agent goes step by step.

The good news is that "build" is mostly plumbing on top of two primitives: search that returns full content, and fetch that cleans any URL.

A Code Sketch With link.sc

Here is the skeleton of a build-your-own research loop. The retrieval uses link.sc: search finds the candidate sources for each sub-question, and fetch pulls each one as clean markdown, so the model reasons over full pages rather than snippets.

import requests

HEADERS = {"x-api-key": "lsc_...", "Content-Type": "application/json"}

def search(query):
    r = requests.post(
        "https://api.link.sc/v1/search",
        headers=HEADERS,
        json={"q": query, "engine": "google"},
    )
    return r.json()["serpData"]["results"]

def fetch(url):
    r = requests.post(
        "https://api.link.sc/v1/fetch",
        headers=HEADERS,
        json={"url": url, "format": "markdown"},
    )
    return r.json()["content"]

def deep_research(question):
    # 1. Plan: ask your LLM to break the question into sub-questions
    sub_questions = plan_with_llm(question)

    # 2. Search broadly and 3. read full content
    sources = []
    for sq in sub_questions:
        for result in search(sq)[:5]:  # keep the top few per sub-question
            sources.append({
                "url": result["targetUrl"],
                "content": fetch(result["targetUrl"]),  # full page, not a snippet
            })

    # 4. Synthesize with citations
    return synthesize_with_llm(question, sources)

Two things make this work. First, search gives you ranked candidate URLs for each sub-question, and slicing the list client-side keeps breadth (and cost) under your control. Second, fetch turns any URL into clean markdown, whether it came from a search result or is a URL you already know (a PDF, a doc, a page a source cited). See the docs for the full API.

If you would rather not assemble the loop yourself, link.sc also offers a research agent that runs the plan-search-read-synthesize cycle in one call, so you can start with buy and move to build later without changing vendors.

A Note on the Synthesis Step

The retrieval half is the part people underestimate, so I will say it plainly: a research agent that reads snippets writes snippet-quality reports. The synthesis prompt matters, but it cannot invent depth that the retrieval never gathered. Feed the model full page content from many sources, ask it to cite, and instruct it to flag disagreements between sources rather than smoothing them over. Grounded, cited, honest about conflicts: that is what separates a real research answer from a confident guess.

The Bottom Line

A deep research API is a single search call grown up: it plans, searches widely, reads full pages, and writes a cited answer. Buy a hosted agent for speed, build your own for control, and in either case insist on full-content retrieval and visible sources. The pattern is not hard to build when you have search that returns real content and fetch that cleans any URL, which is exactly the toolkit a good web-data API gives you.


Building an AI research assistant? link.sc gives you web search, URL-to-markdown fetch, and a research agent in one API. Start free.