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

# Get related articles

> Retrieve articles related to the specified article based on tag overlap and category matching. Returns article preview data without content.

**Sorting Logic:**
Related articles are sorted with sophisticated relevance scoring:
1. **Same Category + Tag Overlap**: Articles with matching category, sorted by tag overlap (descending), then publish date (descending)
2. **Different Category + Tag Overlap**: Articles with different category but tag overlap, sorted by tag overlap (descending), then publish date (descending)

Only articles with at least one overlapping tag are returned.

**Authenticated Access:**
- **Admin API keys**: Can get related articles for any article from any account
- **Account API keys**: Can only get related articles for articles from the account that owns the key

**Public Access** (from valid domains):
- **No authentication required** when accessing from verified domains (*.localhost, *.suprsonic.blog, *.suprsonic.app, or verified custom domains)
- Can only get related articles for **published articles** from the domain-associated account
- Only returns other **published articles** as related content


## Usage Notes

* Related articles are determined by tag overlap with the source article
* Only published articles with a publish date in the past are returned
* Articles are sorted first by tag overlap count (descending), then by publish date (descending)
* The source article is excluded from the results
* If no related articles are found, an empty array is returned
* This endpoint only returns article preview data (no content field) for performance reasons


## OpenAPI

````yaml get /api/v1/articles/{id}/related
openapi: 3.1.0
info:
  title: SuprSonic API
  version: 1.0.0
  description: API for autonomous content generation and blog management
  contact:
    name: SuprSonic API Support
    url: https://www.suprsonic.com/support
    email: support@suprsonic.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://www.suprsonic.com
    description: Production server
  - url: http://localhost:3000
    description: Development server
security: []
tags: []
paths:
  /api/v1/articles/{id}/related:
    get:
      tags:
        - Articles
      summary: Get related articles
      description: >
        Retrieve articles related to the specified article based on tag overlap
        and category matching. Returns article preview data without content.


        **Sorting Logic:**

        Related articles are sorted with sophisticated relevance scoring:

        1. **Same Category + Tag Overlap**: Articles with matching category,
        sorted by tag overlap (descending), then publish date (descending)

        2. **Different Category + Tag Overlap**: Articles with different
        category but tag overlap, sorted by tag overlap (descending), then
        publish date (descending)


        Only articles with at least one overlapping tag are returned.


        **Authenticated Access:**

        - **Admin API keys**: Can get related articles for any article from any
        account

        - **Account API keys**: Can only get related articles for articles from
        the account that owns the key


        **Public Access** (from valid domains):

        - **No authentication required** when accessing from verified domains
        (*.localhost, *.suprsonic.blog, *.suprsonic.app, or verified custom
        domains)

        - Can only get related articles for **published articles** from the
        domain-associated account

        - Only returns other **published articles** as related content
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The unique identifier (UUID or slug) of the article
          examples:
            uuid:
              summary: Using UUID
              value: 123e4567-e89b-12d3-a456-426614174000
            slug:
              summary: Using slug
              value: my-article-title
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 20
            default: 5
          description: Number of related articles to return
      responses:
        '200':
          description: Successfully retrieved related articles
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        account_id:
                          type: string
                          format: uuid
                        title:
                          type: string
                        slug:
                          type: string
                        meta_description:
                          type: string
                          nullable: true
                        hero_image_url:
                          type: string
                          format: uri
                          nullable: true
                        tags:
                          type: array
                          items:
                            type: string
                        category:
                          type: string
                          enum:
                            - opinion_piece
                            - industry_forecast
                            - how_to_guide
                            - comparison
                            - deep_research
                            - checklist
                            - roundup
                        publish_date:
                          type: string
                          format: date-time
                        tag_overlap_count:
                          type: integer
                          description: Number of tags in common with the source article
                        _links:
                          type: object
                          properties:
                            self:
                              type: string
                              format: uri
                            account:
                              type: string
                              format: uri
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Article not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - AdminApiKey: []
        - AccountApiKey: []
        - {}
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Invalid request data
            details:
              type: object
  securitySchemes:
    AdminApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Admin API key for managing accounts and creating content
    AccountApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Account-specific API key for accessing account data

````