How Can I get data from another Website | Community
Skip to main content
Ricky99999
November 2, 2017
Solved

How Can I get data from another Website

  • November 2, 2017
  • 5 replies
  • 2564 views

Hi Team

     How can get data from  another site (Suppose in my site i want to display product price and i will get price from xyz.com site. So how can i inject it into my website )

Thanks for your suggestions 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by VeenaVikraman

It entirely depends on how that data is exposed to you to consume. It could be a restful service or an XML or any format the other site and your client agrees upon ? Totally depends on how the other website is exposing its data. You have to talk to them and agree upon how the data should be exposed for your client. Most of the time secure data wont be publicly available and there could be some kind of authentication like Oauth in place.

5 replies

manoj_devapath
November 2, 2017

If the requirement is to capture from HTML of the third party site XYZ.com you can use using JSOUP API. 

there is community article on how to use JSOUP API

Adobe Experience Manager Help | Creating a HTML Parser Service for Adobe Experience Manager

If you are planning to capture from using HTTP operations then you can use Apache HTTP APIs

there is community article on how perform HTTP operations

Adobe Experience Manager Help | Invoking Adobe Experience Manager Sling Servlets using Apache HTTP APIs

Adobe Experience Manager Help | Creating Adobe Experience Manager bundles that invoke third party Restful web services

VeenaVikraman
Community Advisor
VeenaVikramanCommunity AdvisorAccepted solution
Community Advisor
November 2, 2017

It entirely depends on how that data is exposed to you to consume. It could be a restful service or an XML or any format the other site and your client agrees upon ? Totally depends on how the other website is exposing its data. You have to talk to them and agree upon how the data should be exposed for your client. Most of the time secure data wont be publicly available and there could be some kind of authentication like Oauth in place.

manoj_devapath
November 2, 2017

Agreed!  either way above articles should help you to read  values restful services

for more check  org.apache.commons.httpclient (HttpClient 3.1 API)

smacdonald2008
November 2, 2017

Many ways - if the other site exposes a Restful service  - write an AEM component that can consume a Restful service and display in a component - see Scott's Digital Community: Creating an AEM HTML Template Language Component that displays data from a Restful Web Servic… .

smacdonald2008
November 2, 2017

If the other site exposes a SOAP Stack - once again - you can write an AEM component that can consume the SOAP Stack and display data  -- Scott's Digital Community: Creating an AEM HTML Template Language Component that displays data from a SOAP Web Service