The answer depends on several factors, such as the type of data, the structure of the data, the data container, and so on. In general terms, you are seeking information on how AEM can be utilized in a Headless manner. You could also consider exploring:
- AEM Content Services (Sling Model Exporter)
- Content Fragment Models via GraphQL
- If they are assets, you can utilize the Assets API
I recommend reading through these documents, which provide examples of the suggestions mentioned above:
- https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/o...
- https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/admin/mac-ap...
- https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/development/develop-slin...
Esteban Bustamante