There is a REST API endpoint at https://en.wikipedia.org/api/rest_v1/#/Page%20content/getContent-references that extracts references from a page (either from the current or an old revision). This was implemented for the mobile skin and/or mobile apps.
To do:
- Make sure our extension does not break this API.
- We might need to expand this API, so users can see which references belong to each other (which is a sub of which) in the API's JSON response. This might need consultation with the WMF team originally responsible for the implementation.