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

# Anchor text and URL recommendations

> Get anchor text and URL recommendations for a given block of text using the customer's embedded pages.



## OpenAPI

````yaml POST /v4/accounts/{accountId}/internal-link-recommendations
openapi: 3.1.0
info:
  title: Conductor API Documentation
  version: 4.0.0
  license:
    name: Conductor terms of service
    url: https://www.conductor.com/legal/
  termsOfService: https://www.conductor.com/legal/
  x-logo:
    url: https://app.conductor.com/images/global/logo_login.png
servers:
  - url: https://api.conductor.com
security:
  - ApiKeyAuth: []
    SigAuth: []
tags:
  - name: Draft Management
    description: Create, retrieve, update, and delete Writing Assistant drafts.
  - name: Content Insights
    description: >-
      Request and retrieve AI-driven content insights and recommendations for a
      draft.
  - name: Content Generation
    description: >-
      Generate and revise content assets — outlines, drafts, meta descriptions,
      title tags, outline expansions, and shortened text.
  - name: Content Guidance
    description: >-
      Validate and guide content against target keywords and optimization
      criteria.
  - name: Content Score
    description: >-
      Evaluate on-page content and return scoring insights across intent
      alignment and topical coverage.
  - name: Content Profile
    description: >-
      Create, retrieve, update, and delete reusable voice, tone, and
      language-rule profiles applied to draft generation.
  - name: Internal Linking
    description: >-
      Get anchor text and URL recommendations for internal linking based on a
      customer's embedded pages.
paths:
  /v4/accounts/{accountId}/internal-link-recommendations:
    post:
      tags:
        - Internal Linking
      summary: Anchor text and URL recommendations
      description: >-
        Get anchor text and URL recommendations for a given block of text using
        the customer's embedded pages.
      operationId: getInternalLinkRecommendations
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: integer
          description: Account identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InternalLinkRecommendationsInput'
            example:
              text: Looking for the best running shoes for marathons.
              webPropertyId: 456
              linkExclusionUrls:
                - https://www.example.com/discontinued-product
      responses:
        '200':
          description: Anchor text and URL recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnchorAndLinkResponse'
        '401':
          description: >-
            Missing or invalid API key/signature, or an invalid or expired
            session token.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/FastApiDetailError'
        '422':
          description: A required field is missing or malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FastApiValidationError'
        '500':
          description: >-
            Unexpected error, e.g. the account or web property could not be
            resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FastApiDetailError'
components:
  schemas:
    InternalLinkRecommendationsInput:
      type: object
      required:
        - text
        - webPropertyId
      properties:
        text:
          type: string
          description: The text to analyze for internal link recommendations.
        webPropertyId:
          type: integer
          description: Web property ID used to scope recommendations.
        instructions:
          type: string
          nullable: true
          description: Optional instructions for the recommendations.
        linkExclusionUrls:
          type: array
          items:
            type: string
          nullable: true
          description: URLs to exclude from the recommendations.
        linkFilter:
          allOf:
            - $ref: '#/components/schemas/InternalLinkFilter'
          nullable: true
          description: >-
            Filter narrowing which candidate pages are eligible for
            recommendations.
        cache:
          type: boolean
          default: false
          description: Whether cached results may be used.
        promptLabel:
          type: string
          nullable: true
          description: Prompt label used for recommendation generation.
        language:
          type: string
          nullable: true
          description: Language filter for the recommendations.
    AnchorAndLinkResponse:
      type: object
      required:
        - anchorsAndUrls
        - additionalInfo
      properties:
        anchorsAndUrls:
          type: array
          items:
            $ref: '#/components/schemas/AnchorTextAndUrl'
          description: The anchor text and URL recommendations.
        chatCompletionId:
          type: string
          nullable: true
          description: The chat completion ID.
        additionalInfo:
          type: array
          items:
            $ref: '#/components/schemas/InternalLinkAdditionalInfo'
          description: Additional information for the query.
    Error:
      type: object
      description: >-
        Error envelope for failures that apply uniformly across all v4 endpoints
        (e.g. gateway-level authentication failures).
      properties:
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error description.
    FastApiDetailError:
      type: object
      description: >-
        Default error body returned by the FastAPI backends (content-generation,
        polaris-api, internal-linking-recommendations) for HTTPException-based
        errors.
      properties:
        detail:
          type: string
    FastApiValidationError:
      type: object
      description: >-
        Default request-validation error body returned by the FastAPI backends
        when the request body fails schema validation.
      properties:
        detail:
          type: array
          items:
            type: object
            properties:
              loc:
                type: array
                items:
                  type: string
              msg:
                type: string
              type:
                type: string
    InternalLinkFilter:
      type: object
      properties:
        operator:
          type: string
          enum:
            - CONTAINS
            - NOT_CONTAINS
            - STARTS_WITH
            - ENDS_WITH
            - EXACT_MATCH
            - IS_IN_PAGE_GROUP
          nullable: true
          description: The operator used to filter candidate pages.
        urlPattern:
          type: string
          nullable: true
          description: URL pattern used for filtering, applied per operator.
        pageGroupIds:
          type: array
          items:
            type: integer
          nullable: true
          description: Page group IDs used for filtering when operator is IS_IN_PAGE_GROUP.
    AnchorTextAndUrl:
      type: object
      required:
        - anchorText
        - context
        - url
        - reason
      properties:
        anchorText:
          type: string
          description: The anchor text.
        context:
          type: string
          description: The surrounding text where the anchor text is located.
        url:
          type: string
          description: The URL recommended for the anchor text.
        title:
          type: string
          nullable: true
          description: The title of the recommended link.
        reason:
          type: string
          description: The reason for the recommendation.
        chatCompletionId:
          type: string
          nullable: true
          description: The chat completion ID.
    InternalLinkAdditionalInfo:
      type: object
      properties:
        emptyResultsReason:
          type: string
          nullable: true
          enum:
            - collection_not_found
            - empty_vector_search
            - llm_rejection
            - llm_evaluation
            - exclusion_list
            - llm_rejection_and_exclusion_list
          description: The reason for empty results, if any.
        llmRejectedUrls:
          type: array
          items:
            type: string
          nullable: true
          description: The URLs rejected by the LLM.
        excludedUrls:
          type: array
          items:
            type: string
          nullable: true
          description: The URLs excluded from the recommendations by the exclusion list.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: apiKey
      description: API Key as a query parameter
    SigAuth:
      type: apiKey
      in: query
      name: sig
      description: >-
        Request signature computed using API key and secret. Valid for 5 minutes
        after creation.

````