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

# Search by name

> Accounts whose username or display name contains `name`. Answering `200` takes 1 search.

Accounts whose username or display name contains `name`, up to 20, best first. `resolvedId` is the ID of the account whose username is **exactly** `name`, if there is one. Takes **1 search** from your quota.

Then run [`GET /v1/profile/{id}`](https://docs.dis.dog/api-reference/endpoints/profile) or [`GET /v1/servers/{id}`](https://docs.dis.dog/api-reference/endpoints/servers) on the ID you want, or simply [search](https://docs.dis.dog/api-reference/endpoints/search.md) the username: it does both at once.


## OpenAPI

````yaml GET /v1/lookup/{name}
openapi: 3.1.0
info:
  title: dis.dog API
  version: 1.0.0
  description: >-
    Discord OSINT from one key. Look up a Discord ID, a username or an invite
    and get the profile, the servers it has been seen in, its message logs, and
    the linked Roblox and guns.lol accounts. Your access key authenticates both
    the website and this API.


    **Base URL** `https://api.dis.dog`  

    **Auth** send your key as `Authorization: Bearer DD-...` (or `X-API-Key:
    DD-...`).  

    The API is included with the **Hound** and **Alpha** plans. On the free plan
    only `/v1/me` and `/v1/modules` answer; every other endpoint returns `403
    plan_has_no_api`.
servers:
  - url: https://api.dis.dog
security:
  - bearerAuth: []
paths:
  /v1/lookup/{name}:
    get:
      tags:
        - Search
      summary: Lookup by name
      description: >-
        Accounts whose username or display name matches, best first. Counts as
        one search.
      parameters:
        - name: name
          in: path
          required: true
          description: Username or display name (2–64 characters, leading @ optional).
          schema:
            type: string
            example: nelly
      responses:
        '200':
          description: Matches
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupResult'
        '400':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
components:
  schemas:
    LookupResult:
      type: object
      properties:
        query:
          type: string
        resolvedId:
          type:
            - string
            - 'null'
          description: Set when one match is an exact hit.
        matches:
          type: array
          items:
            $ref: '#/components/schemas/NameMatch'
    NameMatch:
      type: object
      properties:
        id:
          type: string
        username:
          type: string
        displayName:
          type:
            - string
            - 'null'
        avatarUrl:
          type:
            - string
            - 'null'
        serverCount:
          type:
            - integer
            - 'null'
        lastSeenAt:
          type:
            - string
            - 'null'
          format: date-time
    Error:
      type: object
      required:
        - error
      description: >-
        Every error is a flat object with an `error` code. Some add fields (for
        example `retryAfterMs` on `rate_limited`).
      properties:
        error:
          type: string
          example: plan_has_no_api
          enum:
            - invalid_request
            - invalid_id
            - invalid_name
            - invalid_invite
            - unauthorized
            - invalid_api_key
            - plan_has_no_api
            - user_not_found
            - invite_not_found
            - not_available
            - removed_by_owner
            - rate_limited
            - quota_exceeded
            - module_unavailable
            - upstream_unavailable
            - upstream_busy
            - not_found
        retryAfterMs:
          type: integer
          description: 'On `rate_limited`: wait this long before retrying.'
          example: 2000
  responses:
    Error:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your access key, `DD-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX`. The same key is
        your website login. Keep it server-side.

````

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