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

# Get all analyst insights

> Retrieve the Learn screen analyst insight feed.

Retrieve a paginated feed of analyst-written content. Responses are cached per page for 24 hours.

### Authentication & headers

<ParamField header="Authorization" type="string" required>
  Bearer token issued by Auth0. Format: `Bearer YOUR_ACCESS_TOKEN` and must include the `wealthyhood:nbg` scope.
</ParamField>

### Query parameters

<ParamField query="page" type="integer" default="1">
  1-based page index to fetch. Page size fixed to 50 items.
</ParamField>

### Example request

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://api.wealthyhood.com/learn/analyst-insights?page=1' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
  ```
</RequestExample>

### Example response

<ResponseExample>
  ```json Success theme={null}
  {
    "pagination": {
      "page": 1,
      "pageSize": 50,
      "pages": 2,
      "total": 75
    },
    "data": [
      {
        "key": "weekly-market-roundup",
        "id": "64f0c51e7fb3fc001234abcd",
        "analystInsightType": "analysis",
        "createdAt": "2024-05-12T07:45:00.000Z",
        "title": "Where markets stand this week",
        "contentHTML": "<body>…</body>",
        "previewImageURL": "https://cdn.wealthyhood.com/insights/weekly.png",
        "fullImageURL": "https://cdn.wealthyhood.com/insights/weekly.png",
        "bannerImageURL": "https://cdn.wealthyhood.com/insights/weekly-banner.png",
        "readingTime": "3 min"
      }
    ]
  }
  ```
</ResponseExample>

### Response fields

<ResponseField name="pagination" type="object" required>
  Pagination metadata for the requested page.

  <Expandable title="Properties">
    <ResponseField name="page" type="integer" />

    <ResponseField name="pageSize" type="integer" />

    <ResponseField name="pages" type="integer" />

    <ResponseField name="total" type="integer" />
  </Expandable>
</ResponseField>

<ResponseField name="data" type="AnalystInsight[]" required>
  Sorted by creation date descending.

  <Expandable title="AnalystInsight">
    <ResponseField name="key" type="string" />

    <ResponseField name="id" type="string" />

    <ResponseField name="analystInsightType" type="&#x22;analysis&#x22; | &#x22;quickTake&#x22; | &#x22;weeklyReview&#x22;" />

    <ResponseField name="createdAt" type="date-time" />

    <ResponseField name="title" type="string" />

    <ResponseField name="contentHTML" type="string">
      Full body or subscription-trimmed HTML.
    </ResponseField>

    <ResponseField name="previewImageURL" type="uri" />

    <ResponseField name="fullImageURL" type="uri" />

    <ResponseField name="bannerImageURL" type="uri | null" />

    <ResponseField name="readingTime" type="string" />
  </Expandable>
</ResponseField>


## OpenAPI

````yaml GET /learn/analyst-insights
openapi: 3.0.3
info:
  title: Wealthyhood Learn API
  version: 1.0.0
  description: >
    Machine-to-machine endpoints that power the Wealthyhood Learn screen.


    All routes require a bearer access token issued by Auth0 with the
    `wealthyhood:nbg` scope.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host.
security:
  - bearerAuth: []
tags:
  - name: Learn
    description: Investor education content surfaced in the Learn screen.
paths:
  /learn/analyst-insights:
    get:
      tags:
        - Learn
      summary: Get all analyst insights
      description: >
        Retrieve a paginated feed of analyst-written insights. Content is
        localized based on the user's language preference.
      parameters:
        - $ref: '#/components/parameters/XUserId'
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
            default: 1
          description: 1-based page index to fetch. Page size is fixed at 50 items.
      responses:
        '200':
          description: Paginated analyst insight feed.
          headers:
            Cache-Control:
              schema:
                type: string
              description: Each page is cached for 24 hours.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalystInsightsPage'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  parameters:
    XUserId:
      name: x-user-id
      in: header
      required: true
      description: >-
        MongoDB identifier of the Wealthyhood user. Used to determine the
        language preference for localized content.
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
  schemas:
    AnalystInsightsPage:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          type: array
          items:
            $ref: '#/components/schemas/AnalystInsight'
      required:
        - pagination
        - data
    Pagination:
      type: object
      properties:
        page:
          type: integer
          example: 1
        pageSize:
          type: integer
          example: 50
        pages:
          type: integer
          example: 2
        total:
          type: integer
          example: 75
    AnalystInsight:
      type: object
      properties:
        key:
          type: string
          description: Stable slug from Contentful.
          example: weekly-market-roundup
        id:
          type: string
          description: Wealthyhood content entry identifier.
          example: 64f0c51e7fb3fc001234abcd
        analystInsightType:
          type: string
          description: Insight category returned by the CMS.
          enum:
            - analysis
            - quickTake
            - weeklyReview
        createdAt:
          type: string
          format: date-time
        title:
          type: string
        contentHTML:
          type: string
          description: HTML article body.
        previewImageURL:
          type: string
          format: uri
        fullImageURL:
          type: string
          format: uri
        bannerImageURL:
          type: string
          format: uri
          nullable: true
        readingTime:
          type: string
          example: 3 min
      required:
        - key
        - id
        - analystInsightType
        - createdAt
        - title
        - contentHTML
        - previewImageURL
        - fullImageURL
        - readingTime
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: integer
        error:
          type: object
          properties:
            message:
              type: string
            description:
              type: string
              nullable: true
        responseId:
          type: string
          format: uuid
  responses:
    UnauthorizedError:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    ForbiddenError:
      description: Token lacks the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    NotFoundError:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Auth0-issued access token that includes the `wealthyhood:nbg` scope.

````