[Google Search API] Return AMP links returned in mobile search results
A customer reached out and requested we return the AMP (Accelerated Mobile Pages) links, a Google-backed project designed to improve the performance of web pages on mobile devices (ref), in the Google Search Results JSON for mobile searches.
Google:
Link (Most be loaded as mobile):
https://www.google.com/search?q=amp+page+list&oq=a&gs_lcrp=EgZjaHJvbWUqBggAEEUYOzIGCAAQRRg7MgYIARBFGDkyBggCEEUYPDIGCAMQRRg8MgYIBBBFGDwyBggFEEUYPDIGCAYQRRg8MgYIBxBFGEHSAQgyNzE3ajBqMagCALACAQ&sourceid=chrome&ie=UTF-8&sei=8VqhZ62fEsHF0PEPmZ2B0Qk
SerpApi:
https://serpapi.com/playground?q=amp+page+list&location=Austin%2C+Texas%2C+United+States&gl=us&hl=en&device=mobile&no_cache=true&google_domain=google.com&newPara=stick+highlight+lr+as_qdr+safe+google_domain+si+form+filter+chips+as_epq+client+votes+site+ie+oe+pws+ibp+source+as_sitesearch+ijn+rlz+interval+size+color+maxPrice+as_dt+direct_link
The customer provided some extra detail on the differences between data-amp and data-amp-cur here in Intercom.
Basically data-amp is the AMP URL. data-amp-cur is the non-AMP URL and should generally be the same as the href.
It's worth reading the full message for the additional context they provided.
We now parse amp_link: