# Why should I use include?

**URL:** <https://discuss.jsonapi.org/t/why-should-i-use-include/975>\
**Category:** Uncategorized\
**Created:** [April 27, 2017, 9:47am UTC](https://discuss.jsonapi.org/t/why-should-i-use-include/975 "2017-04-27T09:47:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KamiKillerto](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/kamikillerto/32/399_2.png) [@KamiKillerto](https://discuss.jsonapi.org/u/KamiKillerto)\
**Post date:** [April 27, 2017, 9:47am UTC](https://discuss.jsonapi.org/t/why-should-i-use-include/975/1 "2017-04-27T09:47:49Z")

</div>

Hi,

I’m currently building an API following the jsonApi spec and I’m struggle with the include keyword.  
What’s the differences between getting related ressources using the include keyword and getting related related ressources following the relationships links.

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/steveklabnik/32/2_2.png) [@steveklabnik](https://discuss.jsonapi.org/u/steveklabnik)\
**Post date:** [April 27, 2017, 12:49pm UTC](https://discuss.jsonapi.org/t/why-should-i-use-include/975/2 "2017-04-27T12:49:43Z")

</div>

The basic tradeoff is:

- If you use include, you only make one request, but your response is  
bigger.
- If you don’t use include, you make multiple requests, but each response  
is smaller.

Whichever is better is up to you, and may even vary within a single  
application!

Hope that helps.

---

<div class="post-metadata">

**Author:** ![KamiKillerto](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/kamikillerto/32/399_2.png) [@KamiKillerto](https://discuss.jsonapi.org/u/KamiKillerto)\
**Post date:** [April 27, 2017, 1:49pm UTC](https://discuss.jsonapi.org/t/why-should-i-use-include/975/3 "2017-04-27T13:49:12Z")

</div>

That helps ^^, thanks a lot.
