Prompt
What should I use for normalized data API?
Latest observation
Oct 8, 2026
OpenAI APIWeb search: off
If you’re building a normalized-data API (i.e., an API over relational/linked data where entities are separated and referenced by IDs), the best choice depends on what you mean by “use.”
Good default choices
1. REST + JSON
Best if you want:
- broad compatibility
- simple caching
- easy debugging
- standard HTTP semantics
Typical pattern:
/users/1/posts/10/posts/10/comments
For normalized data, REST works well when:
- each entity has its own endpoint
- nested relationships are represented by IDs or links
- clients fetch what they need
2. GraphQL
Best if you want:
- clients to request exactly the fields they need
- fewer over/under-fetching issues
- strong fit for normalized client-side caches
GraphQL is especially good when:
- your frontend has many related entities
- you want one endpoint for all data access
- you expect evolving client data needs
3. JSON:API
Best if you want:
- a standardized REST-like format
- built-in support for relationships
- clear conventions for normalized resources
JSON:API is often a great fit for normalized APIs because it explicitly models:
dataincluded- relationships by ID
- resource objects with
typeandid
Example:
{
"data": {
"type": "posts",
"id": "1",
"attributes": {
"title": "Hello"
},
"relationships": {
"author": {
"data": { "type": "users", "id": "5" }
}
}
}
}
My recommendation
- Use REST/JSON if you want simplicity and broad support.
- Use GraphQL if the client needs flexible, efficient querying.
- Use JSON:API if you want a strong standard for normalized resource structures.
If you mean client-side normalized state management
If your question is about storing API data in a normalized way on the frontend, common choices are:
- Redux Toolkit Query
- Apollo Client (GraphQL)
- TanStack Query + manual normalization if needed
If you want, I can recommend the best option for your specific stack (e.g. React, Node, Python, mobile, etc.).