LockCodes APIlockcodes.com ↗
Access lock pinning charts, key blank cross-references, and combination counters via the LockCodes.com API. 4 endpoints covering cylinder types, MACS, and more.
What is the LockCodes API?
The LockCodes.com API gives developers access to 4 endpoints covering lock pinning charts, key blank name cross-references, and key combination calculations. The pinitnow_get_pin_chart endpoint generates a full text pinning chart — including top and bottom pin assignments and lengths in thousandths — for dozens of cylinder types when given a change key cut string and an optional master or control key.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/997b8ff0-6959-4f36-adb0-2031dde791ec/pinitnow_list_cylinder_types' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace lockcodes-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: LockCodes SDK — pinning charts, lock cross-references, key combinations."""
from parse_apis.lockcodes_api import LockCodes, CylinderSlug, InvalidInput
client = LockCodes()
# List all cylinder types available for pinning charts
for ct in client.cylindertypes.list(limit=5):
print(ct.name, ct.slug, ct.template)
# Construct a known cylinder type by slug and generate its pinning chart
schlage = client.cylindertype(slug=CylinderSlug.SCHLAGE)
chart = schlage.get_pin_chart(change_cuts="25341", master_cuts="53214")
print(chart.chart_text[:120])
# Search lock names for cross-reference info
for lock in client.locknames.search(query="Master", limit=3):
print(lock.name, lock.info)
# Calculate key combinations for a lock configuration
result = client.combinationresults.calculate(spaces=5, depths=10, macs=3)
print(result.count, result.text[:80])
# Typed error handling for invalid input
try:
client.combinationresults.calculate(spaces=0, depths=0, macs=0)
except InvalidInput as exc:
print(f"Invalid input: {exc}")
print("exercised: cylindertypes.list / cylindertype.get_pin_chart / locknames.search / combinationresults.calculate")
List all available cylinder types for the Pin It Now! pinning calculator. Returns cylinder names, slugs (used as input to pinitnow_get_pin_chart), and template strings. The full catalog is returned in a single response with no pagination.
No input parameters required.
{
"type": "object",
"fields": {
"cylinder_types": "array of CylinderType objects"
},
"sample": {
"data": {
"cylinder_types": [
{
"name": "Arrow",
"slug": "arrow",
"template": "1234"
},
{
"name": "Schlage",
"slug": "schlage",
"template": "1234"
},
{
"name": "Kwikset",
"slug": "kwikset",
"template": "1234"
}
]
},
"status": "success"
}
}About the LockCodes API
Pinning Charts and Cylinder Types
The pinitnow_list_cylinder_types endpoint returns all cylinder types supported by the Pin It Now! calculator, including each cylinder's name, slug, and template string. That slug value feeds directly into pinitnow_get_pin_chart as the required cylinder_slug parameter. Supported cylinders include common brands such as Schlage, Kwikset, Arrow, and Best A2. The chart endpoint accepts a required change_cuts digit string and optional master_cuts and control_cuts strings, returning a chart_text field with a complete pinning chart showing pin chamber assignments and lengths.
Key Blank Cross-References
names_listing_search performs case-insensitive substring matching against a cross-reference database of lock names and blank identifiers. Pass a query string such as "Abus" or "Master" and the response returns a results array. Each result includes a name field and an info field containing pipe-separated cross-reference details. The dataset is static, so some lock names may return an empty array if they are not present in the current cross-reference set.
Combination Counting
The combination_counter endpoint calculates the total number of valid key combinations given three integer inputs: spaces (number of key positions), depths (number of available depth values), and macs (Maximum Adjacent Cut Specification). The response includes a count string with the total combinations and a text string with the full calculation result, including pullout count. Note that macs must be strictly less than depths for the calculation to produce valid results.
The LockCodes API is a managed, monitored endpoint for lockcodes.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when lockcodes.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official lockcodes.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Generate pinning charts for Schlage or Kwikset cylinders from cut codes in a locksmith management app
- Build a master key system tool that accepts change, master, and control cuts and outputs pin assignments
- Look up key blank cross-references by manufacturer name to find compatible blank identifiers
- Calculate total keyspace size for a given bitting specification before issuing a key series
- Validate MACS constraints when designing restricted keyways or master key systems
- Enumerate cylinder types programmatically to populate a dropdown in a locksmith workflow tool
- Cross-reference unfamiliar lock names against the LockCodes database to identify compatible blanks
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does LockCodes.com have an official public developer API?+
What does pinitnow_get_pin_chart return, and do I need a master key to use it?+
chart_text string containing a full pinning chart with top and bottom pin assignments and lengths in thousandths of an inch. The master_cuts and control_cuts parameters are both optional — if omitted, the chart is generated for the change key only. Only change_cuts and cylinder_slug are required.What is the known limitation of names_listing_search?+
results array rather than a partial match. There is no fuzzy matching beyond case-insensitive substring search, so queries must contain a substring that actually appears in the dataset.Does the API expose historical key code records or specific key code lookups by bitting list?+
What happens if macs is not less than depths in combination_counter?+
macs must be strictly less than depths for valid results. Passing a macs value equal to or greater than depths will not produce a meaningful combination count. Always ensure your inputs satisfy this constraint before calling the endpoint.