YQL is an HTTP-based protocol. There are plenty of examples of using HTTP in Delphi. Here is one using Indy's TIdHTTP
component to send Yahoo's example YQL query:
var
YqlQuery: string;
YqlResult: string;
YqlResultCharset: string;
YqlResultFormat: string;
Url: string;
begin
YqlQuery := 'select * from geo.places where text="sunnyvale, ca"';
YqlResultCharset := 'iso-8859-1'; // any valid IANA charset. YQL defaults to UTF-8
YqlResultFormat := 'xml'; // can be either xml or json
IdHTTP1.Request.ContentType := 'text/html';
IdHTTP1.Request.Charset := YqlResultCharset;
Url := 'http://query.yahooapis.com/v1/public/yql?q=' + TIdURI.ParamsEncode(YqlQuery) + '&format=' + YqlResultFormat;
{
Alternatively:
IdHTTP1.Request.ContentType := '';
IdHTTP1.Request.Charset := '';
Url := 'http://query.yahooapis.com/v1/public/yql?q=' + TIdURI.ParamsEncode(YqlQuery + ' and charset="' + YqlResultCharset + '"') + '&format=' + YqlResultFormat;
}
YqlResult := IdHTTP1.Get(Url);
// parse YqlResult as needed...
end;
Refer the Yahoo's documentation for more details.