📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials API Design URL Design

URL Design

5 min read Quiz at the end
Design clean URLs: plural nouns, nested max 2 levels, query params for filters, versioning from day one.

URL Design Best Practices

# Nouns not verbs
BAD:  GET /getUser   POST /createPost
GOOD: GET /users     POST /posts

# Plural resources
GET /users        # collection
GET /users/42     # single resource

# Nested (max 2 levels)
GET /users/42/posts
GET /posts/7/comments

# Query params for filtering, sorting, pagination
GET /posts?status=published&sort=-created_at&page=2&limit=20

# Versioning
GET /api/v1/users
Topic Quiz · 1 questions

Test your understanding before moving on

1. Which URL design follows REST best practices?
💡 Use plural nouns (/users) not verbs (/getUsers) or singular (/user) for REST resource collections.