A very simple Web API for detecting programming languages. It calls guesslang behind the scenes.
The API is completely free, no account registration required. Currently the API is rate limited to 5 requests per second, and the max payload size is 1MB. All of this is subject to change, depending on if the API gets abused or gets a lot of requests.
POST
https://lang.myst.rs/api/detect
{
"snippets": [
"#include <stdio.h> int main() { printf(); return 0; }",
"using System.Collections.Generic; class Program { public static void Main() { Console.WriteLine(); } }"
]
}
{
"languages": [
"c",
"cs"
]
}