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

# Search Buyable Domains

> Check availability and yearly price for domains matching a query. Requires API key with domain:read permission.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/domains/purchase/search
openapi: 3.1.0
info:
  title: Migma.ai API (v1)
  description: >-
    API for managing brands, contacts, email generation, sending, and
    integrations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.migma.ai
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Projects/Brands
    description: Manage projects (brands) and import from websites
  - name: Contacts
    description: Manage your contacts, segments, tags, and topics
  - name: Segments
    description: Create and manage dynamic contact segments
  - name: Tags
    description: Organize contacts with tags
  - name: Topics
    description: Manage subscription topics and preferences
  - name: Emails
    description: Generate, send, and export emails
  - name: Email Validation
    description: Validate email content for compatibility and deliverability
  - name: Email Previews
    description: Preview emails across devices and email clients
  - name: Domains
    description: Manage sending domains and verification
  - name: Webhooks
    description: Manage webhook endpoints for real-time event notifications
  - name: Events
    description: Record customer events and conversions
  - name: Integrations
    description: Third-party platform integrations
  - name: Campaigns
    description: Create, schedule, send, and manage email campaigns
  - name: Billing
    description: View your plan and credits and create billing links
  - name: Project Editing
    description: Edit project assets, logos, images, and knowledge base entries
paths:
  /v1/domains/purchase/search:
    get:
      tags:
        - Domains
      summary: Search Buyable Domains
      description: >-
        Check availability and yearly price for domains matching a query.
        Requires API key with domain:read permission.
      operationId: SearchBuyableDomains
      parameters:
        - name: q
          in: query
          description: Domain or keyword to search, e.g. 'acme' or 'acme.com'
          required: true
          schema:
            type: string
            minLength: 2
            maxLength: 120
        - name: limit
          in: query
          description: Maximum number of quotes to return
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 20
            default: 8
      responses:
        '200':
          description: Domain availability and pricing quotes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseDomainPurchaseSearch'
              example:
                success: true
                data:
                  quotes:
                    - rootDomain: acme.com
                      tld: com
                      available: false
                      supported: true
                    - rootDomain: acme.io
                      tld: io
                      available: true
                      supported: true
                      premium: false
                      sellPrice: 48
                      currency: USD
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    ApiResponseDomainPurchaseSearch:
      allOf:
        - $ref: '#/components/schemas/ApiResponse'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/DomainPurchaseSearchData'
    ApiResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          nullable: true
        error:
          type: string
          nullable: true
      required:
        - success
    DomainPurchaseSearchData:
      type: object
      properties:
        quotes:
          type: array
          items:
            $ref: '#/components/schemas/DomainPurchaseQuote'
      required:
        - quotes
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: string
        code:
          type: string
          description: >-
            Machine-readable error code (e.g., IDEMPOTENCY_CONFLICT,
            DOMAIN_CLAIMABLE).
        data:
          type: object
          description: >-
            Additional structured context for the error, such as the affected
            domain.
          additionalProperties: true
      required:
        - success
        - error
    DomainPurchaseQuote:
      type: object
      properties:
        rootDomain:
          type: string
          description: The full domain, e.g. 'acme.com'
        tld:
          type: string
          description: The top-level domain, e.g. 'com'
        available:
          type: boolean
          description: Whether the domain is available to register
        supported:
          type: boolean
          description: Whether Migma supports registering this TLD
        premium:
          type: boolean
          description: Whether the registry marks this domain as premium
        sellPrice:
          type: number
          description: Yearly registration price
        currency:
          type: string
          description: Currency for sellPrice, e.g. 'USD'
      required:
        - rootDomain
        - tld
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden - Missing required permissions or access denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where
        YOUR_API_KEY is obtained from the Migma dashboard under Settings →
        Developers → API Keys.

````