Skip to main content

Git City API

Fetch repository data and generate 3D city visualizations from GitHub commit history.
All Git City endpoints require session authentication. You must be signed in to use these endpoints.

Get repository city data

Fetches commit history for a GitHub repository and generates 3D city visualization data. Each day with commits becomes a city block, with height proportional to commit activity.

Query parameters

Response (repository data)

Block color mapping

Branch fallback

When the branch parameter is set to main (the default) and the branch is not found in the repository, the API automatically retries with master. This handles repositories that use master as their default branch without requiring an extra request from the client.

Errors

Error response (500)

List user repositories

Returns a list of public GitHub repositories for a user, sorted by last updated.

Response

Errors

Analyze repository by URL

Accepts a GitHub repository URL and generates city visualization data. Only GitHub repositories are supported.

Request body

Response

Returns the same response shape as GET /api/git-city. The branch defaults to main and falls back to master if main is not found.

Errors

POST error messages

The API returns contextual error messages depending on the root cause: