Overview

The Nostr Profiles API provides access to user profile data from the Nostr network. All endpoints return JSON responses and support CORS for cross-origin requests.

Base URL

https://profilestr.com/api

Rate Limiting

100 requests per minute per IP

Response Format

All responses are JSON

CORS

Enabled for all origins

Authentication

Currently, the API is public and does not require authentication. All endpoints are accessible without API keys.

Future Plans

API key authentication may be added in the future for higher rate limits and additional features.

Endpoints

GET/api/users

Retrieve a list of users with optional filtering and pagination.

Query Parameters

pubkeyFilter by public key (partial match)
nameFilter by name (partial match)
displayNameFilter by display name (partial match)
limitNumber of results (1-100, default: 10)
offsetNumber of results to skip (default: 0)

Example Request

GET /api/users?name=alice&limit=5&offset=10
GET/api/users/:pubkey

Retrieve a specific user by their public key (hex or npub format).

Path Parameters

pubkeyUser's public key (hex or npub format)

Example Request

GET /api/users/npub1abc123...

Data Types

User Object

id

string (UUID)

pubkey

string (hex)

name

string | null

displayName

string | null

about

string | null

picture

string | null

nip05

string | null

lud16

string | null

followersCount

number

followsCount

number

noteCount

number

zapCount

number

Examples

Get Top Users

curl "https://profilestr.com/api/users?limit=10"

Returns the top 10 users by follower count

Search Users

curl "https://profilestr.com/api/users?name=alice&displayName=developer"

Search for users with "alice" in name and "developer" in display name

Get Specific User

curl "https://profilestr.com/api/users/npub1abc123..."

Get a specific user by their npub

Error Handling

400 Bad Request

Invalid query parameters or malformed request

{ "error": "Invalid query parameters" }

404 Not Found

User not found or endpoint doesn't exist

{ "error": "User not found" }

500 Internal Server Error

Server error or database connection issue

{ "error": "Internal server error" }