# Research POST https://api.you.com/v1/research Content-Type: application/json Research goes beyond a single web search. In response to your question, it runs multiple searches, reads through the sources, and synthesizes everything into a thorough, well-cited answer. Use it when a question is too complex for a simple lookup, and when you need a response you can actually trust and verify. Reference: https://docs.you.com/api-reference/research/v1-research ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Returns comprehensive research-grade answers with multi-step reasoning version: endpoint_.research paths: /v1/research: post: operationId: research summary: Returns comprehensive research-grade answers with multi-step reasoning description: >- Research goes beyond a single web search. In response to your question, it runs multiple searches, reads through the sources, and synthesizes everything into a thorough, well-cited answer. Use it when a question is too complex for a simple lookup, and when you need a response you can actually trust and verify. tags: - [] parameters: - name: X-API-Key in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: >- A JSON object containing a comprehensive answer with citations and supporting search results content: application/json: schema: $ref: '#/components/schemas/research_Response_200' '401': description: Unauthorized. Problems with API key. content: {} '403': description: Forbidden. API key lacks scope for this path. content: {} '422': description: Unprocessable Entity. Request validation failed. content: {} '500': description: >- Internal Server Error during authentication/authorization middleware. content: {} requestBody: content: application/json: schema: type: object properties: input: type: string description: >- The research question or complex query requiring in-depth investigation and multi-step reasoning. Note: The maximum length of the input is 40,000 characters. research_effort: $ref: >- #/components/schemas/V1ResearchPostRequestBodyContentApplicationJsonSchemaResearchEffort description: >- Controls how much time and effort the Research API spends on your question. Higher effort levels run more searches and dig deeper into sources, at the cost of a longer response time. Available levels: - `lite`: Returns answers quickly. Good for straightforward questions that just need a fast, reliable answer. - `standard`: The default. Balances speed and depth, a good fit for most questions. - `deep`: Spends more time researching and cross-referencing sources. Use this when accuracy and thoroughness matter more than speed. - `exhaustive`: The most thorough option. Explores the topic as fully as possible, best suited for complex research tasks where you want the highest quality result. required: - input components: schemas: V1ResearchPostRequestBodyContentApplicationJsonSchemaResearchEffort: type: string enum: - value: lite - value: standard - value: deep - value: exhaustive default: standard V1ResearchPostResponsesContentApplicationJsonSchemaOutputContentType: type: string enum: - value: text V1ResearchPostResponsesContentApplicationJsonSchemaOutputSourcesItems: type: object properties: url: type: string description: The URL of the source webpage. title: type: string description: The title of the source webpage. snippets: type: array items: type: string description: >- Relevant excerpts from the source page that were used in generating the answer. required: - url V1ResearchPostResponsesContentApplicationJsonSchemaOutput: type: object properties: content: type: string description: >- The comprehensive response with inline citations. The content is formatted in Markdown and includes numbered citations that reference the items in the sources array. content_type: $ref: >- #/components/schemas/V1ResearchPostResponsesContentApplicationJsonSchemaOutputContentType description: The format of the content field. sources: type: array items: $ref: >- #/components/schemas/V1ResearchPostResponsesContentApplicationJsonSchemaOutputSourcesItems description: A list of web sources used to generate the answer. required: - content - content_type - sources research_Response_200: type: object properties: output: $ref: >- #/components/schemas/V1ResearchPostResponsesContentApplicationJsonSchemaOutput description: The research output containing the answer and sources. required: - output ``` ## SDK Code Examples ```python research_example import requests url = "https://api.you.com/v1/research" payload = { "input": "Which global cities improved air quality the most over the past 10 years, and what measurable actions contributed?", "research_effort": "lite" } headers = { "X-API-Key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript research_example const url = 'https://api.you.com/v1/research'; const options = { method: 'POST', headers: {'X-API-Key': '', 'Content-Type': 'application/json'}, body: '{"input":"Which global cities improved air quality the most over the past 10 years, and what measurable actions contributed?","research_effort":"lite"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go research_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.you.com/v1/research" payload := strings.NewReader("{\n \"input\": \"Which global cities improved air quality the most over the past 10 years, and what measurable actions contributed?\",\n \"research_effort\": \"lite\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("X-API-Key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```java research_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.you.com/v1/research") .header("X-API-Key", "") .header("Content-Type", "application/json") .body("{\n \"input\": \"Which global cities improved air quality the most over the past 10 years, and what measurable actions contributed?\",\n \"research_effort\": \"lite\"\n}") .asString(); ``` ```csharp research_example using RestSharp; var client = new RestClient("https://api.you.com/v1/research"); var request = new RestRequest(Method.POST); request.AddHeader("X-API-Key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"input\": \"Which global cities improved air quality the most over the past 10 years, and what measurable actions contributed?\",\n \"research_effort\": \"lite\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift research_example import Foundation let headers = [ "X-API-Key": "", "Content-Type": "application/json" ] let parameters = [ "input": "Which global cities improved air quality the most over the past 10 years, and what measurable actions contributed?", "research_effort": "lite" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.you.com/v1/research")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```