CodeCompiler APIs

Bring code execution and the CodeCompiler editor into your own product. The execution API runs on JDoodle under the hood and covers the same 53+ programming languages available on the site — no separate account needed to try it.

Start building

Building something we don't cover yet — challenges, org accounts, SSO? These APIs are new and growing; reach out via the contact options on our pricing page and we'll see what we can add.

Code Execution API

Send code and stdin from your backend, get back stdout, stderr and timing — no browser required. This is the same endpoint the online editor calls.

POST /api/runNo API key required right now — this endpoint is free while CodeCompiler is in beta.

Request

curl --location --request POST 'https://codecompiler.forgesparse.com/api/run' \
--header 'Content-Type: application/json' \
--data-raw '{
  "language": "python",
  "version": "3.10.0",
  "files": [
    { "name": "main.py", "content": "print(\"Hello, \" + input())" }
  ],
  "stdin": "Peter"
}'

Response

{
  "stdout": "Hello, Peter\n",
  "stderr": "",
  "output": "Hello, Peter\n",
  "code": 0,
  "signal": null,
  "language": "python",
  "version": "3.10.0"
}
FieldDescription
languageLanguage slug — see the supported languages table below.
versionFree-form version label, echoed back in the response.
filesArray of { name, content }. The first file is treated as the entry point; extra files are appended as commented sections.
stdinOptional. Text piped to the program's standard input.
argsOptional array of CLI arguments, prepended to stdin for programs that read argv.
stdout / stderr / outputCaptured program output. output mirrors JDoodle's combined stream; stdout/stderr are split heuristically.
code0 on a clean run, 1 if a compile or runtime error was detected, null on infra errors.
errorPresent only on failure — a short machine-readable label (see below).

Error responses

Failures come back as HTTP 200 with an error label so you can branch on it without checking status codes:

Unsupported language

The language slug isn't mapped to a runtime yet.

Missing JDoodle credentials

Server-side configuration issue — not something callers can fix.

Invalid credentials

JDoodle rejected the configured API keys.

Daily limit exceeded

The shared execution quota was hit — retry later.

Timeout

Execution took longer than 20 seconds and was aborted.

Network error

Could not reach the execution backend — safe to retry.

Supported languages

53 languages currently run through this API. Use the slug from the language column.

slugnamecategory
javascriptJavaScriptpopular
pythonPythonpopular
javaJavapopular
cCpopular
cppC++popular
csharpC#popular
goGoprogramming
rustRustprogramming
rubyRubyprogramming
phpPHPpopular
typescriptTypeScriptprogramming
nodejsNode.jspopular
kotlinKotlinprogramming
swiftSwiftprogramming
bashBashprogramming
perlPerlprogramming
luaLuapopular
haskellHaskellprogramming
dartDartprogramming
scalaScalaprogramming
groovyGroovypopular
elixirElixirprogramming
clojureClojureprogramming
fsharpF#programming
fortranFortranprogramming
cobolCOBOLprogramming
pascalPascalprogramming
rRprogramming
erlangErlangprogramming
ocamlOCamlprogramming
dDprogramming
assemblyAssemblypopular
prologPrologprogramming
commonlispCommon Lispprogramming
vbnetVisual Basicprogramming
denoDenoprogramming
python2Python 2programming
freebasicFreeBASICprogramming
mysqlMySQLdatabase
sqliteSQLitedatabase
postgresqlPostgreSQLdatabase
plsqlPL/SQLdatabase
mongodbMongoDBdatabase
oracleOracledatabase
redisRedisdatabase
mariadbMariaDBdatabase
sqlserverSQL Serverdatabase
cassandraCassandradatabase
questdbQuestDBdatabase
duckdbDuckDBdatabase
surrealdbSurrealDBdatabase
firebirdFirebirddatabase
clickhouseClickHousedatabase

Embed Editor

Every language page on CodeCompiler is a clean, chrome-free editor — no site header or footer — so it drops straight into an iframe.

Embedding the default editor

<iframe
  frameBorder="0"
  height="450px"
  src="https://codecompiler.forgesparse.com/python"
  width="100%"
></iframe>

Embedding a specific language

Swap the path for any supported slug — e.g. /java, /javascript, /html.

<iframe
  frameBorder="0"
  height="450px"
  src="https://codecompiler.forgesparse.com/java"
  width="100%"
></iframe>
Query-parameter controls (hiding the language picker, dark theme, listening forpostMessageevents, etc.) aren't wired up yet — the iframe above embeds the full interactive editor as-is. Let us know what controls you need and we'll prioritize them.