GitHub repository enrichment
POST /api/github-repoEnrich a public GitHub repository: stars, forks, watchers, open issues, license, topics, primary language plus the full language byte mix with percentages, created/last-push timestamps, default branch, archived/fork flags, and homepage. Send POST /api/github-repo with the required fields owner and repo and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with fullName, description, stars, forks, watchers and 13 more.
Keyless (shared per-IP rate limit; the server optionally uses a GITHUB_TOKEN env var for a higher ceiling). Unknown repos return 404.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
owner | string | yes | Repository owner (user or org). |
repo | string | yes | Repository name. |
Example request
curl -i -X POST https://agent402.tools/api/github-repo \
-H "Content-Type: application/json" \
-d '{"owner":"MikeyPetrillo","repo":"Agent402"}'
Without payment this returns HTTP 402 Payment Required with the exact price for github-repo; any x402 v2 or MPP client pays it and retries.
Example response
{
"fullName": "MikeyPetrillo/Agent402",
"description": "Open-source x402 + MCP tool server",
"stars": 12,
"forks": 3,
"watchers": 12,
"openIssues": 4,
"license": "MIT",
"topics": [
"x402",
"mcp"
],
"language": "JavaScript",
"languages": [
{
"language": "JavaScript",
"bytes": 1000000,
"percent": 98.2
}
],
"pushedAt": "2026-07-12T20:11:04Z",
"createdAt": "2026-05-28T01:02:03Z",
"defaultBranch": "main",
"archived": false,
"fork": false,
"homepage": "https://agent402.tools",
"url": "https://github.com/MikeyPetrillo/Agent402",
"source": "api.github.com"
}
| Field | Type | Always present | In the example |
|---|---|---|---|
fullName | string | yes | MikeyPetrillo/Agent402 |
description | string | yes | Open-source x402 + MCP tool server |
stars | number | yes | 12 |
forks | number | yes | 3 |
watchers | number | yes | 12 |
openIssues | number | yes | 4 |
license | string | yes | MIT |
topics | array of string | yes | 2 items in the example |
language | string | yes | JavaScript |
languages | array of objects | yes | 1 item in the example |
pushedAt | string | yes | 2026-07-12T20:11:04Z |
createdAt | string | yes | 2026-05-28T01:02:03Z |
defaultBranch | string | yes | main |
archived | boolean | yes | false |
fork | boolean | yes | false |
homepage | string | yes | https://agent402.tools |
url | string | yes | https://github.com/MikeyPetrillo/Agent402 |
source | string | yes | api.github.com |
From an MCP client
catalog.call {
"slug": "github-repo",
"params": {
"owner": "MikeyPetrillo",
"repo": "Agent402"
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for github-repo; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
ownerandrepoare required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/github-repo returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/github-repo", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"owner": "MikeyPetrillo",
"repo": "Agent402"
}),
});
Related tools
Legal entity (LEI) lookup
POST /api/lei-lookupLook up a legal entity in the official GLEIF registry. Pass a 20-character LEI for the full record - legal name, jurisdi…
Wikidata entity facts
POST /api/wikidata-entityCompany/person/organization facts from Wikidata. Pass an entity id (e.g. Q312 for Apple Inc.) for the enrichment record …
A2A Agent Card validate
POST /api/a2a-card-validateValidate an A2A (Agent2Agent protocol) Agent Card: required fields, skill shape, transport names, capability flags - spe…
Amortization schedule
POST /api/amortizationBuild the full per-period amortization schedule for a fully-amortizing loan. Each row reports the period number, payment…
Annuity present/future value
POST /api/annuityPresent and future value of a level annuity (equal periodic payments). Supports an ordinary annuity (payments at period …
Barcode / QR decode
POST /api/barcode-decodeDecode a barcode or QR code from an image. Send a base64 PNG or JPEG (or a data: URL); returns the decoded text and the …