---
title: "Search User"
method: GET
path: "/api/friends/search/{user_id}"
tags: ["friends"]
---

# Search User

`GET /api/friends/search/{user_id}`

Search for a user by ID and check if already friends.

Args:
    user_id: ID of the user to search for
    allow_self_search: If true, allow looking up the authenticated user by their own ID
    current_user: Current authenticated user from dependency

Returns:
    Dict with user info and friendship status

## Path parameters

- `user_id` string, required

## Query parameters

- `allow_self_search` boolean — When true, searching for your own user ID returns your profile instead of an error.

## Headers

- `x-user-id` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/usecreed/apis/creed-api.md) · [All operations](https://skmtc.net/usecreed/apis/creed-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usecreed/creed-api/versions/523833f9e819/schema)
