LGTM API specification
lgtm · Developer Tools
The REST API for LGTM provides data so that you can customize how you integrate LGTM analysis into your workflow. It includes the following resources: * `/` ([API root](https://lgtm.com/help/lgtm/api/api-v1#LGTM-API-specification-API-root))—get version information or download the specification in OpenAPI format. * `/projects` ([Projects](https://lgtm.com/help/lgtm/api/api-v1#LGTM-API-specification-Projects))—list projects, get a summary of the current status for a project, or add
Authentication
Sample Requests
List all the projects the current user has authorization to view. A maximum of 100 projects are returned in each response. When further results are available, the response includes the URL you need to request the next page of results. Use the optional parameter, `limit`, to change the number of r
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/lgtm.com/v1.0/projects?limit=100&start=example"
import requests
params = {
"limit": "100",
"start": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/lgtm.com/v1.0/projects",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/lgtm.com/v1.0/projects');
url.searchParams.set('limit', '100');
url.searchParams.set('start', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/lgtm.com/v1.0/projects")
q := baseURL.Query()
q.Set("limit", "100")
q.Set("start", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/lgtm.com/v1.0/projects")
uri.query = URI.encode_www_form({
"limit" => "100",
"start" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/lgtm.com/v1.0/projects?" . http_build_query([
"limit" => "100",
"start" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get the version information of this API.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/lgtm.com/v1.0/"
import requests
response = requests.get(
"https://api.apis.guru/v2/specs/lgtm.com/v1.0/",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/lgtm.com/v1.0/'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/lgtm.com/v1.0/"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/lgtm.com/v1.0/")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/lgtm.com/v1.0/";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get the specification of this API in [OpenAPI](https://github.com/OAI/OpenAPI-Specification) format. This endpoint does not require an access token. This makes it easier for you to use the specification with third-party tools.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/lgtm.com/v1.0/openapi"
import requests
response = requests.get(
"https://api.apis.guru/v2/specs/lgtm.com/v1.0/openapi",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/lgtm.com/v1.0/openapi'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/lgtm.com/v1.0/openapi"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/lgtm.com/v1.0/openapi")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/lgtm.com/v1.0/openapi";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with LGTM API specification?
LGTM API specification is a Developer Tools API. Developers commonly use developer tools APIs for:
- automating code review and quality checks
- integrating CI/CD pipelines and build systems
- managing feature flags and A/B tests
- monitoring errors and application performance
- generating and validating test data
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. LGTM API specification is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?