Printables API — Parse a Printables URL
Documentation menu
FetchLayer FetchLayer API

Parse a Printables URL

Turn any Printables URL into structured fields: whether it points at a model, a designer, a collection, a contest or a search, plus the id or keyword it carries and any sort or category encoded in the query string. Useful for turning a pasted link into an argument for one of the other routes. It makes no upstream request and does not consume a credit.

POST /resolve-url Utility
https://api.fetchlayer.dev/printables/resolve-url
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

url string required

Any Printables URL, to be parsed into structured fields.

format string optional

json, or markdown to get the result rendered as text. (default: json)

timeoutMs number optional

Per-request time limit in milliseconds (max 600000).

Response Fields

resolve-url

Parse a Printables URL

kind string

What the URL points at: model, user, collection, contest, search, or unknown.

modelId string

Present when kind is model.

handle string

Present when kind is user — the @name from the profile URL.

userId string | null

Present when kind is user and the URL carries the designer's id; otherwise null.

collectionId string

Present when kind is collection.

contestId string | null

Present when kind is contest; null when the URL names the contest by slug alone.

query string

Present when kind is search — the keyword the URL searched for.

url string

The URL as parsed, normalized.

sort string | null

Ordering the URL encodes, when it carries one.

categoryId string | null

Category id the URL encodes, when it carries one.

Request

curl -X POST "https://api.fetchlayer.dev/printables/resolve-url" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.printables.com/model/512345-under-desk-cable-tray"}'

Response

{
  "kind": "model",
  "modelId": "512345",
  "slug": "under-desk-cable-tray",
  "url": "https://www.printables.com/model/512345-under-desk-cable-tray",
  "sort": null,
  "categoryId": null
}