---
title: "Get user by id"
method: GET
path: "/public/randomusers/{userId}"
tags: ["📢 Public APIs"]
---

# Get user by id

`GET /public/randomusers/{userId}`

The API endpoint retrieves a user based on the specified ID.

When accessing this endpoint and providing a valid user ID as a parameter, you will receive a response containing the details of the user matching the provided ID.

## Response `200`

Get user by id

- object
  - `data` object
    - `cell` string
    - `dob` object
      - `age` number
      - `date` string
    - `email` string
    - `gender` string
    - `id` number
    - `location` object
      - `city` string
      - `coordinates` object
        - `latitude` string
        - `longitude` string
      - `country` string
      - `postcode` string
      - `state` string
      - `street` object
        - `name` string
        - `number` number
      - `timezone` object
        - `description` string
        - `offset` string
    - `login` object
      - `md5` string
      - `password` string
      - `salt` string
      - `sha1` string
      - `sha256` string
      - `username` string
      - `uuid` string
    - `name` object
      - `first` string
      - `last` string
      - `title` string
    - `nat` string
    - `phone` string
    - `picture` object
      - `large` string
      - `medium` string
      - `thumbnail` string
    - `registered` object
      - `age` number
      - `date` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/versions/a9f3a290e4dc/schema)
