{
  "openapi": "3.1.0",
  "info": {
    "title": "Polyzon API",
    "version": "1.0.0",
    "description": "Search 3D models in the Polyzon catalog and fetch model details. Access with a personal token from polyzon.org/account/apps."
  },
  "servers": [
    {
      "url": "https://api.polyzon.org"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "A personal pzk_… token from “Apps & API” at polyzon.org/account/apps."
      }
    }
  },
  "paths": {
    "/v1/search": {
      "get": {
        "operationId": "search",
        "summary": "Search models",
        "description": "Search the Polyzon catalog: models from every platform, with filters and pages. Results go no deeper than 2400 models (page × size).",
        "x-daily-quota": true,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query in English or Russian, up to 200 characters.",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "example": "dragon"
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number, starting at 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 1
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "Models per page. page × size is at most 2400.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Order: relevant — by relevance, popular — by popularity on the model’s platform, newest — newest first, likes, makes, downloads.",
            "schema": {
              "type": "string",
              "enum": [
                "relevant",
                "popular",
                "newest",
                "likes",
                "makes",
                "downloads"
              ],
              "default": "relevant"
            }
          },
          {
            "name": "free",
            "in": "query",
            "description": "Free models only.",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "sources",
            "in": "query",
            "description": "Comma-separated platforms: thingiverse, cults3d, printables, makerworld, 3dtoday, crealitycloud, myminifactory, thangs, youmagine, grabcad, sketchfab, threeding, nexprint, nasa, nih3d, smithsonian, pinshape, cgtrader, gambody, jewelmodel, makeronline, 3dexport.",
            "schema": {
              "type": "string"
            },
            "example": "thingiverse,printables"
          },
          {
            "name": "formats",
            "in": "query",
            "description": "Comma-separated file formats: stl, 3mf, obj, step, scad, gcode and more.",
            "schema": {
              "type": "string"
            },
            "example": "stl,3mf"
          },
          {
            "name": "license",
            "in": "query",
            "description": "Comma-separated licenses: cc0, cc-by, cc-by-sa, cc-by-nd, cc-by-nc, cc-by-nc-sa, cc-by-nc-nd, gpl, lgpl, mit, bsd, private-use, commercial, custom, unknown.",
            "schema": {
              "type": "string"
            },
            "example": "cc0,cc-by"
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language of titles and tags: ru or en. If the original is in another language, a machine translation is returned.",
            "schema": {
              "type": "string",
              "enum": [
                "ru",
                "en"
              ],
              "default": "ru"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of results. `hasMore` says whether there is a next page within 2400; `partial` means part of the catalog did not answer and the results are incomplete. `stats.collects` holds saves to collections, or downloads if the platform does not count saves.",
            "content": {
              "application/json": {
                "example": {
                  "query": "dragon",
                  "correctedQuery": null,
                  "didYouMean": null,
                  "total": 1873,
                  "totalRelation": "eq",
                  "page": 1,
                  "size": 20,
                  "hasMore": true,
                  "partial": false,
                  "items": [
                    {
                      "source": "thingiverse",
                      "id": "tv-1234567",
                      "title": "Articulated dragon (example)",
                      "url": "https://www.thingiverse.com/thing:1234567",
                      "thumbnail": "https://cdn.thingiverse.com/assets/dragon.jpg",
                      "creator": "example_maker",
                      "license": "cc-by-nc",
                      "price": {
                        "type": "free",
                        "value": 0,
                        "currency": null,
                        "display": "Free"
                      },
                      "formats": [
                        "stl"
                      ],
                      "tags": [
                        "dragon",
                        "toy"
                      ],
                      "stats": {
                        "likes": 51234,
                        "comments": 870,
                        "makes": 3120,
                        "collects": 61000
                      },
                      "publishedAt": "2021-01-17T10:21:00Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter (`bad_request`, the `param` field says which) or a page too deep (`page_too_deep`)."
          },
          "401": {
            "description": "No token (`unauthorized`), or it is wrong or revoked (`invalid_token`)."
          },
          "403": {
            "description": "The token owner has not accepted the current Polyzon terms (`account_action_required`) — sign in to the account — or other accounts already work from this address today (`too_many_accounts`)."
          },
          "429": {
            "description": "Per-minute limit exceeded (`rate_limited`), daily quota used up (`quota_exceeded`) or the address’s daily cap used up (`address_quota_exceeded`). Wait `Retry-After` seconds."
          },
          "503": {
            "description": "The catalog or the token check is temporarily unavailable (`unavailable`). Try again later."
          }
        }
      }
    },
    "/v1/models/{source}/{id}": {
      "get": {
        "operationId": "getModel",
        "summary": "Model details",
        "description": "A model by its platform and id — the same as in search items and in the page address polyzon.org/model/{source}/{id}. Images are URLs on the platform’s own CDN.",
        "x-daily-quota": true,
        "parameters": [
          {
            "name": "source",
            "in": "path",
            "required": true,
            "description": "The platform the model comes from.",
            "schema": {
              "type": "string",
              "enum": [
                "thingiverse",
                "cults3d",
                "printables",
                "makerworld",
                "3dtoday",
                "crealitycloud",
                "myminifactory",
                "thangs",
                "youmagine",
                "grabcad",
                "sketchfab",
                "threeding",
                "nexprint",
                "nasa",
                "nih3d",
                "smithsonian",
                "pinshape",
                "cgtrader",
                "gambody",
                "jewelmodel",
                "makeronline",
                "3dexport"
              ]
            },
            "example": "thingiverse"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The model’s id on the platform with a Polyzon prefix, e.g. tv-1234567.",
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "example": "tv-1234567"
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language of the title, description and tags: ru or en.",
            "schema": {
              "type": "string",
              "enum": [
                "ru",
                "en"
              ],
              "default": "ru"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The model. `copies` lists the same model on other platforms.",
            "content": {
              "application/json": {
                "example": {
                  "source": "thingiverse",
                  "id": "tv-1234567",
                  "title": "Articulated dragon (example)",
                  "url": "https://www.thingiverse.com/thing:1234567",
                  "thumbnail": "https://cdn.thingiverse.com/assets/dragon.jpg",
                  "creator": "example_maker",
                  "license": {
                    "id": "cc-by-nc",
                    "raw": "Creative Commons - Attribution - Non-Commercial"
                  },
                  "price": {
                    "type": "free",
                    "value": 0,
                    "currency": null,
                    "display": "Free"
                  },
                  "formats": [
                    "stl"
                  ],
                  "tags": [
                    "dragon",
                    "toy"
                  ],
                  "stats": {
                    "likes": 51234,
                    "comments": 870,
                    "makes": 3120,
                    "collects": 61000,
                    "downloads": 410000,
                    "views": 990000
                  },
                  "publishedAt": "2021-01-17T10:21:00Z",
                  "description": "The dragon prints in one piece, no supports needed…",
                  "images": [
                    "https://cdn.thingiverse.com/assets/dragon.jpg"
                  ],
                  "creatorUrl": "https://www.thingiverse.com/example_maker",
                  "category": "Toys & Games",
                  "updatedAt": "2021-02-02T08:00:00Z",
                  "copies": [
                    {
                      "source": "printables",
                      "id": "pr-123456"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No token (`unauthorized`), or it is wrong or revoked (`invalid_token`)."
          },
          "403": {
            "description": "The token owner has not accepted the current Polyzon terms (`account_action_required`) — sign in to the account — or other accounts already work from this address today (`too_many_accounts`)."
          },
          "404": {
            "description": "No such model (`not_found`)."
          },
          "410": {
            "description": "The model was removed at the rights holder’s request (`gone`). Remove it on your side too."
          },
          "429": {
            "description": "Per-minute limit exceeded (`rate_limited`), daily quota used up (`quota_exceeded`) or the address’s daily cap used up (`address_quota_exceeded`). Wait `Retry-After` seconds."
          },
          "503": {
            "description": "The catalog or the token check is temporarily unavailable (`unavailable`). Try again later."
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "getMe",
        "summary": "Account and token",
        "description": "Who owns the token the request was made with. Does not use the daily quota.",
        "x-daily-quota": false,
        "parameters": [],
        "responses": {
          "200": {
            "description": "The account and the token.",
            "content": {
              "application/json": {
                "example": {
                  "account": {
                    "id": "0f8c2a4e-…",
                    "displayName": "Alex",
                    "createdAt": "2026-03-14T10:00:00.000Z"
                  },
                  "token": {
                    "id": "7d0e2f8a-…",
                    "name": "Telegram bot",
                    "prefix": "pzk_Q7xR2mVb",
                    "createdAt": "2026-10-09T08:15:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No token (`unauthorized`), or it is wrong or revoked (`invalid_token`)."
          },
          "403": {
            "description": "The token owner has not accepted the current Polyzon terms (`account_action_required`) — sign in to the account — or other accounts already work from this address today (`too_many_accounts`)."
          },
          "429": {
            "description": "Per-minute limit exceeded (`rate_limited`), daily quota used up (`quota_exceeded`) or the address’s daily cap used up (`address_quota_exceeded`). Wait `Retry-After` seconds."
          },
          "503": {
            "description": "The catalog or the token check is temporarily unavailable (`unavailable`). Try again later."
          }
        }
      }
    },
    "/v1/limits": {
      "get": {
        "operationId": "getLimits",
        "summary": "Remaining limits",
        "description": "The per-minute window and the UTC day: limit, used, remaining and reset time (Unix seconds). Does not use the daily quota.",
        "x-daily-quota": false,
        "parameters": [],
        "responses": {
          "200": {
            "description": "The account’s quota windows.",
            "content": {
              "application/json": {
                "example": {
                  "perMinute": {
                    "limit": 20,
                    "used": 1,
                    "remaining": 19,
                    "resetAt": 1791579180
                  },
                  "daily": {
                    "limit": 200,
                    "used": 37,
                    "remaining": 163,
                    "resetAt": 1791590400
                  }
                }
              }
            }
          },
          "401": {
            "description": "No token (`unauthorized`), or it is wrong or revoked (`invalid_token`)."
          },
          "403": {
            "description": "The token owner has not accepted the current Polyzon terms (`account_action_required`) — sign in to the account — or other accounts already work from this address today (`too_many_accounts`)."
          },
          "429": {
            "description": "Per-minute limit exceeded (`rate_limited`), daily quota used up (`quota_exceeded`) or the address’s daily cap used up (`address_quota_exceeded`). Wait `Retry-After` seconds."
          },
          "503": {
            "description": "The catalog or the token check is temporarily unavailable (`unavailable`). Try again later."
          }
        }
      }
    }
  }
}