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

# Retrieve a course

> Fetch a course by ID, optionally inlining related resources.

## Path parameters

<ParamField path="id" type="string" required>
  The course ID.
</ParamField>

## Query parameters

<ParamField query="expand" type="string[]">
  Inline related resources. Up to 3 levels deep. Allowed paths:
  `cohorts`, `cohorts.units`, `cohorts.lessons`,
  `cohorts.lessons.activities`, `cohorts.lessons.content`.
</ParamField>

## Returns

The [Course](/api-reference/courses/object).

## Examples

<CodeGroup>
  ```ts TypeScript theme={null}
  const course = await hk.courses.retrieve("crs_123", {
    expand: ["cohorts.lessons"],
  });
  ```

  ```php PHP theme={null}
  $course = $hk->courses->retrieve('crs_123', [
      'expand' => ['cohorts.lessons'],
  ]);
  ```

  ```python Python theme={null}
  course = hk.courses.retrieve(
      "crs_123",
      expand=["cohorts.lessons"],
  )
  ```

  ```bash curl theme={null}
  curl "https://api.hawkings.education/v1/courses/crs_123?expand=cohorts.lessons" \
    -H "x-api-key: $HAWKINGS_API_KEY" \
    -H "X-Learning-Platform-Code: $HAWKINGS_PLATFORM_CODE"
  ```
</CodeGroup>
