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

# Get episode embed code

> Returns a paste-ready <particle-podcast-clip> HTML snippet for an existing clip or a custom timestamp range within an episode. Either clip_id or start (with optional end) must be supplied; the two modes are mutually exclusive.

For slices: when end is omitted, it defaults to start + 120 seconds. The embed widget caps slice length at 120 seconds, so any end value beyond start + 120s is silently clamped to start + 120s. End is also clamped to the episode duration. The actual range used is encoded in the returned script_url.



## OpenAPI

````yaml /openapi.json get /v1/embed/episodes/{episode_id}/code
openapi: 3.1.0
info:
  description: Public API for Particle — news intelligence, financial data, and analysis.
  title: Particle API
  version: 0.1.0
servers:
  - url: https://api.particle.pro
security:
  - ApiKeyHeader: []
  - BearerAuth: []
paths:
  /v1/embed/episodes/{episode_id}/code:
    get:
      tags:
        - Embed
        - tier:free
      summary: Get episode embed code
      description: >-
        Returns a paste-ready <particle-podcast-clip> HTML snippet for an
        existing clip or a custom timestamp range within an episode. Either
        clip_id or start (with optional end) must be supplied; the two modes are
        mutually exclusive.


        For slices: when end is omitted, it defaults to start + 120 seconds. The
        embed widget caps slice length at 120 seconds, so any end value beyond
        start + 120s is silently clamped to start + 120s. End is also clamped to
        the episode duration. The actual range used is encoded in the returned
        script_url.
      operationId: get-episode-embed-code
      parameters:
        - description: Episode slug or ID
          in: path
          name: episode_id
          required: true
          schema:
            description: Episode slug or ID
            type: string
        - description: Clip ID. Mutually exclusive with start/end.
          explode: false
          in: query
          name: clip_id
          schema:
            description: Clip ID. Mutually exclusive with start/end.
            type: string
        - description: Slice start in seconds. Mutually exclusive with clip_id.
          explode: false
          in: query
          name: start
          schema:
            description: Slice start in seconds. Mutually exclusive with clip_id.
            format: double
            minimum: 0
            type: number
        - description: >-
            Slice end in seconds. Optional: when omitted, defaults to start +
            120s. The widget caps slices at 120s, so end values further than
            120s past start are silently clamped to start + 120s.
          explode: false
          in: query
          name: end
          schema:
            description: >-
              Slice end in seconds. Optional: when omitted, defaults to start +
              120s. The widget caps slices at 120s, so end values further than
              120s past start are silently clamped to start + 120s.
            format: double
            minimum: 0
            type: number
        - description: Widget theme
          explode: false
          in: query
          name: theme
          schema:
            default: light
            description: Widget theme
            enum:
              - light
              - dark
              - color-light
              - color-dark
            type: string
        - description: Widget size
          explode: false
          in: query
          name: size
          schema:
            default: regular
            description: Widget size
            enum:
              - regular
              - compact
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EpisodeEmbedCode'
          description: OK
          headers:
            Cache-Control:
              schema:
                type: string
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PlatformError'
          description: Error
      security: []
      x-codeSamples:
        - label: cURL
          lang: curl
          source: >-
            curl
            "https://api.particle.pro/v1/embed/episodes/{episode_id}/code?theme=light&size=regular"
components:
  schemas:
    EpisodeEmbedCode:
      additionalProperties: false
      properties:
        embed_html:
          description: Full <particle-podcast-clip> HTML snippet ready to paste
          type: string
        script_url:
          description: Inner widget script URL (the <script src> value)
          type: string
        variant:
          description: Which embed variant was generated
          enum:
            - clip
            - episode-clip
          type: string
      required:
        - embed_html
        - script_url
        - variant
      type: object
    PlatformError:
      additionalProperties: false
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        error_code:
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        resolve:
          $ref: '#/components/schemas/ErrorResolve'
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    ErrorResolve:
      additionalProperties: false
      properties:
        action:
          type: string
        endpoint:
          type: string
        message:
          type: string
        method:
          type: string
        url:
          type: string
      required:
        - message
      type: object
  securitySchemes:
    ApiKeyHeader:
      description: Pass your API key in the X-API-Key header (recommended).
      in: header
      name: X-API-Key
      type: apiKey
    BearerAuth:
      description: Pass your API key as a Bearer token in the Authorization header.
      scheme: bearer
      type: http

````