Overview
HackerEarth is a developer assessment platform, and its API lets you compile and execute code in over 30 programming languages programmatically. You submit source code and input, and the API returns the output, execution time, and memory usage. It is useful for building coding playgrounds, online judges, or automated code evaluation tools.
Beginner Tip
Always check the compile_status field first before reading the output — a compilation error will have an empty run_status output. Use language codes like PYTHON3, C, JAVA exactly as listed in the docs.
Available Data
The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.
Example Response
Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.
{
"status": "success",
"data": {
"result": "Data from Hackerearth",
"description": "For compiling and running code in several languages",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
compile_status Compilation result: OK if successful, or CE if there was a compilation error. run_status.status Execution result code: AC (accepted), TLE (time limit exceeded), MLE (memory limit exceeded), or RE (runtime error). run_status.output Standard output produced by the executed program. run_status.time_used Actual CPU time consumed by the program in seconds. run_status.memory_used Memory consumed by the program in kilobytes. Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://api.hackerearth.com/v4/partner/code-evaluation/submissions/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Metadata Score Breakdown
Estimated from metadata — endpoint not independently tested
Metadata estimate · endpoint not independently tested
Technical Specifications
Related Tags
Explore More
Similar APIs
View All →Codeforces
⭐ Beginner's PickCodeforces is a competitive programming platform, and its API lets you retrieve contest data, user statistics, problem sets, and submission results programmatically.
Judge0 CE
⭐ Beginner's PickJudge0 CE is an open-source online code execution API that compiles and runs code in over 60 programming languages.
Mintlify
Mintlify is a documentation platform API that lets you programmatically generate and manage beautiful docs for your code projects.