I don't use Paragraphs but I've been doing a lot of work with JSON:API recently.
As noted by @unusedspoon, there are examples in the documentation.
However, using what core provides by default leads to really long queries that aren't much fun to work with.
Automatically include entity references
Install JSON:API Extras module and go to /admin/config/services/jsonapi/resource_types/
. Select the resource type (entity bundle) you want to automatically include entity references for. Scroll down to the bottom and edit the Default include list.
Note that you can include multiple levels of entity references (for example, to include the file of a media entity: field_media_audio.file
).
As noted in the UI, if you attach an include
query string parameter, the default includes will be ignored, so this lets you set useful defaults but then override when necessary.
Merge entity reference info with the referencing entity
By default, JSON:API returns the entity references separately from the referencing entity. This might be useful for some people but I find it annoying because I want to access my entity reference data like myEntity.myEntityReferenceField.value
. To get this behavior, you can install the JSON:API Include module.