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

# Lookup a phone number

> Retrieve detailed information about a phone number including carrier data, line type, and portability status.



## OpenAPI

````yaml get /v2/lookup/{phone_number}
openapi: 3.1.0
info:
  title: Prelude API
  version: 2.0.0
  description: The Prelude API allows you to send messages to your users.
  contact:
    email: support@prelude.so
servers:
  - url: https://api.prelude.dev
    description: Production server
security:
  - apiToken: []
tags:
  - name: Notify
    description: Send transactional and marketing messages with compliance enforcement.
  - name: Transactional
    description: Send transactional messages (deprecated - use Notify API instead).
  - name: Verify
    description: Verify phone numbers.
  - name: Watch
    description: Evaluate email addresses and phone numbers for trustworthiness.
  - name: Lookup
    description: >-
      Retrieve detailed information about a phone number including carrier data,
      line type, and portability status.
paths:
  /v2/lookup/{phone_number}:
    get:
      tags:
        - Lookup
      summary: Lookup a phone number
      description: >-
        Retrieve detailed information about a phone number including carrier
        data, line type, and portability status.
      operationId: lookup
      parameters:
        - name: type
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - cnam
          description: |
            Optional features. Possible values are:
              * `cnam` - Retrieve CNAM (Caller ID Name) along with other information. Contact us if you need to use this functionality.
        - name: phone_number
          in: path
          required: true
          schema:
            type: string
            format: phone_number
            description: An E.164 formatted phone number to look up.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupResponse'
        '400':
          description: KO
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    LookupResponse:
      type: object
      properties:
        phone_number:
          type: string
          description: The phone number.
          examples:
            - +33**********
        country_code:
          type: string
          description: The country code of the phone number.
          examples:
            - FR
        network_info:
          type: object
          description: The current carrier information.
          properties:
            carrier_name:
              type: string
              description: The name of the carrier.
              examples:
                - SFR
            mcc:
              type: string
              description: Mobile Country Code.
              examples:
                - '208'
            mnc:
              type: string
              description: Mobile Network Code.
              examples:
                - '13'
        original_network_info:
          type: object
          description: The original carrier information.
          properties:
            carrier_name:
              type: string
              description: The name of the original carrier.
              examples:
                - Orange
            mcc:
              type: string
              description: Mobile Country Code.
              examples:
                - '208'
            mnc:
              type: string
              description: Mobile Network Code.
              examples:
                - '13'
        flags:
          type: array
          description: |
            A list of flags associated with the phone number.
              * `ported` - Indicates the phone number has been transferred from one carrier to another.
              * `temporary` - Indicates the phone number is likely a temporary or virtual number, often used for verification services or burner phones.
          items:
            type: string
            enum:
              - ported
              - temporary
        caller_name:
          type: string
          description: >-
            The CNAM (Caller ID Name) associated with the phone number. Contact
            us if you need to use this functionality. Once enabled, put `cnam`
            option to `type` query parameter.
          examples:
            - FINN
        line_type:
          type: string
          examples:
            - mobile
          enum:
            - calling_cards
            - fixed_line
            - isp
            - local_rate
            - mobile
            - other
            - pager
            - payphone
            - premium_rate
            - satellite
            - service
            - shared_cost
            - short_codes_commercial
            - toll_free
            - universal_access
            - unknown
            - vpn
            - voice_mail
            - voip
          description: |
            The type of phone line.
              * `calling_cards` - Numbers that are associated with providers of pre-paid domestic and international calling cards.
              * `fixed_line` - Landline phone numbers.
              * `isp` - Numbers reserved for Internet Service Providers.
              * `local_rate` - Numbers that can be assigned non-geographically.
              * `mobile` - Mobile phone numbers.
              * `other` - Other types of services.
              * `pager` - Number ranges specifically allocated to paging devices.
              * `payphone` - Allocated numbers for payphone kiosks in some countries.
              * `premium_rate` - Landline numbers where the calling party pays more than standard.
              * `satellite` - Satellite phone numbers.
              * `service` - Automated applications.
              * `shared_cost` - Specific landline ranges where the cost of making the call is shared between the calling and called party.
              * `short_codes_commercial` - Short codes are memorable, easy-to-use numbers, like the UK's NHS 111, often sold to businesses. Not available in all countries.
              * `toll_free` - Number where the called party pays for the cost of the call not the calling party.
              * `universal_access` - Number ranges reserved for Universal Access initiatives.
              * `unknown` - Unknown phone number type.
              * `vpn` - Numbers are used exclusively within a private telecommunications network, connecting the operator's terminals internally and not accessible via the public telephone network.
              * `voice_mail` - A specific category of Interactive Voice Response (IVR) services.
              * `voip` - Specific ranges for providers of VoIP services to allow incoming calls from the regular telephony network.
    Error:
      type: object
      properties:
        code:
          type: string
          description: The error code.
          examples:
            - invalid_phone_number
        message:
          type: string
          examples:
            - >-
              The provided phone number is invalid. Provide a valid E.164 phone
              number.
          description: A human-readable message describing the error.
        type:
          type: string
          examples:
            - bad_request
          description: The error type.
        request_id:
          type: string
          examples:
            - 3d19215e-2991-4a05-a41a-527314e6ff6a
          description: >-
            A string that identifies this specific request. Report it back to us
            to help us diagnose your issues.
      required:
        - code
        - message
        - type
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer

````