Designing a REST API That Developers Actually Like Using I've consumed hundreds of APIs. The good ones share these patterns. The bad ones make me want to quit coding. 1. Consistent Response Format // ✅ GOOD: Every response has the same structure { "data" : { ... }, "meta" : { "request_id" : "req_abc123" , "timestamp" : "2026-05-16T01:00:00Z" } } // ❌ BAD: Inconsistent formats // Sometimes: { "user" : { ... } } // Other times: { "result" : { ... } } // Errors: { "error" : true , "message" : "..." } Enter fullscreen mode Exit fullscreen mode Why: One parser handles every response. No guessing. 2. Pagination That Doesn't Suck // ✅ GOOD: Cursor-based pagination (for large datasets) GET /api/users?limit= 20 &cursor=eyJpZCI 6 MTAwfQ { "data" : [ ... ], "pagination" : { "cursor" : "eyJpZCI6MTIwfQ" , // Pass this for next page "has_more" : true , "count" : 20 } } // ✅ ALSO GOOD: Offset-based (for small datasets) GET /api/users?page= 2 &limit= 20 { "data" : [ ...…