How do you use the Element API plugin to output Matrix blocks for an entry?
Totally possible. Just loop through the blocks and add whatever data you want from them to the response array:

'transformer' =&gt; function(EntryModel $entry) {
    // Create an array of all the "Body" Matrix field's blocks
    $bodyBlocks = [];
    foreach ($entry-&gt;body as $block) {
        switch ($block-&gt;type-&gt;handle) {
            case 'text':
                $bodyBlocks[] = [
                    'text' =&gt; $block-&gt;myRichTextField-&gt;getParsedContent(),
                ];
                break;
            case 'image':
                $image = $block-&gt;myAssetsField-&gt;first();
                $bodyBlocks[] = [
                    'image' =&gt; $image ? $image-&gt;getUrl(['width' =&gt; 500]),
                    'caption' =&gt; $block-&gt;myPlainTextField,
                ];
                break;
        }
    }

    return [
        'title' =&gt; $entry-&gt;title,
        'url' =&gt; $entry-&gt;url,
        'description' =&gt; (string) $entry-&gt;description,
        'body' =&gt; $bodyBlocks
    ];
},


Each of the elements in that sub-array will be MatrixBlockModel objects.