> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.ollang.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve All Projects

> Get a paginated list of all projects with optional search and sorting functionality

Retrieve a paginated list of all projects associated with your account. This endpoint supports various query parameters for pagination, sorting, and searching through your projects.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api-integration.ollang.com/integration/project?page=1&take=10&orderBy=createdAt&orderDirection=desc&search=video" \
    -H "X-Api-Key: <your-api-key>"
  ```

  ```javascript JavaScript theme={null}
  const queryParams = new URLSearchParams({
    page: "1",
    take: "10",
    orderBy: "createdAt",
    orderDirection: "desc",
    search: "project",
  });

  const response = await fetch(
    `https://api-integration.ollang.com/integration/project?${queryParams}`,
    {
      method: "GET",
      headers: {
        "X-Api-Key": "<your-api-key>",
      },
    }
  );

  const projects = await response.json();
  console.log("Projects:", projects);
  ```

  ```python Python theme={null}
  import requests

  params = {
      'page': 1,
      'take': 10,
      'orderBy': 'createdAt',
      'orderDirection': 'desc',
      'search': 'project'
  }

  headers = {
      'X-Api-Key': '<your-api-key>'
  }

  response = requests.get(
      'https://api-integration.ollang.com/integration/project',
      headers=headers,
      params=params
  )

  projects = response.json()
  print("Projects:", projects)
  ```

  ```php PHP theme={null}
  $queryParams = http_build_query([
      'page' => 1,
      'take' => 10,
      'orderBy' => 'createdAt',
      'orderDirection' => 'desc',
      'search' => 'project'
  ]);

  $curl = curl_init();

  curl_setopt_array($curl, array(
      CURLOPT_URL => 'https://api-integration.ollang.com/integration/project?' . $queryParams,
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => array(
          'X-Api-Key: <your-api-key>'
      ),
  ));

  $response = curl_exec($curl);
  $projects = json_decode($response, true);
  curl_close($curl);

  echo "Projects: " . json_encode($projects);
  ```

  ```go Go theme={null}
  package main

  import (
      "encoding/json"
      "fmt"
      "io"
      "net/http"
      "net/url"
  )

  func main() {
      baseURL := "https://api-integration.ollang.com/integration/project"

      params := url.Values{}
      params.Add("page", "1")
      params.Add("take", "10")
      params.Add("orderBy", "createdAt")
      params.Add("orderDirection", "desc")
      params.Add("search", "project")

      fullURL := baseURL + "?" + params.Encode()

      req, _ := http.NewRequest("GET", fullURL, nil)
      req.Header.Set("X-Api-Key", "<your-api-key>")

      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()

      body, _ := io.ReadAll(resp.Body)

      var projects map[string]interface{}
      json.Unmarshal(body, &projects)

      fmt.Println("Projects:", projects)
  }
  ```

  ```java Java theme={null}
  String baseUrl = "https://api-integration.ollang.com/integration/project";
  String queryParams = "?page=1&take=10&orderBy=createdAt&orderDirection=desc&search=project";

  HttpResponse<String> response = Unirest.get(baseUrl + queryParams)
    .header("X-Api-Key", "<your-api-key>")
    .asString();

  JSONObject projects = new JSONObject(response.getBody());
  System.out.println("Projects: " + projects.toString());
  ```
</RequestExample>

## Authorizations

This endpoint requires API key authentication. Include your API key in the request header:

* **Header name**: `X-Api-Key`
* **Header value**: Your API key from the Ollang dashboard
* **Format**: `X-Api-Key: your-api-key-here`

You can obtain your API key from your [Ollang dashboard](https://lab.ollang.com).

## Query Parameters

<ParamField query="page" type="number" default="1">
  The page number to retrieve. Must be a positive integer starting from 1.
</ParamField>

<ParamField query="take" type="number" default="10">
  The number of items per page. Must be between 1 and 50.
</ParamField>

<ParamField query="orderBy" type="string" default="id">
  The field to sort the results by. Common values include `id`, `name`,
  `createdAt`, `sourceLanguage`.
</ParamField>

<ParamField query="orderDirection" type="string" default="desc">
  The direction to sort the results. Must be either `asc` (ascending) or `desc`
  (descending).
</ParamField>

<ParamField query="search" type="string">
  A search term to filter projects by name or other searchable fields. The
  search is case-insensitive and supports partial matches.
</ParamField>

## Response

The response contains a paginated list of projects with metadata about the pagination.

<ResponseField name="data" type="array">
  Array of project objects containing detailed information about each project.

  <Expandable title="Project Object Properties">
    <ResponseField name="id" type="string">
      Unique identifier of the project.
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the project as provided during upload.
    </ResponseField>

    <ResponseField name="sourceLanguage" type="string">
      Source language of the project using ISO 639-1 language codes (e.g., "en", "tr", "fr").
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      The date and time when the project was created in ISO 8601 format.
    </ResponseField>

    <ResponseField name="folderId" type="string">
      Identifier of the folder associated with the project for organization purposes.
    </ResponseField>

    <ResponseField name="ordersCount" type="number" optional>
      The number of orders related to this project. This field may not be present in all responses.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object">
  Pagination metadata providing information about the current page and total results.

  <Expandable title="Pagination Metadata">
    <ResponseField name="page" type="number">
      The current page number of the pagination.
    </ResponseField>

    <ResponseField name="take" type="number">
      The number of items per page.
    </ResponseField>

    <ResponseField name="itemCount" type="number">
      The total number of items across all pages.
    </ResponseField>

    <ResponseField name="pageCount" type="number">
      The total number of pages available.
    </ResponseField>

    <ResponseField name="hasPreviousPage" type="boolean">
      Boolean flag indicating if there is a previous page relative to the current page.
    </ResponseField>

    <ResponseField name="hasNextPage" type="boolean">
      Boolean flag indicating if there is a next page relative to the current page.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "60b8d6f1e1b9b1d8c6c0d8e1",
        "name": "Marketing Video Q4",
        "sourceLanguage": "en",
        "createdAt": "2024-01-15T10:30:45.511Z",
        "folderId": "60b8d6f1e1b9b1d8c6c0d8e2",
        "ordersCount": 3
      },
      {
        "id": "60b8d6f1e1b9b1d8c6c0d8e3",
        "name": "Product Demo Turkish",
        "sourceLanguage": "tr",
        "createdAt": "2024-01-14T14:22:33.211Z",
        "folderId": "60b8d6f1e1b9b1d8c6c0d8e2",
        "ordersCount": 1
      },
      {
        "id": "60b8d6f1e1b9b1d8c6c0d8e4",
        "name": "Training Material",
        "sourceLanguage": "fr",
        "createdAt": "2024-01-13T09:15:22.847Z",
        "folderId": "60b8d6f1e1b9b1d8c6c0d8e5"
      }
    ],
    "meta": {
      "page": 1,
      "take": 10,
      "itemCount": 25,
      "pageCount": 3,
      "hasPreviousPage": false,
      "hasNextPage": true
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Invalid query parameters",
    "message": "The 'take' parameter must be between 1 and 50",
    "code": "INVALID_PAGINATION"
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Unauthorized",
    "message": "Invalid or missing API key",
    "code": "UNAUTHORIZED"
  }
  ```

  ```json 500 theme={null}
  {
    "error": "Internal server error",
    "message": "An unexpected error occurred while retrieving projects",
    "code": "INTERNAL_ERROR"
  }
  ```
</ResponseExample>
