-1

I am trying to integrate AlchemyAPI into my c++ project and I'm a little lost regarding where to start. I downloaded the API, obtained the key. The readme file has Unix installation instructions on running the autobuild.sh script then configure and make and make install. I have cygwin installed, I installed autoconf for windows. I'm just guessing there must be a more straightforward way to use AlchemyAPI c++ on windows.

Tamer
  • 876
  • 2
  • 10
  • 22

1 Answers1

0

There's two ways to go about this that are probably a lot easier than what you're trying to do:

  1. Using the C# SDK that AlchemyAPI provides, build it, reference it, and call it from your solution.
  2. Bypass the SDKs all together, hitting the API directly by building your own URLs and data strings for HTTP GETs or POSTs (x-www-form-urlencoded) and submitting them using a popular C++ HTTP implementation. (This is all the SDK is really doing anyway.)

An example URL that you could use to build your own interface might be this one (enter your API key to view it in your browser):

http://access.alchemyapi.com/calls/url/URLGetRankedNamedEntities?apikey=YOUR_API_KEY&url=http://www.cnn.com/2011/09/28/us/massachusetts-pentagon-plot-arrest/index.html?hpt=hp_t1&sentiment=1

If you want to parse the results in XML, you can use libxml, and AlchemyAPI's C++ SDK can provide you with an example. If you want to parse the results as JSON, then add 'outputMode=json' to the request and use your favorite JSON parser.

There's more information in the documentation on all of the features and how to implement them in your requests:

http://www.alchemyapi.com/api/