Back to use cases

    Use case / SOCIAL DATA / Python 3 (optional; the main path is a saved prompt with no code) / Published

    Find Content Ideas from Questions People Already Ask

    Turn questions people ask about a niche into a short list of post ideas, each with a source link, using Desearch searches of Reddit, Hacker News and X.

    Card for Find Content Ideas from Questions People Already Ask

    Made by Desearch (desearch.ai).

    This content ideas finder is for marketers and founders who want post ideas from questions people already ask. Paste one saved prompt into Claude or Cursor with the Desearch MCP server connected, and you get up to 10 questions, a post idea for each and a source link. A small Python script prints the same kind of table.

    The problem

    A content plan often starts from a blank page. Searching Reddit, Hacker News and X by hand means opening a lot of threads and trying to remember which questions came up. What helps is one table: the question, a post idea, a format and the link, so anyone can check the source before writing.

    What the app does

    • Takes a niche in plain words, such as "starting a newsletter".
    • Searches Reddit with the Desearch ai-search tool for "questions beginners ask about" that niche.
    • Runs the same search on Hacker News, unless you pass --no-hackernews.
    • Searches public X posts with the x-search tool (20 posts by default).
    • Pulls question sentences that mention the niche, keeps one per thread or post, and suggests a format: carousel for lists and tips, short video for how-tos, thread for the rest.
    • Prints a table of up to 10 questions with a post idea, the format, the source link and the date when one is shown.

    How it works

    1. Connect once. Add the hosted Desearch MCP server (https://mcp.desearch.ai/mcp) to Claude or Cursor, with your Desearch API key in the Authorization header.
    2. Search. The saved prompt calls ai-search with Reddit, then Hacker News for a tech niche, then x-search with count 20.
    3. Plan. Your assistant lists up to 10 questions from those results only, with a post idea, a hook, a format and the source link. It does not name individual posters.

    The code

    No code is needed for the saved prompt. For people who want a script, these are the search arguments from content_ideas.py (lines 45 to 56). The script reads the API key from a key file (~/.desearch-api-key, or --key-file PATH) and prints only the last 4 characters of its sha256 fingerprint.

    PYTHON
    def build_ai_args(niche, source):
        """ai-search arguments for one source (reddit or hackernews). No domain filters."""
        if source not in ("reddit", "hackernews"):
            raise ValueError("source must be reddit or hackernews")
        return {"prompt": f"questions beginners ask about {clean_niche(niche)}",
                "tools": [source], "result_type": "LINKS_WITH_FINAL_SUMMARY"}
    
    
    def build_x_args(niche, count=20):
        """x-search arguments. OR terms stay inside parentheses."""
        q = f'({clean_niche(niche)}) ("how do i" OR "how do you" OR "any tips") lang:en -is:retweet'
        return {"query": q, "count": max(1, min(int(count), 100))}

    The MCP call, from the same file (lines 222 to 236):

    PYTHON
    async def call_tools(calls, key):
        """Run [(tool, args), ...] in one MCP session; return parsed results."""
        from mcp import ClientSession
        from mcp.client.streamable_http import streamable_http_client
        from mcp.shared._httpx_utils import create_mcp_http_client
    
        out = []
        async with create_mcp_http_client(headers={"Authorization": key}) as hc, \
                streamable_http_client(MCP_URL, http_client=hc) as streams:
            async with ClientSession(streams[0], streams[1]) as s:
                await s.initialize()
                for tool, args in calls:
                    res = await s.call_tool(tool, args, read_timeout_seconds=180)
                    out.append(parse_content([c.model_dump() for c in res.content]))
        return out

    The folder has saved-prompt.md (the no-code version), content_ideas.py, README.md, sample_output.md, sample_plan.md and offline tests in tests/.

    View the code

    Endpoints

    • MCP tool ai-search (tools: reddit, hackernews)
    • MCP tool x-search

    Example output

    Saved sample from a run on 2026-10-17 for the niche "starting a newsletter". This page shows that stored request and response. It does not run a live demo.

    Sample request

    build_ai_args() and build_x_args() send these arguments. The script runs the Reddit search, the Hacker News search, then the X search.

    JSON
    {
      "prompt": "questions beginners ask about starting a newsletter",
      "tools": ["reddit"],
      "result_type": "LINKS_WITH_FINAL_SUMMARY"
    }
    JSON
    {
      "prompt": "questions beginners ask about starting a newsletter",
      "tools": ["hackernews"],
      "result_type": "LINKS_WITH_FINAL_SUMMARY"
    }
    JSON
    {
      "query": "(starting a newsletter) (\"how do i\" OR \"how do you\" OR \"any tips\") lang:en -is:retweet",
      "count": 20
    }

    Sample response

    The script printed this, from sample_output.md:

    Niche: starting a newsletter
    Read 40 threads and posts Desearch returned; found 10 questions.

    The saved prompt, tested 2026-10-17 09:26 Asia/Tbilisi, returned 10 Reddit threads, 10 Hacker News threads and 20 X posts. The first three rows of the script table:

    #Question people askedPost ideaFormatSourceDate
    1How to start a newsletter?Answer it: "How to start a newsletter", with your own exampleshort videohttps://www.reddit.com/r/selfpublish/comments/188ttau/how_to_start_a_newsletter/not shown
    2What's the best place to start a newsletter?Answer it: "What's the best place to start a newsletter", with your own examplecarouselhttps://news.ycombinator.com/item?id=37464463not shown
    3Thinking of starting a newsletter?Answer it: "Thinking of starting a newsletter", with your own examplethreadhttps://x.com/i/status/18400139680199725482024-09-28

    The sample ends with this line:

    ai-search cost: $0.0080

    Reddit and Hacker News results come without dates, and X results mix newer and older posts. Check the date column, or open the link, before you build a post on a question.

    Run it yourself

    No code: connect the Desearch MCP server in Claude or Cursor, paste saved-prompt.md, and replace the niche.

    Script:

    BASH
    git clone https://github.com/Desearch-ai/desearch-py-examples && cd desearch-py-examples/content-ideas-finder-mcp
    pip install -r requirements.txt
    printf '%s' 'YOUR_KEY' > ~/.desearch-api-key && chmod 600 ~/.desearch-api-key   # key from console.desearch.ai
    python content_ideas.py "starting a newsletter"

    Useful flags: --no-hackernews (non-tech niches), --no-x, --count (X posts to read, default 20), --limit (questions to keep, default 10), --raw (save the responses), --from-raw (rebuild the table from a saved file, with no API calls).

    What it costs

    Each ai-search call cost $0.004 on 2026-10-17. The sample prints ai-search cost: $0.0080 for its two ai-search calls. See pricing.

    Ideas to extend it

    • Run the same niche once a month and compare the questions.
    • Skip Hacker News for a non-tech niche with --no-hackernews.
    • Use the saved prompt when you want hooks written from the threads, and the script when you want the table from the same searches.

    Use with AI agents

    Point an MCP client at the hosted Desearch server. Replace the placeholder with a key from the console. Do not commit the key.

    JSON
    {
      "mcpServers": {
        "desearch": {
          "url": "https://mcp.desearch.ai/mcp",
          "headers": {
            "Authorization": "Bearer <DESEARCH_API_KEY>"
          }
        }
      }
    }

    Prompt you can paste for this example:

    Use the Desearch ai-search tool with tools set to reddit and result_type LINKS_WITH_FINAL_SUMMARY for questions beginners ask about the niche I name. If the niche is about tech, software, startups or online business, run the same search with tools set to hackernews. Then use x-search with count 20 and the query (<niche>) (\"how do i\" OR \"how do you\" OR \"any tips\") lang:en -is:retweet. From those results only, list up to 10 questions with a post idea, a one-line hook, a format (thread, carousel or short video), the source link and the date if one is shown. Say plainly if fewer than 10 real questions came back. Do not invent questions, sources or links. Do not name individual posters.

    Build your own example.

    Give your agents access to web and social search. Get an API key to start building, or talk to us about your integration.

    Read docs