Alchemy API is used to analyze content of URLs which are targeted for ads. It returns certain keywords that are relevant to the specified URL. For each keyword a relevance parameter and a sentiment score is returned.
Data is requested in XML format, via a CURL call to their API. The obtained response is processed as per the analysis algorithm. The entire functionality runs in background. Alchemy has limit of 1000 API calls within a 24 hour period. The limit is tracked and URLs are not reprocessed multiple times if they have been recently processed.
XML output from Alchemy API is in the below format.