How to get all downloadable links details from the Downloadable Product Magento 2?

Magento 2 has a native Downloadable product to support all of that product that you can deliver as a file, video, music, ebook, software-related data. You can download/purchase the product from the product detail page.

All the links related to Downloadable items will be stored in the Database table name downloadable_link. The table contains the field of product_id, no. of downloads, link_url, link_file, type of link, sample file, and type.

Retrieve all the List of links with associated samples using the interface, Magento\Downloadable\Api\LinkRepositoryInterface with the product SKU as a parameter inside the getList($sku) method.

Call method with item SKU,

Using the above reference code, You can retrieve the list of links with associated samples of downloadable items.

You can get a list of samples for a downloadable product

You can also retrieve all the Downloadable links by the Downloadable Extension attributes value