---
title: "Get Claude LLM Responses Results by id"
url: "https://docs.dataforseo.com/v3/ai_optimization/claude/llm_responses/task_get/"
date: "2026-06-06"
---

## Get Claude LLM Responses Results by id

  
Claude LLM Responses endpoint allows you to retrieve structured responses from a specific Claude model, based on the input parameters.

Tasks using the Standard method **may take up to 72 hours to complete**. If the task is not completed within this time, it is marked as failed, and the $0.01 advance is refunded. It is also important to note that if your account balance is negative, you will not receive the results even if the task is completed successfully.

 

 

 ![checked](https://docs.dataforseo.com/v3/wp-content/themes/dataforseo/assets/img/icons/checked-circle.svg) GET  https://api.dataforseo.com/v3/ai\_optimization/claude/llm\_responses/task\_get/$id     

      

Pricing

  Your account will be charged only for posting a task. You can get the results of the task within the next 30 days for free.  
The cost can be calculated on the [Pricing](https://dataforseo.com/pricing/ai-optimization/llm-responses "Pricing") page.

 

 **Description of the fields for sending a request:**

| Field name | Type | Description |
|---|---|---|
| `id` | string | *task identifier*   **unique task identifier in our system in the [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format**   you will be able to use it within **30 days** to request the results of the task at any time |



  
  
As a response of the API server, you will receive [JSON](https://en.wikipedia.org/wiki/JSON)-encoded data containing a `tasks` array with the information specific to the set tasks. **Description of the fields in the results array:**

| Field name | Type | Description |
|---|---|---|
| `version` | string | *the current version of the API* |
| `status_code` | integer | *general status code*   you can find the full list of the response codes [here](https://docs.dataforseo.com/v3/appendix/errors.md)   **Note:** we strongly recommend designing a necessary system for handling related exceptional or error conditions |
| `status_message` | string | *general informational message*   you can find the full list of general informational messages [here](https://docs.dataforseo.com/v3/appendix/errors.md) |
| `time` | string | *execution time, seconds* |
| `cost` | float | *total tasks cost, USD* |
| `tasks_count` | integer | *the number of tasks in the **`tasks`** array* |
| `tasks_error` | integer | *the number of tasks in the **`tasks`** array returned with an error* |
| **`tasks`** | array | *array of tasks* |
| `id` | string | *task identifier*   **unique task identifier in our system in the [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format** |
| `status_code` | integer | *status code of the task*   generated by DataForSEO; can be within the following range: 10000-60000   you can find the full list of the response codes [here](https://docs.dataforseo.com/v3/appendix/errors.md) |
| `status_message` | string | *informational message of the task*   you can find the full list of general informational messages [here](https://docs.dataforseo.com/v3/appendix/errors.md) |
| `time` | string | *execution time, seconds* |
| `cost` | float | *cost of the task, USD*   includes the base task price plus the `money_spent` value |
| `result_count` | integer | *number of elements in the `result` array* |
| `path` | array | *URL path* |
| `data` | object | *contains the same parameters that you specified in the POST request* |
| **`result`** | array | *array of results* |
| `model_name` | string | *name of the AI model used* |
| `input_tokens` | integer | *number of tokens in the input*   total count of tokens processed |
| `output_tokens` | integer | *number of tokens in the output*   total count of tokens generated in the AI response |
| `reasoning_tokens` | integer | *number of reasoning tokens*   total count of tokens used to generate reasoning content |
| `web_search` | boolean | *indicates if web search was used* |
| `money_spent` | float | *cost of AI tokens, USD*   the price charged by the third-party AI model provider for according to its [Pricing](https://docs.anthropic.com/en/docs/about-claude/pricing) |
| `datetime` | string | *date and time when the result was received*   in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”   example:   `2019-11-15 12:57:46 +00:00` |
| **`items`** | array | *array of response items*   contains structured AI response data |
| **`reasoning`** | object | *element in the response* |
| `type` | string | *type of the element = **'reasoning'***   **Note:** this element is supported only in reasoning models and is not guaranteed to be returned |
| **`sections`** | array | *reasoning chain sections*   array of objects containing the reasoning chain sections generated by the LLM |
| `type` | string | *type of element*=***'summary\_text'*** |
| `text` | string | *text of the reasoning chain section*   text of the reasoning chain section summarizing the model's thought process |
| **`message`** | object | *element in the response* |
| `type` | string | *type of the element = **'message'*** |
| **`sections`** | array | *array of content sections*   contains different parts of the AI response |
| `type` | string | *type of element*=***'text'*** |
| `text` | string | *AI-generated text content* |
| **`annotations`** | array | *array of references used to generate the response*   equals `null` if the `web_search` parameter is not set to `true`   **Note:** `annotations` may return empty even when `web_search` is `true`, as the AI will attempt to retrieve web information but may not find relevant results |
| `title` | string | *the domain name or title of the quoted source* |
| `url` | string | *URL of the quoted source* |
| `fan_out_queries` | array | *array of fan-out queries*   contains related search queries derived from the main query to provide a more comprehensive response |







  
 

 









> Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-access

```
# Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-access 
login="login" 
password="password" 
cred="$(printf ${login}:${password} | base64)" 
id="02031608-0696-0110-0000-a81d0414edbe" 
curl --location --request GET "https://api.dataforseo.com/v3/ai_optimization/claude/llm_responses/task_get/${id}" 
--header "Authorization: Basic ${cred}"  
--header "Content-Type: application/json" 
--data-raw ""
```





```php
<?php

/**
 * Method: GET
 * Endpoint: https://api.dataforseo.com/v3/ai_optimization/claude/llm_responses/task_get/$id
 * @see https://docs.dataforseo.com/v3/ai_optimization/claude/llm_responses/task_get
 */

require_once __DIR__ . '/../../../../../lib/RestClient.php';
$config = require __DIR__ . '/../../../../../lib/config.php';

$client = new RestClient($config['base_url'], null, $config['login'], $config['password']);

try {
    $taskId = '07211938-0696-0613-0000-674a0f948d6b';
    $result = $client->get("/v3/ai_optimization/claude/llm_responses/task_get/{$taskId}");
    print_r($result);
    // do something with get result
} catch (RestClientException $e) {
    printf(
        "HTTP code: %dnError code: %dnMessage: %snTrace: %sn",
        $e->getHttpCode(),
        $e->getCode(),
        $e->getMessage(),
        $e->getTraceAsString()
    );
}

?>
```





```js
const task_id = '02231934-2604-0066-2000-570459f04879';

const axios = require('axios');

axios({
    method: 'get',
    url: 'https://api.dataforseo.com/v3/ai_optimization/claude/llm_responses/task_get/' + task_id,
    auth: {
        username: 'login',
        password: 'password'
    },
    headers: {
        'content-type': 'application/json'
    }
}).then(function (response) {
    var result = response['data']['tasks'];
    // Result data
    console.log(result);
}).catch(function (error) {
    console.log(error);
});
```





```
"""
Method: GET
Endpoint: https://api.dataforseo.com/v3/ai_optimization/claude/llm_responses/task_get/$id
@see https://docs.dataforseo.com/v3/ai_optimization/claude/llm_responses/task_get
"""

import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../../../')))
from lib.client import RestClient
from lib.config import username, password
client = RestClient(username, password)

try:
    task_id = '07211938-0696-0613-0000-674a0f948d6b'
    response = client.get(f'/v3/ai_optimization/claude/llm_responses/task_get/{task_id}')
    print(response)
    # do something with get result
except Exception as e:
    print(f'An error occurred: {e}')
```





```csharp
using System;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace DataForSeoSdk;

public class AiOptimization
{

    private static readonly HttpClient _httpClient;
    
    static AiOptimization()
    {
        _httpClient = new HttpClient
        {
            BaseAddress = new Uri("https://api.dataforseo.com/")
        };
        _httpClient.DefaultRequestHeaders.Authorization =
            new AuthenticationHeaderValue("Basic", ApiConfig.Base64Auth);
    }
    
    /// <summary>
    /// Method: GET
    /// Endpoint: https://api.dataforseo.com/v3/ai_optimization/claude/llm_responses/task_get
    /// </summary>
    /// <see href="https://docs.dataforseo.com/v3/ai_optimization/claude/llm_responses/task_get"/>
    
    public static async Task ClaudeLlmResponsesTaskGetById()
    {
		// use the task identifier that you recieved upon setting a task
	    string taskId = "07211938-0696-0613-0000-674a0f948d6b";
	    using var response = await _httpClient.GetAsync("/v3/ai_optimization/claude/llm_responses/task_get/" + taskId);
	    var result = JsonConvert.DeserializeObject<dynamic>(await response.Content.ReadAsStringAsync());
	    // you can find the full list of the response codes here https://docs.dataforseo.com/v3/appendix/errors
	    if (result.status_code == 20000)
	    {
	        // do something with result
	        Console.WriteLine(result);
	    }
	    else
	        Console.WriteLine($"error. Code: {result.status_code} Message: {result.status_message}");
    }
```





> The above command returns JSON structured like this:

```
{
  "version": "0.1.20250724",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.0849 sec.",
  "cost": 0,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "07241735-1535-0613-0000-0722e701b5ff",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.0310 sec.",
      "cost": 0,
      "result_count": 1,
      "path": [
        "v3",
        "ai_optimization",
        "claude",
        "llm_responses",
        "task_get",
        "07241735-1535-0613-0000-0722e701b5ff"
      ],
      "data": {
        "api": "ai_optimization",
        "function": "llm_responses",
        "se": "claude",
        "system_message": "communicate as if we are in a business meeting",
        "message_chain": [
          {
            "role": "user",
            "message": "Hello, what's up?"
          },
          {
            "role": "ai",
            "message": "Hello! I’m doing well, thank you. How can I assist you today? Are there any specific topics or projects you’d like to discuss in our meeting?"
          }
        ],
        "max_output_tokens": 1024,
        "temperature": 0.3,
        "top_p": 0.5,
        "web_search_country_iso_code": "FR",
        "model_name": "claude-sonnet-4-0",
        "web_search": true,
        "user_prompt": "provide information on how relevant the amusement park business is in France now"
      },
      "result": [
        {
          "model_name": "claude-sonnet-4-20250514",
          "input_tokens": 15435,
          "output_tokens": 956,
          "reasoning_tokens": 576,
          "web_search": true,
          "money_spent": 0.0403225,
          "datetime": "2025-07-24 19:39:46 +00:00",
          "items": [
            {
              "type": "reasoning",
              "sections": [
                {
                  "type": "summary_text",
                  "text": "**Exploring a riddle**nnThis likely refers to a riddle or joke. The classic answer seems to be a cup that's closed at the top and bottom, making it essentially useless. Or, is it a trophy cup or even a cupcake? I need to think through this riddle: I have a cup with no bottom and a closed top. How can I drink from it? The punchline might simply be that you can't drink from it. Hm, I wonder if there might be other interpretations too!"
                },
                {
                  "type": "summary_text",
                  "text": "**Pondering a riddle’s meaning**nnI’m considering if this cup could also mean something like hiccup — closed at the top and bottom? But if there’s no bottom, anything liquid just falls out. A closed top means you can’t pour anything in. So it may not be a traditional drinking cup. Maybe it’s an acorn cup, although it has an open top. The joke could suggest inverting it, but that still leaves it open. I’m not sure how it all ties back to drinking from it!"
                },
                {
                  "type": "summary_text",
                  "text": "**Clarifying the riddle’s punchline**nnSo, the answer seems to be that you're meant to drink from the rim, but since there’s no bottom and the top is closed, it's impossible to do that. The correct response points to a thimble instead, which has an open bottom. The punchline is clear: You can't drink; it's a thimble. The riddle plays on the expectation of a witty response. To keep it light, I could say, You don't! That's a thimble! and add a playful tone."
                }
              ]
            },
            {
              "type": "message",
              "sections": [
                {
                  "type": "text",
                  "text": "Based on my research, I can provide you with comprehensive insights on the relevance and current state of the amusement park business in France.nn## Current Market PerformancennThe French amusement park industry is demonstrating strong relevance and growth in 2024-2025. ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "With a turnover of 3 billion euros, 500 companies and more than 50,000 employees, leisure destinations are a diverse and enduring asset for France. The French amusement parks union SNELAC (Syndicat National des Espaces de Loisirs, d'Attractions et Culturels) proudly proclaims it: this industry is a real dream machine for its 63 million visitors.",
                  "annotations": [
                    {
                      "title": "No. 1 amusement park in France | Puy du Fou",
                      "url": "https://www.puydufou.com/france/en/no-1-amusement-park-france"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": "nn## Leading Market PlayersnnThe French market is dominated by several key players achieving record-breaking performance:nn- **Parc Astérix**: ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "2,842,000 visitors in 2024, establishing a new record",
                  "annotations": [
                    {
                      "title": "Classement Parcs d'attractions France ❤️ Top 15 Visiteurs 2024",
                      "url": "https://www.parcs-france.com/classement-parcs-attraction-top20/"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": "n- **Puy du Fou**: ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "2,800,000 visitors in 2024, also achieving a record. It is now neck-and-neck with the Gallic park for second place behind Disneyland Paris",
                  "annotations": [
                    {
                      "title": "Classement Parcs d'attractions France ❤️ Top 15 Visiteurs 2024",
                      "url": "https://www.parcs-france.com/classement-parcs-attraction-top20/"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": "n- **Futuroscope**: ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "2,050,000 visitors, slightly exceeding 2 million visitors, with the Aquascope water park already welcoming 250,000 people",
                  "annotations": [
                    {
                      "title": "Classement Parcs d'attractions France ❤️ Top 15 Visiteurs 2024",
                      "url": "https://www.parcs-france.com/classement-parcs-attraction-top20/"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": "nn## Industry Innovation and InvestmentnnThe sector continues to demonstrate strong innovation capabilities. ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "With increasingly large investments, parks are calling on the best constructors on the planet. In 2017, 62 new roller coasters were built in Europe, including 7 in France.",
                  "annotations": [
                    {
                      "title": "L'industrie des parcs d'attractions : un moteur économique toujours plus puissant - Dimension Parcs",
                      "url": "https://www.dimensionparcs.fr/france/industrie-parcs-attractions-moteur-economique-toujours-plus-puissant/"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": " This trend continues with parks like Parc Astérix introducing new attractions such as the upcoming Cétautomatix spinning coaster.nn## Global Market ContextnnThe French market operates within a robust global environment. ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "The global amusement parks market size was estimated at USD 102.67 billion in 2024 and is projected to reach USD 149.32 billion by 2030, growing at a CAGR of 6.1% from 2025 to 2030.",
                  "annotations": [
                    {
                      "title": "Amusement Parks Market Size, Share | Industry Report, 2030",
                      "url": "https://www.grandviewresearch.com/industry-analysis/amusement-parks-market"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": " ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "The amusement parks market in Europe is growing with a significant CAGR from 2025 to 2030. Sustainability is a growing focus in the European amusement parks industry, with operators implementing green practices such as renewable energy usage, waste reduction, and water conservation.",
                  "annotations": [
                    {
                      "title": "Amusement Parks Market Size, Share | Industry Report, 2030",
                      "url": "https://www.grandviewresearch.com/industry-analysis/amusement-parks-market"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": "nn## Competitive LandscapennFrench parks face increasing competition from European neighbors. ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "Many European parks are also nibbling away at market shares on French territory. Efteling recorded a 35% increase in French visitors in 2017, while Europa-Park counts 25% French visitors in its overall attendance.",
                  "annotations": [
                    {
                      "title": "L'industrie des parcs d'attractions : un moteur économique toujours plus puissant - Dimension Parcs",
                      "url": "https://www.dimensionparcs.fr/france/industrie-parcs-attractions-moteur-economique-toujours-plus-puissant/"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": " However, ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "French parks are fighting relentlessly against these international offensives by offering quality and innovative new features.",
                  "annotations": [
                    {
                      "title": "L'industrie des parcs d'attractions : un moteur économique toujours plus puissant - Dimension Parcs",
                      "url": "https://www.dimensionparcs.fr/france/industrie-parcs-attractions-moteur-economique-toujours-plus-puissant/"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": "nn## Business OutlooknnThe industry shows resilience despite challenges. ",
                  "annotations": null
                },
                {
                  "type": "text",
                  "text": "The year was marked by unfavorable weather (very humid), the impact for some of the Paris Olympic Games and the political context (legislative elections). This did not prevent new records from being broken!",
                  "annotations": [
                    {
                      "title": "Classement Parcs d'attractions France ❤️ Top 15 Visiteurs 2024",
                      "url": "https://www.parcs-france.com/classement-parcs-attraction-top20/"
                    }
                  ]
                },
                {
                  "type": "text",
                  "text": "nnIn conclusion, the amusement park business in France remains highly relevant and continues to demonstrate strong growth potential, innovation capacity, and economic significance, making it an attractive sector for continued investment and development.",
                  "annotations": null
                }
              ]
            }
          ]
        }
      ],
      "fan_out_queries": [
        "France amusement park industry 2024",
        "France theme park attendance 2024 recovery"
      ]
    }
  ]
}
```









 

  cURL   php   Node.js   Python   cSharp