# LGTM API specification API

> LGTM API specification API on Apizie: 29 endpoints (Version information, Get analysis summary, Get detailed alert information, Run analysis of a specific commit, …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://apizie.tech/v1/dev-tools:lgtm/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `dev-tools:lgtm`
- Category: Dev Tools
- Status: byok
- Source: https://lgtm.com
- Page: https://apizie.tech/api/dev-tools/lgtm
- OpenAPI: https://apizie.tech/api/dev-tools/lgtm/openapi.json

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…

## Endpoints

### Version information
`GET https://apizie.tech/v1/dev-tools:lgtm/get-version` (byok)

### Get analysis summary
`GET https://apizie.tech/v1/dev-tools:lgtm/get-analysis` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| analysis-id | string | yes | The analysis identifier. |

### Get detailed alert information
`GET https://apizie.tech/v1/dev-tools:lgtm/get-alerts` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| analysis-id | string | yes | The analysis identifier. |
| sarif-version | string | no | The desired version of the SARIF format. Currently supported versions are `1.0.0`, `2.0.0`, and `2.1.0`. |
| excluded-files | boolean | no | Set `true` to include results in files that are excluded from the output by default. This includes results in test code and generated… |

### Run analysis of a specific commit
`POST https://apizie.tech/v1/dev-tools:lgtm/request-analysis` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier. |
| commit | string | yes | The identifier of the commit to analyze. |
| language | array | no | The language codes of the languages to analyze. For a list of available languages, see [Supported… |

### Get analysis summary for a specific commit
`GET https://apizie.tech/v1/dev-tools:lgtm/get-analysis-for-commit` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier. |
| commit-id | string | yes | The identifier of a specific commit. Alternatively, use `latest` for the most recent analyzed commit. |

### Run code review for a patch
`POST https://apizie.tech/v1/dev-tools:lgtm/request-review` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier. |
| base | string | yes | The identifier for the base commit. |
| external-id | integer | yes | Your reference number for the code review. |
| review-url | string | no | An informative back-link to an external system. |
| callback-url | string | no | The callback URL for LGTM to post to on completion of the review. When the code review is complete, the API sends an HTTP POST request to… |
| callback-secret | string | no | The `callback-secret` is used to compute a signature which is included in the `x-lgtm-signature` header of the callback response. The… |

### Get results of code review
`GET https://apizie.tech/v1/dev-tools:lgtm/get-code-review` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| review-id | string | yes | The identifier for the review (from the `task-result-url`). |

### Get detailed alert information for an issue
`GET https://apizie.tech/v1/dev-tools:lgtm/get-issue` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier. |
| alert-key | string | yes | The alert key is generated by LGTM when it posts an issue `create` webhook request to an external system using the [issue tracker Webhook… |

### API specification
`GET https://apizie.tech/v1/dev-tools:lgtm/get-spec` (byok)

### Get operation status
`GET https://apizie.tech/v1/dev-tools:lgtm/get-operation` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| operation-id | integer | yes | The operation identifier returned on creating the task. |

### List projects
`GET https://apizie.tech/v1/dev-tools:lgtm/get-projects` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | no | The maximum number of projects to return in each response (1-100). |
| start | string | no | An opaque identifier generated by the API. |

### Add a project to LGTM
`POST https://apizie.tech/v1/dev-tools:lgtm/add-project` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| repository | string | yes | The URL of the repository to analyze. LGTM tests this against the [repository… |
| language | array | no | Optional, a [language code](https://lgtm.com/help/lgtm/analysis-faqs#which-languages-are-supported) to specify which language to analyze.… |
| mode | string | no | The analysis mode of the new project. When set to `full` all commits of the project are analyzed; when set to `sparse` the latest commit… |
| commit | string | no | Required when `mode=upload`, specify the identifier of the commit used to generate the database. |
| date | string | no | Optional when `mode=upload`, specify the date and time of the commit used to generate the database; defaults to the current time. |
| worker-label | array | no | Optional, any [labels](https://lgtm.com/admin/help/defining-worker-labels) required by workers to analyze this project. To specify more… |

### Get project by numeric identifier
`GET https://apizie.tech/v1/dev-tools:lgtm/get-project` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier |

### Delete project by numeric identifier
`POST https://apizie.tech/v1/dev-tools:lgtm/delete-project` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier |

### Get configuration for a project identified by numeric identifier
`GET https://apizie.tech/v1/dev-tools:lgtm/get-project-config` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier |
| source | string | no | The type of project configuration to retrieve. If this parameter isn't specified, the request retrieves the effective configuration. That… |

### Set the administrator configuration for a project identified by numeric identifier
`POST https://apizie.tech/v1/dev-tools:lgtm/set-project-config` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier |

### Get project by URL identifier
`GET https://apizie.tech/v1/dev-tools:lgtm/get-project-by-url-identifier` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| provider | string | yes | The first part of the URL identifier of a project, which represents the repository host. |
| org | string | yes | The second part of the URL identifier of a project, the organization. |
| name | string | yes | The third part of the URL identifier of a project, the repository name. |

### Run a CodeQL query on one or more projects
`POST https://apizie.tech/v1/dev-tools:lgtm/create-query-job` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| language | string | yes | The [language](https://lgtm.com/help/lgtm/analysis-faqs#which-languages-are-supported) you want to analyze. |
| project-id | array | no | The identifier of the project to analyze. Either `project-id` or `projects-list` must be specified. |
| projects-list | string | no | Name of the list containing the projects to analyze. Either `project-id` or `projects-list` must be specified. |

### Get the status of a query job
`GET https://apizie.tech/v1/dev-tools:lgtm/get-query-job` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| queryjob-id | string | yes | The identifier of the query job, from the `task-result` given in the response to the initial `POST /queryjobs` request. |

### Provide a summary of results for the projects in the query job
`GET https://apizie.tech/v1/dev-tools:lgtm/get-query-job-results-overview` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| queryjob-id | string | yes | The identifier of the query job, from the `task-result` given in the response to the initial `POST /queryjobs` request. |
| start | string | no | An opaque identifier generated by the API used for pagination. This identifier will be included as part of the response for this endpoint… |
| limit | integer | no | The number of results to return. Useful for pagination. |
| filter | string | no | Only return a subset of results. Legal values are `w-results`, `wo-results`, `error`. |

### Fetch the results of a query job for a specific project
`GET https://apizie.tech/v1/dev-tools:lgtm/get-query-job-results-for-project` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| queryjob-id | string | yes | The identifier of the query job, from the `task-result` given in the response to the initial `POST /queryjobs` request. |
| project-id | string | yes | The identifier for the project. |
| start | integer | no | Start point for the page of results. |
| limit | integer | no | The maximum number of results to display (less than 100). |
| nofilter | boolean | no | Include results that are not part of the source tree. These results are filtered out by default. |

### Complete snapshot upload session
`POST https://apizie.tech/v1/dev-tools:lgtm/complete-upload` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| session-id | string | yes | The id of the upload session. |

### Upload snapshot
`POST https://apizie.tech/v1/dev-tools:lgtm/upload-part` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| session-id | string | yes | The id of the upload session. |

### Abort database upload process
`POST https://apizie.tech/v1/dev-tools:lgtm/abort-upload` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| session-id | string | yes | The id of the upload session. |

### Download a snapshot
`GET https://apizie.tech/v1/dev-tools:lgtm/get-snapshot` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier. |
| language | string | yes | The language of the database to download. |

### Start snapshot upload session
`POST https://apizie.tech/v1/dev-tools:lgtm/init-snapshot-upload` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| project-id | integer | yes | The numeric project identifier. |
| language | string | yes | The language of the database to upload. |
| commit | string | yes | The identifier of the analyzed commit. |
| date | string | no | The date and time of the analyzed commit (default the current time). |

### Get a summary of the application's health
`GET https://apizie.tech/v1/dev-tools:lgtm/get-health` (byok)

### Get the identifiers and descriptions of the usage metrics
`GET https://apizie.tech/v1/dev-tools:lgtm/get-metrics` (byok)

### Get the computed values of the specified metric
`GET https://apizie.tech/v1/dev-tools:lgtm/get-metric` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| metric-id | string | yes | The identifier of the metric. |

## Example
```
curl "https://apizie.tech/v1/dev-tools:lgtm/get-version" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the LGTM API specification API?
Create a free Apizie key, then send GET https://apizie.tech/v1/dev-tools:lgtm/get-version with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the LGTM API specification API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. LGTM API specification itself also needs your own key from lgtm.com.

### Can AI agents use the LGTM API specification API?
Yes. Add the Apizie MCP server (https://apizie.tech/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key dev-tools:lgtm.

### What is the status of the LGTM API specification API?
Needs your own provider key (bring your own key)
