I have tried running programs with oraclize on the ethereum testnet (Morden). My program fails to compile due to import "dev.oraclize.it/api.sol" error.

I have therefore tried to manually download api.sol. I guess I have to store this file somewhere specific in order for my contract to work, but where? I cannot save it directly in the contract folder since I am writing my contract directly in the ethereum wallet.

2 Answers 2


That line is meant to be replaced with the actual content of the Oraclize api.sol file (or to your local path to the api.sol file) so.. get rid of the "import .." line and copy paste the http://dev.oraclize.it/api.sol (which is the same as the one on github) file content there.

This process is not needed while using our dev.oraclize.it web-based IDE (since the custom importing is handled automatically) but for all the other cases you need to go that way!


You need to link the file so that the compiler can find it. You can do this by compiling the source using the solc compiler, and linking files, but I reccomend just doing your work in the online compiler which autolinks files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.