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

# IP → Company

> Identify the company or organization behind an IP address.

Provide an IPv4 or IPv6 `ip_address`. Returns the candidate company domains with their match percentages. When no traffic-share breakdown is available, one domain is returned with `percentage` `"1.0"`.

**Billing:** 1 credit per successful lookup (HTTP 200), regardless of how many companies are returned. Misses (404) and request errors (4xx) are not billed.



## OpenAPI

````yaml POST /api/v1/ip_to_company
openapi: 3.0.1
info:
  title: Retention API
  version: v1
  description: Retention.com identity & data resolution APIs.
servers:
  - url: https://api.rb2b.com
security: []
tags:
  - name: Identity
    description: >-
      Core Identity. Resolve a hashed email (or batch) into a shaped person
      profile.
paths:
  /api/v1/ip_to_company:
    post:
      tags:
        - IP
      summary: IP → Company
      description: >-
        Identify the company or organization behind an IP address.


        Provide an IPv4 or IPv6 `ip_address`. Returns the candidate company
        domains with their match percentages. When no traffic-share breakdown is
        available, one domain is returned with `percentage` `"1.0"`.


        **Billing:** 1 credit per successful lookup (HTTP 200), regardless of
        how many companies are returned. Misses (404) and request errors (4xx)
        are not billed.
      operationId: ipToCompany
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - ip_address
              properties:
                ip_address:
                  type: string
                  description: IPv4 or IPv6 address to resolve.
                  example: 203.0.113.42
        required: true
      responses:
        '200':
          description: Company found (1 credit charged)
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                properties:
                  results:
                    type: array
                    description: Candidate companies resolved for the supplied IP.
                    items:
                      type: object
                      properties:
                        domain:
                          type: string
                          nullable: true
                          description: >-
                            Company website domain. Can be `null` when no domain
                            is known.
                          example: acme.com
                        percentage:
                          oneOf:
                            - type: number
                            - type: string
                          description: >-
                            Share of traffic from this IP attributed to the
                            company. A number (e.g. `0.9`) when a traffic-share
                            breakdown is available; the string `"1.0"` when it
                            is not.
                          example: 0.9
        '400':
          description: Missing or invalid IP
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    enum:
                      - missing ip_address
                      - invalid ip_address
                      - unexpected error
                    description: >-
                      `missing ip_address`: no `ip_address` was provided.
                      `invalid ip_address`: the value is not a valid IPv4 or
                      IPv6 address. `unexpected error`: temporary error; safe to
                      retry.
        '401':
          description: Missing, malformed, or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsufficientCreditsError'
        '403':
          description: Service not enabled for this API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceDisabledError'
        '404':
          description: No company found (not billed)
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                properties:
                  results:
                    nullable: true
                    description: Always `null`; no company resolved for the supplied IP.
      security:
        - api_key: []
components:
  schemas:
    AuthError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - missing_api_key
            - invalid_api_key_format
            - invalid_api_key
          description: >-
            `missing_api_key`: no key supplied. `invalid_api_key_format`: key
            does not match the expected format. `invalid_api_key`: key does not
            belong to any account.
    InsufficientCreditsError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - insufficient_api_credits
        required:
          type: string
          description: Credits needed for this request.
          example: '1.0'
        remaining:
          type: string
          description: Credits currently remaining on the account.
          example: '0.0'
    ServiceDisabledError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - service_unavailable_for_key
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Per-account API key. Also accepted as `Api-Key` or `Authorization:
        Bearer <key>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.