Compiler API: run code from your own application
Send a program and its input, and get back what it printed, how long it took and the exit status. Each run happens in a sandbox that exists only for that execution, so you never host one.
114
Languages, frameworks and databases
1 credit
Per run, whatever the language

Trusted by teams and institutions worldwide
One request, one result
A run is a single POST. Send the program, the standard input it expects, the language and the version you want it built with.
curl -X POST https://api.jdoodle.com/v1/execute \
-H "Content-Type: application/json" \
-d '{
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"script": "print(sum(int(x) for x in input().split()))",
"stdin": "2 3 4",
"language": "python3",
"versionIndex": "6"
}'What comes back:
{
"output": "9\n",
"statusCode": 200,
"memory": "7768",
"cpuTime": "0.02"
}That is the whole integration for most products. Your application keeps its own interface, its own data and its own logic. The REST reference has every field, and the WebSocket builds on the same request when you need output as it appears.
What you get for one POST request
A sandbox per run
Every language the site runs
REST or WebSocket
Programs that read input
Output you can act on
Credits you can predict
Four products, one problem
The University of Kansas assesses students on it, iText demonstrate their PDF library with it, LINK Group put it inside their learning platform, and Outlier.org teach with it. Each needed to run code somebody else wrote, and none of them wanted to host the machine that does it.
Kansas, iText, LINK Group and Outlier each describe what they built.
API, or an embedded IDE?
An API is the right choice when you already have an interface and only need the run. If you want people writing code in your page as well, an embedded IDE is usually less work: a working editor drops into your page with no backend of your own. API or embed walks through which one a given product wants.
The request format, the credit rules and every error code are in the docs.
Plans and pricing
Every plan, side by side, with what each one includes.
See the plansFrequently asked questions
There are more in the documentation.
What is a compiler API?
How is it different from running code on my own servers?
Which languages does the JDoodle compiler API support?
What does the compiler API cost?
REST or WebSocket?
Can I let people write code in my own page instead?
Still stuck on something?
Ask our support team - they answer these themselves.