Adding custom html elements via API from APP

Hi,
I’m trying to add custom HTML to the product page via API. Working good
but I’ve faced with the problem that themes are different and I can’t know all positions of elements

for example, I need to add HTML right after the product title on the product page and in the catalog product listing

and I’m wondering if there some rules that can help me define where are these elements?
maybe some class that will be there in all themes
I’m trying to find some regularity that will help me to find these elements on all themes
and I can parse HTML and insert it there

hello

you can work with Xpath it’s easy and will give you the right position of the elements

so I can find some liquid variable {{ product.title }} and see in what element it wrapped?
but there can be not one variable

yeah this is why XPath better or contact me with your store link to check it

for example, product page:

https://www.pastamanufaktur.de/products/quadri-mit-barlauchfullung

you should make your API works with all themes