Im trying to retrieve data from an import.io 'connector' API.
Basically, i've trained the extractor to the structure of a given website, and I want to import the data from within R using this approach: 1) Retrieve the Json results from the API 2) Save each query-result into a given dataframe
My plan was to use RCurl for querying the API-link: https://api.import.io/store/connector/9128b4e0-9ae2-4232-b202-c1e8766ed01f/_query?input=webpage/url:[ENCODED URL]&&_apikey=[API-KEY]
require(Rcurl)
Raw.Data <- curl::curl(url = "https://api.import.io/store/connector/9128b4e0-9ae2-4232-b202-c1e8766ed01f/_query?input=webpage/url:[ENCODED URL]&&_apikey=[API-KEY]")
And after that, use Rjson for reading the retrieved data into a dataframe:
require(rjson)
FromJson_To_DataFrame <-(Raw.data)
There is something missing because I am getting errors, but i cannot figure out what it is, and if it is possible at all like this. Hints would be greatly aprecaiated!
Cheers from DK