List a folder's files + documents
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");curl_easy_setopt(hnd, CURLOPT_URL, "https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "X-Api-Key: <X-Api-Key>");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion"), Headers = { { "X-Api-Key", "<X-Api-Key>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<X-Api-Key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion")) .header("X-Api-Key", "<X-Api-Key>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion") .get() .addHeader("X-Api-Key", "<X-Api-Key>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents', params: {expand: 'documents.model', 'fields[model]': 'id,name,version'}, headers: {'X-Api-Key': '<X-Api-Key>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion';const options = {method: 'GET', headers: {'X-Api-Key': '<X-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val request = Request.Builder() .url("https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion") .get() .addHeader("X-Api-Key", "<X-Api-Key>") .build()
val response = client.newCall(request).execute()use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents";
let querystring = [ ("expand", "documents.model"), ("fields[model]", "id,name,version"), ];
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("X-Api-Key", "<X-Api-Key>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .query(&querystring) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url 'https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion' \ --header 'X-Api-Key: <X-Api-Key>'wget --quiet \ --method GET \ --header 'X-Api-Key: <X-Api-Key>' \ --output-document \ - 'https://api.langparse.dev/api/v1/folders/Website%2520Examples/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion'The path segment accepts a folder id OR name (URL-encoded), e.g. /v1/folders/Website%20Examples/documents. Files come back in the folder’s manual sortOrder (set in the app or via the reorder endpoint), then newest-filed first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Folder id or name.
Example
Website%20ExamplesQuery Parameters
Section titled “Query Parameters”Inline relations. documents.model replaces each document’s model id string with { id, name }. Shallow (one hop).
Example
documents.modelFields for an expanded model. Default: id,name.
Example
id,name,versionResponses
Section titled “Responses”Files filed into the folder, each with its document(s). The folder rides in meta.
object
object
The file id.
Manual position within this folder (lower = earlier). Files are returned in this order; unset edges trail, newest-filed first.
object
List pagination. Bounded collections return real totals; large (cursor-backed) collections may leave totals null and set cursor.
object
object
Example
{ "data": [ { "id": "file_mra6797o", "fileName": "invoice.pdf", "filedAt": "2026-07-07T04:50:12.649Z", "documents": [ { "id": "doc_mra67l5v", "model": "mdl_inv01", "status": "processed", "createdAt": "2026-07-07T04:50:26.659Z" } ] } ], "meta": { "pagination": { "page": 1, "pageSize": 1, "totalItems": 1, "totalPages": 1, "hasNext": false, "hasPrevious": false, "cursor": null }, "folder": { "id": "fld_mr9y6w", "name": "Website Examples", "path": "Website Examples" } }}Missing or invalid API key.
Error response. statusCode mirrors the HTTP status; statusMessage is human-readable.
object
Example
{ "statusCode": 404, "statusMessage": "Document not found"}Folder not found.
Error response. statusCode mirrors the HTTP status; statusMessage is human-readable.
object
Example
{ "statusCode": 404, "statusMessage": "Document not found"}