Tenjin Phone Lookup API

The Phone Lookup API from Tenjin — 1 operation(s) for phone lookup.

GitHub OpenAPI

Operations 1

POST /api/phone-lookup Buy phone intelligence for an E.164 number #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tenjin-sh:tenjin-sh-phone-lookup-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tenjin-sh-phone-lookup-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tenjin Phone Lookup API
  version: 0.1.0
  contact:
    email: hello@tenjin.sh
  x-guidance: 'Browse and inspect tools for free on POST /api/x402-router. Execute selected tools through the installed CLI/MCP request tool or build and pay the provider request in your own HTTP client. Paid selection uses POST /api/x402-router/route. Setup: https://tenjin.sh/skills.md. Reference: https://tenjin.sh/llms-full.txt.'
  description: Tenjin is the tool router for agents. Browse tools, inspect their contracts and execute the selected tool over x402. Routing decisions have a separate charge from provider execution. Library documentation lookups are free. Start at https://tenjin.sh/llms.txt.
servers:
- url: https://tenjin.sh
tags:
- name: Phone Lookup
paths:
  /api/phone-lookup:
    post:
      operationId: phoneLookup
      summary: Buy phone intelligence for an E.164 number
      description: 'POST an E.164 number and pick a product. `product: "name"` (the default) returns the US CNAM caller name plus the carrier data; `product: "carrier"` is cheaper and returns everything except the name. The 402 quotes the product your body named and enumerates both. You are charged only on a result. The name product settles only when a caller name is on record; the carrier product settles only when the number resolves to carrier data. `phone_name_not_found` and `phone_invalid_number` both abort before settlement, as does every provider failure, so no payment moves. `phone_name_not_found` says whether carrier data exists and points at the cheaper product, but carries none of the carrier fields: handing those over would make the free error the carrier product. Caller names come from the US CNAM database, so only US numbers carry one. A non-US number still resolves carrier, line type, mobile network and rate-center location. The result is delivered EXACTLY ONCE, in the response to the request that settles. There is no redelivery: nothing about a lookup is stored, so a client that loses the response has to buy again. Keep the response.'
      security: []
      x-payment-info:
        price:
          mode: dynamic
          currency: USD
        protocols:
        - x402: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneLookupRequest'
      responses:
        '200':
          description: The lookup this payment bought.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneLookupResult'
        '400':
          description: '`validation_failed` (the number is not E.164, or `product` is not one of `name`/`carrier`), or `phone_lookup_rejected` (the provider refused the number itself). Nothing settled.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Payment Required. The PAYMENT-REQUIRED response header carries the x402 challenge (scheme `exact`, network eip155:8453, the USDC asset, the price of the product your body named + the Tenjin treasury as payTo — the data is bought from a third-party provider, so there is no creator split to pay). The JSON body is the quote and both products.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneLookupQuote'
        '404':
          description: '`phone_name_not_found` (the name product: no caller name is on record; the message says whether carrier data exists and points at the cheaper product) or `phone_invalid_number` (the number resolves to no carrier data at all). Neither charges you.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: The per-minute request limit, or `phone_lookup_abort_budget_exhausted` — too many paid lookups in a row produced no result for this payer. Both carry `Retry-After`; neither charges you.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: '`phone_lookup_upstream_error` — the provider failed, refused this deployment''s credentials, or returned a response this deployment cannot read. Nothing settled.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: '`phone_lookup_upstream_unavailable` (the provider timed out or is rate limiting this deployment — retry the same request, honouring `Retry-After`) or `phone_lookup_unavailable` (not configured on this deployment). Nothing settled.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Phone Lookup
components:
  schemas:
    Error:
      type: object
      description: Stable error envelope returned by every failing route (the `requestId` is on the `x-request-id` response header, not in the body).
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable machine code, e.g. "validation_failed", "post_not_found".
            message:
              type: string
              description: The specific problem in plain words, actionable on its own. On the discovery surfaces this names the field and the remedy rather than restating the validator.
            details:
              description: Optional structured context. On a `validation_failed` from the search and outcomes surfaces this carries the zod `fieldErrors`/`formErrors` map, plus `problems` (every issue in plain words), `example` (a minimal request that WORKS — copy it and edit), and `hint` (where the full contract lives). A caller can repair its next request from this body without reading any documentation.
          required:
          - code
          - message
      required:
      - error
    PhoneLookupResult:
      type: object
      required:
      - product
      - phoneNumber
      - valid
      description: 'A successful lookup, and the only 200 this endpoint returns: a product that produced nothing answers 404 for free instead. `callerName` is present ONLY on the "name" product — the carrier tier omits the key even when a name exists.'
      properties:
        product:
          type: string
          enum:
          - name
          - carrier
        phoneNumber:
          type: string
          description: The E.164 number you asked about, echoed back.
        valid:
          type: boolean
          description: Whether the number resolves to real carrier data.
        callerName:
          type: string
          description: The name on record in the US CNAM database. Present only on the "name" product.
        carrier:
          type:
          - string
          - 'null'
        lineType:
          type:
          - string
          - 'null'
          description: For example `mobile`, `voip`, `fixed line`, or `toll free`.
        mobileNetwork:
          type:
          - object
          - 'null'
          required:
          - mcc
          - mnc
          description: Mobile country and network codes. Null for a landline, toll-free or VoIP number, and never half-populated.
          properties:
            mcc:
              type: string
            mnc:
              type: string
        countryCode:
          type:
          - string
          - 'null'
          description: Two-letter region code.
        nationalFormat:
          type:
          - string
          - 'null'
        location:
          type: object
          description: Rate-center origin, not the subscriber address. Either field is null when the number has no LERG locality.
          properties:
            city:
              type:
              - string
              - 'null'
            state:
              type:
              - string
              - 'null'
        portedCarrier:
          type:
          - string
          - 'null'
          description: The underlying carrier for a ported number, where `carrier` is the number block’s original owner.
    PhoneLookupQuote:
      type: object
      required:
      - quoted
      - price
      - hint
      - products
      - coverage
      description: The JSON body of the 402 challenge. `quoted` is the product THIS challenge priced (from the request body, default "name"); `products` enumerates both tiers, because an agent that sees only one price cannot tell there is a cheaper one for a number whose name it does not need.
      properties:
        quoted:
          type: string
          enum:
          - name
          - carrier
        price:
          type: string
          description: Atomic USDC units (6 decimals) as a digit string. "500000" = $0.50.
        hint:
          type: string
          description: A copy-pasteable sample request body.
        products:
          type: object
          description: Keyed by product name.
          additionalProperties:
            type: object
            required:
            - price
            - chargedWhen
            - returns
            properties:
              price:
                type: string
                description: Atomic USDC units (6 decimals) as a digit string. "500000" = $0.50.
              chargedWhen:
                type: string
                description: When this product settles, and when it costs nothing.
              returns:
                type: array
                items:
                  type: string
                description: The response fields this product returns.
        coverage:
          type: string
          description: Which numbers carry a caller name in practice.
    PhoneLookupRequest:
      type: object
      properties:
        phoneNumber:
          type: string
          pattern: ^\+[1-9][0-9]{7,14}$
          description: 'The phone number to identify, in E.164 form: a leading + followed by 8 to 15 digits (for example "+13129457420").'
        product:
          default: name
          description: Which product to buy. "name" (the default) returns the CNAM caller name plus the carrier data and is charged only when a name is found. "carrier" is cheaper, omits the name entirely, and is charged only when the number is valid. Caller names exist for US numbers only, so a non-US number should buy "carrier".
          type: string
          enum:
          - name
          - carrier
      required:
      - phoneNumber
      additionalProperties: false