# Git Scm — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access comprehensive Git documentation, browse command references across different versions, and explore chapters from the Pro Git book. Search Git documentation and glossary terms to quickly find answers about Git commands and concepts.

**Category:** Developer Tools | **Website:** [git-scm.com/](https://git-scm.com/) | **Docs:** [parse.bot/marketplace/09febc24-0c88-43a1-9e14-d4c8b693d105/git-scm-com-api](https://parse.bot/marketplace/09febc24-0c88-43a1-9e14-d4c8b693d105/git-scm-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_all_commands_list

Get a flat list of all Git commands with their categories and documentation URLs. Returns the total count and an array of command objects. Useful for discovering available commands before fetching their full documentation.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/get_all_commands_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_book_chapter

Get full content of a Pro Git book chapter section as plain text. The chapter_slug identifies the specific section within a chapter. Returns the section title and full text content.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `chapter_slug` | string | Yes | The slug of the chapter/section (e.g. Getting-Started-About-Version-Control, Git-Basics-Getting-a-Git-Repository). Obtain slugs from the get_book_toc endpoint by extracting the last path segment from section URLs. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/get_book_chapter \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chapter_slug":"<string>"}'
```

### get_book_toc

Get the table of contents for the Pro Git book, organized by chapters and sections. Each chapter contains a title and an array of sections with their titles and URL paths. Use section URLs to derive slugs for the get_book_chapter endpoint.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/get_book_toc \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_command_doc

Get full documentation for a specific Git command. Returns the command name, page title, and all documentation sections as a mapping of section name to content text. Section names typically include NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXAMPLES, etc.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `command` | string | Yes | The Git command name in its hyphenated form (e.g. git-commit, git-merge, git-log, git-push, git-pull, git-clone, git-add, git-status) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/get_command_doc \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command":"<string>"}'
```

### get_command_doc_by_version

Get documentation for a specific version of a Git command. If the exact version does not exist for that command, the site may redirect to the nearest available version. Returns command name, version, title, and documentation sections.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `command` | string | Yes | The Git command name in its hyphenated form (e.g. git-commit, git-merge, git-log) |
| `version` | string | Yes | The Git version string (e.g. 2.40.0, 2.45.0, 2.53.0). The site may redirect to the nearest available version if the exact version does not exist for the command. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/get_command_doc_by_version \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command":"<string>","version":"<string>"}'
```

### get_glossary

Get the full Git glossary. Returns a mapping of term names to their HTML description strings, along with a total count of terms. Covers all official Git terminology.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/get_glossary \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_homepage

Get the Git homepage content including navigation links, content blocks, and the latest released Git version number. Returns a single Homepage object with the current state of the git-scm.com front page.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/get_homepage \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_reference_index

Get the reference index of all Git commands organized by category. Each category contains a name and an array of commands with their names and documentation URLs. Useful for browsing the full command taxonomy.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/get_reference_index \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_docs

Search for commands and glossary terms by keyword. Performs a case-insensitive search across the Git glossary term names and descriptions, and the command reference index. Results include a type field indicating whether the match is a glossary term or a command.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | The search keyword (case-insensitive). Matches against glossary term names, glossary descriptions, and command names. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-git-scm-com-api-09febc24/search_docs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
