> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://humanloop.com/docs/v4/api/datasets/list-datapoints/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://humanloop.com/_mcp/server. # Datapoints GET https://api.humanloop.com/v4/datasets/{dataset_id}/datapoints Get datapoints for a dataset. Reference: https://humanloop.com/docs/v4/api/datasets/list-datapoints ## Authentication - `X-API-KEY` header (required) — API Key authentication via header ## Request ### Path parameters - `dataset_id` (string, required) — String ID of dataset. Starts with `evts_`. ### Query parameters - `page` (integer, optional, default: 0) - `size` (integer, optional, default: 50) ## Response ### 200 Successful Response - `records` (list of DatapointResponse, required) - `page` (integer, required) - `size` (integer, required) - `total` (integer, required) ## Errors ### 422 Datasets List Datapoints Request Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### DatapointResponse - `id` (string, required) - `dataset_id` (string, optional) - `inputs` (map from string to string, optional) - `messages` (list of ChatMessageWithToolCall, optional) - `target` (map from string to DatapointResponseTargetValue, optional) ### ValidationError - `loc` (list of ValidationErrorLocItem, required) - `msg` (string, required) - `type` (string, required) ### ChatMessageWithToolCall - `role` (enum, required) — Role of the message author. - Allowed values: `user`, `assistant`, `system`, `tool`, `developer` - `content` (Content, optional) — The content of the message. - `name` (string, optional) — Optional name of the message author. - `tool_call_id` (string, optional) — Tool call that this message is responding to. - `tool_calls` (list of ToolCall, optional) — A list of tool calls requested by the assistant. - `thinking` (list of ChatMessageWithToolCallThinkingItem, optional) — Model's chain-of-thought for providing the response. Present on assistant messages if model supports it. - `tool_call` (FunctionTool, optional, deprecated) — NB: Deprecated in favour of tool_calls. A tool call requested by the assistant. ### DatapointResponseTargetValue ### ValidationErrorLocItem ### Content The content of the message. ### ToolCall A tool call to be made. - `id` (string, required) - `type` ("function", required) — The type of tool to call. - `function` (FunctionTool, required) — A function tool to be called by the model where user owns runtime. ### ChatMessageWithToolCallThinkingItem - `type`: `thinking` - `signature` (string, required) — Cryptographic signature that verifies the thinking block was generated by Anthropic. - `thinking` (string, required) — Model's chain-of-thought for providing the response. - `type`: `redacted_thinking` - `data` (string, required) — Thinking block Anthropic redacted for safety reasons. User is expected to pass the block back to Anthropic ### FunctionTool A function tool to be called by the model where user owns runtime. - `name` (string, required) - `arguments` (string, optional) ## Examples **Response** ```json { "records": [ { "id": "id", "dataset_id": "dataset_id", "inputs": { "key": "value" }, "messages": [ { "role": "user" } ], "target": { "key": "value" } } ], "page": 1, "size": 1, "total": 1 } ``` **SDK Code** ```python import requests url = "https://api.humanloop.com/v4/datasets/dataset_id/datapoints" headers = {"X-API-KEY": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.humanloop.com/v4/datasets/dataset_id/datapoints'; const options = {method: 'GET', headers: {'X-API-KEY': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.humanloop.com/v4/datasets/dataset_id/datapoints" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.humanloop.com/v4/datasets/dataset_id/datapoints") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-API-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.humanloop.com/v4/datasets/dataset_id/datapoints") .header("X-API-KEY", "") .asString(); ``` ```php request('GET', 'https://api.humanloop.com/v4/datasets/dataset_id/datapoints', [ 'headers' => [ 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.humanloop.com/v4/datasets/dataset_id/datapoints"); var request = new RestRequest(Method.GET); request.AddHeader("X-API-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["X-API-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.humanloop.com/v4/datasets/dataset_id/datapoints")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers 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() ```