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
/api/users
Retrieve a list of users with optional filtering and pagination.
Query Parameters
pubkey
Filter by public key (partial match)name
Filter by name (partial match)displayName
Filter by display name (partial match)limit
Number of results (1-100, default: 10)offset
Number of results to skip (default: 0)Example Request
GET /api/users?name=alice&limit=5&offset=10
/api/users/:pubkey
Retrieve a specific user by their public key (hex or npub format).
Path Parameters
pubkey
User'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" }