---
source_url: "https://developer.alpha-sense.com/agent-api/gensearch"
title: "Modes and Inputs | AlphaSense Documentation"
mirrored_at: 2026-08-28T01:31:40.303Z
host: developer.alpha-sense.com
cited_in_42a: true
mirror_canonical: "https://index.42a.ai/developer.alpha-sense.com/agent-api/gensearch"
---

> **Original source:** https://developer.alpha-sense.com/agent-api/gensearch

GenSearch is AlphaSense's AI-powered research tool that lets you ask natural language questions and receive comprehensive, source-backed answers drawn from AlphaSense's extensive content library. GenSearch operates through a GraphQL API and offers four distinct modes, each designed for a different depth of analysis and response time. You initiate a query with a mutation, then poll for results until the response is complete.

## Mode Comparison[​](#mode-comparison "Direct link to Mode Comparison")

Mode

Credits

Response Time

Best For

`fast`

10 credits

~30s

Quick answers, real-time queries, simple lookups

`auto`

10 credits

~30-90s

**Recommended default** — automatically balances speed and depth

`thinkLonger`

25 credits

~60-90s

Deeper analysis, nuanced questions, multi-factor comparisons

`deepResearch`

100 credits

~12-15min

Comprehensive research reports, detailed competitive analysis, investment memos

## Authentication[​](#authentication "Direct link to Authentication")

All GenSearch requests require a Bearer access token plus your API key and client ID on every call.

Which flow should I use?

-   **Username and password** — [Authentication (Username & Password)](https://developer.alpha-sense.com/agent-api/authentication) or the [Quick Start](https://developer.alpha-sense.com/agent-api/quickstart) walkthrough.
-   **SSO (no AlphaSense password)** — [SSO Authentication](https://developer.alpha-sense.com/agent-api/sso-authentication) (beta; enabled by your account team). Exchange a refresh token from the **API Keys** page for access tokens.

Use these headers on every GenSearch request after you have a token:

```
headers = {    "x-api-key": os.environ["ALPHASENSE_API_KEY"],    "clientid": os.environ["ALPHASENSE_CLIENT_ID"],    "Authorization": f"Bearer {access_token}",    "Content-Type": "application/json",}
```

* * *

## GenSearchInput Schema[​](#gensearchinput-schema "Direct link to GenSearchInput Schema")

Before building a request, here is the full shape of the `input` object accepted by every GenSearch mode. Only `prompt` is required — everything else is optional.

```
variables = {    "input": {        # Optional: continue an existing conversation (follow-up question)        # Omit or set to None for a new conversation        "conversationId": None,        # Required: your search query        "prompt": "Your search question here",        # Optional: focus on specific documents (AskInDoc)        # Cannot be combined with "filters" — use one or the other        "documents": [            {"id": "document-id-here"}        ],        # Optional: narrow your search results        "filters": {            "sources": {"ids": ["source-id"]},            "industries": ["401020"],            "expertInsightsFilters": {                "analystPerspectives": ["Investor-Led (Sell-Side)"],                "expertPerspectives": ["Medical Professional"],                "expertTranscriptType": ["Company Deep-Dive"]            },            "documentAuthors": ["Author Name"],            "date": {                "customRange": {"from": "2025-01-01", "to": "2025-06-30"},                # OR use a preset instead:                # "preset": "LAST_90_DAYS"            },            "countries": ["US", "CA"],            "companies": {                "include": ["AAPL", "MSFT"],                # OR use a watchlist instead:                # "watchlists": ["watchlist-id"]            }        },        # Optional: include web search results        "useWebSearch": True    }}
```

documents and filters are mutually exclusive

You can use `documents` (AskInDoc) **or** `filters`, but not both in the same request.

**Key rules:**

-   `conversationId` is optional — omit it or pass `None` for a new conversation; pass the `id` returned by a previous GenSearch mutation to ask a follow-up question in the same thread
-   `prompt` is the only required field
-   Within `filters`, combine as many fields as you want — they use **AND** logic (every filter narrows the results further)
-   For `date`, use either `customRange` or `preset`, not both
-   `companies.include` and `companies.watchlists` cannot be combined — use one or the other
-   `useWebSearch` lives at the `input` level, not inside `filters`

* * *

## Search Filters[​](#search-filters "Direct link to Search Filters")

Each filter can be used on its own or combined with others. For GraphQL lookups, enums, and external references for the IDs and codes used below, see [Utility APIs](https://developer.alpha-sense.com/agent-api/utility-apis).

### Source Filters[​](#source-filters "Direct link to Source Filters")

Filter results by document source type — broker research, SEC filings, earnings transcripts, news, and more.

```
"filters": {    "sources": {"ids": ["31019"]}  # Broker Research}
```

Look up source IDs with the `filingTypesV3` query. See [Utility APIs — Source Types](https://developer.alpha-sense.com/agent-api/utility-apis#source-types).

### Industry Filters (GICS)[​](#industry-filters-gics "Direct link to Industry Filters (GICS)")

Narrow results to specific industries using GICS codes.

```
"filters": {    "industries": ["401020"]  # Insurance}
```

GICS codes follow the Global Industry Classification Standard. See MSCI’s overview for structure and definitions: [The Global Industry Classification Standard (GICS)](https://www.msci.com/indexes/index-resources/gics). For how these map to GenSearch, see [Utility APIs — Industry Codes](https://developer.alpha-sense.com/agent-api/utility-apis#industry-codes-gics).

### Expert Insights Filters[​](#expert-insights-filters "Direct link to Expert Insights Filters")

Filter within AlphaSense Expert Insights content using three sub-fields:

-   **`analystPerspectives`** — type of analyst viewpoint (e.g., `"Investor-Led (Sell-Side)"`)
-   **`expertPerspectives`** — type of expert (e.g., `"Medical Professional"`)
-   **`expertTranscriptType`** — transcript format (e.g., `"Company Deep-Dive"`)

```
"filters": {    "expertInsightsFilters": {        "expertPerspectives": ["Medical Professional"],        "expertTranscriptType": ["Company Deep-Dive"]    }}
```

See [Utility APIs — Expert Insights Filters](https://developer.alpha-sense.com/agent-api/utility-apis#expert-insights-filters) for available values.

Filter by the author of documents uploaded to the AlphaSense platform. This applies to user-uploaded content (internal research, reports your team has added, etc.).

```
"filters": {    "documentAuthors": ["Jane Smith"]}
```

### Date Filters[​](#date-filters "Direct link to Date Filters")

Restrict results to a time window. Use either a **preset** or a **custom range**, not both.

**Presets:**

Preset Value

Range

`LAST_24_HOURS`

Past 24 hours

`LAST_7_DAYS`

Past 7 days

`LAST_30_DAYS`

Past 30 days

`LAST_90_DAYS`

Past 90 days

`LAST_6_MONTHS`

Past 6 months

`LAST_12_MONTHS`

Past 12 months

`LAST_18_MONTHS`

Past 18 months

`LAST_2_YEARS`

Past 2 years

```
# Preset"filters": {    "date": {"preset": "LAST_90_DAYS"}}# Custom range (YYYY-MM-DD)"filters": {    "date": {"customRange": {"from": "2025-01-01", "to": "2025-03-31"}}}
```

See [Utility APIs — Date Presets](https://developer.alpha-sense.com/agent-api/utility-apis#date-presets) for the full enum reference.

### Country Filters[​](#country-filters "Direct link to Country Filters")

Filter by country using uppercase 2-letter ISO country codes. Use `"US*"` for US non-domicile entities.

```
"filters": {    "countries": ["US", "GB", "CA"]}
```

Country codes are ISO 3166-1 alpha-2 values. See [Wikipedia — ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) for the code list, and [Utility APIs — Country Codes](https://developer.alpha-sense.com/agent-api/utility-apis#country-codes) for GenSearch usage notes.

### Company Filters[​](#company-filters "Direct link to Company Filters")

Focus results on specific companies by ticker/identifier, or by a saved watchlist.

```
# By ticker or identifier"filters": {    "companies": {"include": ["AAPL", "MSFT", "GOOGL"]}}# By watchlist"filters": {    "companies": {"watchlists": ["your-watchlist-id"]}}
```

warning

You cannot combine `include` and `watchlists` in the same request — use one or the other.

Look up company identifiers with the `companies` query and watchlist IDs with the `user` query. See [Utility APIs — Company Lookup](https://developer.alpha-sense.com/agent-api/utility-apis#company-lookup) and [Utility APIs — User Watchlists](https://developer.alpha-sense.com/agent-api/utility-apis#user-watchlists).

* * *

## AskInDoc[​](#askindoc "Direct link to AskInDoc")

Point GenSearch at one or more specific documents so the response is grounded entirely in those docs. This is useful when you have already found a document (such as a 10-K, earnings transcript, or research report) and want to ask targeted questions about it.

warning

When using `documents`, do **not** include the `filters` object. They cannot be combined in the same request.

**Single document:**

```
variables = {    "input": {        "prompt": "What are the key risk factors mentioned in this filing?",        "documents": [            {"id": "abc123-document-id"}        ]    }}
```

**Multiple documents:**

```
variables = {    "input": {        "prompt": "Compare the revenue guidance across these earnings calls.",        "documents": [            {"id": "earnings-call-q1-id"},            {"id": "earnings-call-q2-id"},            {"id": "earnings-call-q3-id"}        ]    }}
```

Document IDs can be found using the Document Search API. See [Utility APIs — Document Search](https://developer.alpha-sense.com/agent-api/utility-apis#document-search-askindoc) for a lookup example.

* * *

## Web Search[​](#web-search "Direct link to Web Search")

Set `useWebSearch` to `true` to include public web results alongside AlphaSense content. This field lives at the `input` level, not inside `filters`.

```
variables = {    "input": {        "prompt": "What are the latest developments in quantum computing?",        "useWebSearch": True    }}
```

You can combine web search with filters:

```
variables = {    "input": {        "prompt": "Recent moves by TSMC in Arizona",        "filters": {            "companies": {"include": ["TSM"]},            "date": {"preset": "LAST_30_DAYS"}        },        "useWebSearch": True    }}
```

* * *

## Combining Multiple Filters[​](#combining-multiple-filters "Direct link to Combining Multiple Filters")

Filters use **AND** logic — every filter you add narrows the results further. Combine as many as you need in a single request.

-   Python
-   JavaScript

```
# Example: sell-side analyst coverage of Apple's AI strategy in the last 6 monthsvariables = {    "input": {        "prompt": "What is Apple's AI and machine learning strategy?",        "filters": {            "companies": {"include": ["AAPL"]},            "sources": {"ids": ["31019"]},            "date": {"preset": "LAST_6_MONTHS"},            "expertInsightsFilters": {                "analystPerspectives": ["Investor-Led (Sell-Side)"]            }        }    }}
```

-   Python
-   JavaScript

```
# Example: supply chain analysis for semiconductors in US, China, and Taiwanvariables = {    "input": {        "prompt": "Supply chain disruptions and their impact on margins",        "filters": {            "industries": ["45301020"],            "date": {                "customRange": {                    "from": "2025-06-01",                    "to": "2025-12-31"                }            },            "countries": ["US", "CN", "TW"]        }    }}
```

* * *

## Fast Mode[​](#fast-mode "Direct link to Fast Mode")

Fast mode is optimized for speed. Use it when you need a quick, concise answer and latency matters more than exhaustive depth. At 10 credits per query and approximately 30 seconds of response time, it is ideal for real-time lookups, simple factual questions, and lightweight integrations.

### Mutation[​](#mutation "Direct link to Mutation")

-   Python
-   JavaScript
-   cURL

```
import osimport requestsurl = "https://api.alpha-sense.com/gql" headers = { "x-api-key": os.environ["ALPHASENSE_API_KEY"],"clientid": os.environ["ALPHASENSE_CLIENT_ID"], "Authorization": f"Bearer {token}", "Content-Type":"application/json", }mutation = """ mutation GenSearchFast($input: GenSearchInput!) { genSearch { fast(input: $input) {id } } } """variables = { "input": { "prompt": "What was Apple's revenue in Q4 2025?" } }response = requests.post( url, headers=headers, json={"query": mutation, "variables": variables}, )conversation_id = response.json()["data"]["genSearch"]["fast"]["id"] print(f"Conversation ID:{conversation_id}")
```

tip

You can add `filters`, `documents`, or `useWebSearch` to the `input` alongside `prompt`. See [Search Filters](#search-filters).

* * *

## Auto Mode[​](#auto-mode "Direct link to Auto Mode")

Auto mode is the **recommended default** for most use cases. It automatically selects the optimal depth of analysis based on your query, balancing speed and thoroughness. At 10 credits per query and approximately 30-90 seconds of response time, it is ideal when you want high-quality results without having to choose between `fast` and `thinkLonger` manually.

### Mutation[​](#mutation-1 "Direct link to Mutation")

-   Python
-   JavaScript
-   cURL

```
import osimport requestsurl = "https://api.alpha-sense.com/gql" headers = { "x-api-key": os.environ["ALPHASENSE_API_KEY"],"clientid": os.environ["ALPHASENSE_CLIENT_ID"], "Authorization": f"Bearer {token}", "Content-Type":"application/json", }mutation = """ mutation GenSearchAuto($input: GenSearchInput!) { genSearch { auto(input: $input) {id } } } """variables = { "input": { "prompt": "What are the key trends driving semiconductor demand in 2025?" }}response = requests.post( url, headers=headers, json={"query": mutation, "variables": variables}, )conversation_id = response.json()["data"]["genSearch"]["auto"]["id"] print(f"Conversation ID:{conversation_id}")
```

tip

You can add `filters`, `documents`, or `useWebSearch` to the `input` alongside `prompt`. See [Search Filters](#search-filters).

* * *

## Think Longer Mode[​](#think-longer-mode "Direct link to Think Longer Mode")

Think Longer mode provides a deeper level of analysis. It spends more time reasoning through the question, cross-referencing multiple sources, and producing a more nuanced response. At 25 credits per query and approximately 60-90 seconds of response time, it is well-suited for multi-factor comparisons, strategic questions, and situations where accuracy and completeness outweigh speed.

### Mutation[​](#mutation-2 "Direct link to Mutation")

-   Python
-   JavaScript
-   cURL

```
import osimport requestsurl = "https://api.alpha-sense.com/gql" headers = { "x-api-key": os.environ["ALPHASENSE_API_KEY"],"clientid": os.environ["ALPHASENSE_CLIENT_ID"], "Authorization": f"Bearer {token}", "Content-Type":"application/json", }mutation = """ mutation GenSearchThinkLonger($input: GenSearchInput!) { genSearch {thinkLonger(input: $input) { id } } } """variables = { "input": { "prompt": "Compare the competitive positioning of NVIDIA and AMD in thedata center GPU market over the past two quarters." } }response = requests.post( url, headers=headers, json={"query": mutation, "variables": variables}, )conversation_id = response.json()["data"]["genSearch"]["thinkLonger"]["id"] print(f"Conversation ID:{conversation_id}")
```

tip

You can add `filters`, `documents`, or `useWebSearch` to the `input` alongside `prompt`. See [Search Filters](#search-filters).

* * *

## Deep Research Mode[​](#deep-research-mode "Direct link to Deep Research Mode")

Deep Research mode produces comprehensive, report-grade output. It performs extensive source gathering, synthesizes information across many documents, and returns a structured, detailed research report. At 100 credits per query and approximately 12-15 minutes of response time, it is designed for investment memos, thorough competitive analyses, and any scenario where you need the most complete answer possible.

### Mutation[​](#mutation-3 "Direct link to Mutation")

-   Python
-   JavaScript
-   cURL

```
import osimport requestsurl = "https://api.alpha-sense.com/gql" headers = { "x-api-key": os.environ["ALPHASENSE_API_KEY"],"clientid": os.environ["ALPHASENSE_CLIENT_ID"], "Authorization": f"Bearer {token}", "Content-Type":"application/json", }mutation = """ mutation GenSearchDeepResearch($input: GenSearchInput!) { genSearch {deepResearch(input: $input) { id } } } """variables = { "input": { "prompt": "Provide a comprehensive analysis of the electric vehicle market:key players, supply chain risks, regulatory tailwinds, and projected growth through 2027." } }response = requests.post( url, headers=headers, json={"query": mutation, "variables": variables}, )conversation_id = response.json()["data"]["genSearch"]["deepResearch"]["id"] print(f"ConversationID: {conversation_id}")
```

tip

You can add `filters`, `documents`, or `useWebSearch` to the `input` alongside `prompt`. See [Search Filters](#search-filters).

* * *

## Follow-Up Questions[​](#follow-up-questions "Direct link to Follow-Up Questions")

Every GenSearch mutation returns a conversation `id`. To ask a follow-up question within the same conversation, pass that `id` as `conversationId` in your next mutation. The conversation ID also serves as the thread ID for retrieving the full message history.

### Follow-Up Mutation[​](#follow-up-mutation "Direct link to Follow-Up Mutation")

-   Python
-   JavaScript
-   cURL

```
# Use the conversation_id from a previous GenSearch mutation responsefollow_up_mutation = """mutation GenSearchAuto($input: GenSearchInput!) {    genSearch {        auto(input: $input) {            id        }    }}"""variables = {    "input": {        "conversationId": conversation_id,  # ID from the previous mutation        "prompt": "How does that compare to the previous quarter?"    }}response = requests.post(    url,    headers=headers,    json={"query": follow_up_mutation, "variables": variables},)follow_up_id = response.json()["data"]["genSearch"]["auto"]["id"]print(f"Follow-up conversation ID: {follow_up_id}")
```

### Polling a Follow-Up Response[​](#polling-a-follow-up-response "Direct link to Polling a Follow-Up Response")

The follow-up mutation returns a new conversation `id`. Poll it with the `conversation` query — the same approach used for any GenSearch response.

```
query genSearch($conversationId: String!) {  genSearch {    conversation(id: $conversationId) {      error {        code      }      id      markdown      progress    }  }}
```

-   Python
-   JavaScript
-   cURL

```
poll_query = """query genSearch($conversationId: String!) {    genSearch {        conversation(id: $conversationId) {            error { code }            id            markdown            progress        }    }}"""variables = {    "conversationId": follow_up_id,}# Poll until progress reaches 1.0while True:    response = requests.post(        url,        headers=headers,        json={"query": poll_query, "variables": variables},    )    conversation = response.json()["data"]["genSearch"]["conversation"]    print(f"Progress: {conversation['progress']:.0%}")    if conversation.get("error"):        raise RuntimeError(f"GenSearch error: {conversation['error']['code']}")    if conversation["progress"] >= 1.0:        break    time.sleep(2)print(conversation["markdown"])
```

### Retrieving Thread History[​](#retrieving-thread-history "Direct link to Retrieving Thread History")

The conversation ID doubles as the thread ID. Use the `thread` query to retrieve the full message history for a conversation — ideal for chat-like UIs that display the entire exchange. Each message in the thread has its own `id` (format: `xxxxxx__xxxxxxxxxxxxx_xxxxxxxxxxxxx`) and contains the original `request.prompt` and the `response.markdown`.

```
query genSearch($threadId: String!) {  genSearch {    thread(id: $threadId) {      id      messages {        id        request {          prompt        }        response {          error {            code          }          markdown          progress        }      }    }  }}
```

-   Python
-   JavaScript
-   cURL

```
thread_query = """query genSearch($threadId: String!) {    genSearch {        thread(id: $threadId) {            id            messages {                id                request { prompt }                response {                    error { code }                    markdown                    progress                }            }        }    }}"""# The conversation ID doubles as the thread IDvariables = {    "threadId": conversation_id,}response = requests.post(    url,    headers=headers,    json={"query": thread_query, "variables": variables},)thread = response.json()["data"]["genSearch"]["thread"]print(f"Thread ID: {thread['id']}")for message in thread["messages"]:    print(f"\n--- Message {message['id']} ---")    print(f"Prompt: {message['request']['prompt']}")    print(f"Response: {message['response']['markdown'][:200]}...")
```

When to use each approach

Use the **`conversation` query** to poll a single follow-up response — same as any other GenSearch poll. Use the **`thread` query** when you need the full message history, for example in a chat-like UI that displays the entire exchange.

* * *

## Polling for Results[​](#polling-for-results "Direct link to Polling for Results")

After initiating any GenSearch mode, you receive a conversation ID. Use this ID to poll for results. The polling query is the same regardless of which mode you used. To retrieve the full message history across follow-up questions, see [Follow-Up Questions](#follow-up-questions).

### Polling Query[​](#polling-query "Direct link to Polling Query")

```
query Query($conversationId: String!) {  genSearch {    conversation(id: $conversationId) {      id      markdown      progress      error {        code      }    }  }}
```

### Full Polling Implementation[​](#full-polling-implementation "Direct link to Full Polling Implementation")

-   Python
-   JavaScript
-   cURL

```
import osimport timeimport requestsurl = "https://api.alpha-sense.com/gql" headers = { "x-api-key": os.environ["ALPHASENSE_API_KEY"],"clientid": os.environ["ALPHASENSE_CLIENT_ID"], "Authorization": f"Bearer {token}", "Content-Type":"application/json", }poll_query = """ queryQuery($conversationId: String!) { genSearch { conversation(id:$conversationId) { id markdownprogress error { code } } } } """def poll_for_results(conversation_id, interval=3, timeout=600): """Poll until the GenSearchconversation completes or times out.""" start_time = time.time()    while time.time() - start_time < timeout:        response = requests.post(            url,            headers=headers,            json={                "query": poll_query,                "variables": {"conversationId": conversation_id},            },        )        data = response.json()["data"]["genSearch"]["conversation"]        # Check for errors        if data.get("error"):            raise Exception(f"GenSearch error: {data['error']['code']}")        progress = data.get("progress", 0.0)        print(f"Progress: {progress:.0%}")        # progress reaches 1.0 when the response is complete        if progress >= 1.0:            return data["markdown"]        time.sleep(interval)    raise TimeoutError("Polling timed out waiting for GenSearch results.")# Usage: pass the conversation_id from any mode's mutation responseresult_markdown = poll_for_results(conversation_id) print(result_markdown)
```

* * *

## Progress Tracking[​](#progress-tracking "Direct link to Progress Tracking")

The `progress` field returned by the polling query is a floating-point number that ranges from `0.0` to `1.0`:

Progress Value

Meaning

`0.0`

The request has been received and queued

`0.0 < progress < 1.0`

The response is being generated; partial results may be available in `markdown`

`1.0`

The response is complete; the final result is in `markdown`

**Recommended polling intervals by mode:**

-   **fast** -- poll every 2-3 seconds (expected completion in ~30 seconds)
-   **auto** -- poll every 3-5 seconds (expected completion in ~30-90 seconds)
-   **thinkLonger** -- poll every 5 seconds (expected completion in ~60-90 seconds)
-   **deepResearch** -- poll every 10 seconds (expected completion in ~12-15 minutes)

While the response is still being generated (`progress < 1.0`), the `markdown` field may contain partial content. You can display this to the user as a progressive loading experience or wait for `progress` to reach `1.0` before rendering the full response.

* * *

## Response Format[​](#response-format "Direct link to Response Format")

All GenSearch modes return their results in the `markdown` field as standard Markdown text with inline citations. Citations follow the pattern:

```
[[N • Source Name]]
```

where `N` is a numeric reference and `•` is a bullet separator, followed by the `Source Name` that identifies the document from which the information was drawn. For example:

```
Apple reported Q4 2025 revenue of $94.9 billion, a 6% year-over-year increase[[1 • Earnings ]]. The growth was primarily driven bystrong performance in the Services segment [[2 • Broker Research]].
```

Each citation links back to a specific source document in AlphaSense's content library. For details on how to programmatically parse and render these citations, see the [Response Parsing](https://developer.alpha-sense.com/agent-api/response-parsing) guide.

* * *

## When to Use Which Mode[​](#when-to-use-which-mode "Direct link to When to Use Which Mode")

Choosing the right mode depends on the nature of your question, your latency requirements, and how many credits you want to spend.

### Use `fast` when:[​](#use-fast-when "Direct link to use-fast-when")

-   You need a quick factual answer (e.g., "What was Tesla's Q3 revenue?")
-   The query is part of a real-time user-facing interface where response time matters
-   You are performing many lookups in batch and want to conserve credits
-   The question has a straightforward, well-scoped answer

### Use `auto` when:[​](#use-auto-when "Direct link to use-auto-when")

-   You want the best balance of speed and depth without choosing a mode manually
-   You are building a general-purpose integration and want a single default mode
-   The query complexity varies and you want the system to adapt automatically
-   You want high-quality results at the same credit cost as `fast`

### Use `thinkLonger` when:[​](#use-thinklonger-when "Direct link to use-thinklonger-when")

-   The question requires comparing multiple data points or companies
-   You need a more nuanced answer that weighs different perspectives
-   Accuracy and depth are more important than sub-minute response time
-   Examples: "How do margins at Starbucks compare to Dunkin' over the last four quarters?" or "What are analysts saying about the impact of rising interest rates on REITs?"

### Use `deepResearch` when:[​](#use-deepresearch-when "Direct link to use-deepresearch-when")

-   You need a comprehensive, report-style answer covering an entire topic
-   The question spans multiple dimensions (market sizing, competitive landscape, regulatory environment, etc.)
-   You are generating content for investment memos, board presentations, or strategic planning
-   You are willing to wait several minutes and spend more credits for the most thorough response
-   Examples: "Provide a full competitive analysis of the cloud infrastructure market" or "What are the key risks and opportunities in the global semiconductor supply chain?"

### Quick Decision Guide[​](#quick-decision-guide "Direct link to Quick Decision Guide")

```
Do you need the absolute fastest response possible?  YES --> Use fast  NO  --> Do you need a comprehensive, report-grade output?            YES --> Use deepResearch            NO  --> Do you specifically need extended reasoning for a complex comparison?                      YES --> Use thinkLonger                      NO  --> Use auto (recommended default)
```

* * *

Next Steps

-   **Streaming**: For real-time progressive rendering instead of polling, see the [Streaming](https://developer.alpha-sense.com/agent-api/streaming) guide.
-   **Response Parsing**: To learn how to parse citations and structure the Markdown response for display, see the [Response Parsing](https://developer.alpha-sense.com/agent-api/response-parsing) guide.
-   **Workflow Agents**: To run pre-built AlphaSense templates or your own saved agents by `id` instead of writing free-form prompts, see [Workflow Agents](https://developer.alpha-sense.com/agent-api/workflow-agents).
-   **Utility APIs**: Look up filter values (source IDs, GICS codes, company tickers, etc.) at [Utility APIs](https://developer.alpha-sense.com/agent-api/utility-apis).