{
  "openapi": "3.1.0",
  "info": {
    "title": "ClipParse API",
    "description": "ClipParse extracts a structured recipe from a TikTok or Instagram post.\nSend a post URL to `POST /v1/extract` and get back ingredients with\nquantities and units, ordered steps, timing, and yield.\n\n## Quickstart\n\nGet a free API key at\n[clipparse.com/get-free-key](https://clipparse.com/get-free-key): it takes\nseconds and doesn't require a credit card. Then send a post URL:\n\n```bash\ncurl https://api.clipparse.com/v1/extract \\\n  -H \"X-API-Key: $CLIPPARSE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://www.tiktok.com/@chef/video/7300000000000000000\"}'\n```\n\n## Base URL\n\n`https://api.clipparse.com`\n\n## SDKs\n\nFor mobile apps, the ClipParse SDKs are the recommended way to call this API:\nthey wrap it in a native client, and extraction is more reliable through\nthem.\n\n- **iOS**: the\n  [ClipParse iOS SDK](https://github.com/clipparse/clipparse-ios-sdk), in\n  Swift.\n- **Android**: the\n  [ClipParse Android SDK](https://github.com/clipparse/clipparse-android-sdk),\n  in Kotlin.\n\n## Authentication\n\nSend your API key in the `X-API-Key` header.\n[Get a free key](https://clipparse.com/get-free-key).\n\n## Usage allowance\n\nAllowances are counted in credits. A successful extraction uses 1 credit when\nthe recipe was extracted from the caption or a photo post, and 4 credits when\nit was extracted from what's said in the video. Errors and\n`no_recipe` outcomes don't use any credits. Allowances renew monthly, on the\nday of the month your plan started.\n\n- **Free**: 100 credits a month. Once spent, requests return HTTP 429\n  `quota_exceeded` until the renewal date given in `resetsAt`.\n- **Paid**: larger allowances. Past yours, requests keep working and each\n  extra credit is billed as overage. If your plan is set to\n  pause at the allowance instead, requests return HTTP 429 `quota_exceeded`\n  until the renewal date given in `resetsAt`. See\n  [pricing](https://clipparse.com/pricing).\n\nEvery authenticated response, success or error, reports your allowance in\nheaders, so you can track it without a separate call:\n\n- `X-Quota-Limit`: your allowance for the current period.\n- `X-Quota-Used`: how much of it is used, this request included. Past the\n  allowance it keeps counting, so it shows your overage.\n- `X-Quota-Remaining`: what is left, never below 0.\n- `X-Quota-Reset`: when the allowance renews (ISO 8601 UTC, the same value\n  as `resetsAt`).\n\nResponses that reach an outcome also carry `X-Credits-Used`: the credits this\nrequest used (`0`, `1` or `4`), so `X-Quota-Used` goes up only on a\n`success`.\n\n## Rate limits\n\nEvery key also has per-minute and per-day request limits, well above normal\nuse. Exceeding one returns HTTP 429 `rate_limited`: retry after the\n`Retry-After` seconds.\n\n## Responses\n\nEvery response has a `status` field, mirrored by the HTTP status code:\n\n- **`success`** (200): the `recipe` is present.\n- **`no_recipe`** (200): the post holds no usable recipe\n  (`no_recipe_found` or `multiple_recipes_detected`). Not worth retrying.\n- **`error`**: `platform_unsupported` (400), `post_unavailable` (404: the\n  post doesn't exist, was deleted, or isn't public), or `internal_error`\n  (500, retry with backoff).\n\nErrors about your API key, your allowance or the rate limits (HTTP 401, 403\nand 429) also carry a `message`: what happened and what to do next, in plain\nlanguage. Branch on `code`; the wording of `message` can change.\n\n### Example (HTTP 200)\n\n```json\n{\n  \"status\": \"success\",\n  \"recipe\": {\n    \"title\": \"Easy Pancakes\",\n    \"language\": \"en\",\n    \"sourceUrl\": \"https://www.tiktok.com/@chef/video/7300000000000000000\",\n    \"thumbnailUrl\": \"https://p16-sign.tiktokcdn.com/example/thumb.jpg\",\n    \"servings\": 4,\n    \"prepTimeMinutes\": 5,\n    \"cookTimeMinutes\": 15,\n    \"ingredients\": [\n      { \"name\": \"all-purpose flour\", \"prep\": null, \"quantity\": 150, \"quantityMin\": null, \"quantityMax\": null, \"unit\": \"g\", \"raw\": \"150g flour\", \"section\": null },\n      { \"name\": \"milk\", \"prep\": null, \"quantity\": 250, \"quantityMin\": null, \"quantityMax\": null, \"unit\": \"ml\", \"raw\": \"250ml milk\", \"section\": null },\n      { \"name\": \"eggs\", \"prep\": null, \"quantity\": 2, \"quantityMin\": null, \"quantityMax\": null, \"unit\": \"each\", \"raw\": \"2 eggs\", \"section\": null }\n    ],\n    \"steps\": [\n      { \"text\": \"Whisk the flour, milk, and eggs into a smooth batter.\", \"durationMinutes\": null, \"section\": null },\n      { \"text\": \"Cook ladlefuls in a hot buttered pan until golden on both sides.\", \"durationMinutes\": 15, \"section\": null }\n    ]\n  }\n}\n```\n\n## Request tracing\n\nEvery response carries an `X-Request-Id` header; quote it in support\nrequests. Send your own UUID v4 in that header to have it echoed back.\n",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.clipparse.com"
    }
  ],
  "paths": {
    "/v1/extract": {
      "post": {
        "tags": [
          "extract"
        ],
        "summary": "Extract a recipe from a post URL",
        "description": "Extracts a canonical recipe from a TikTok or Instagram post.\n\nProvide the post `url`. The response has one of three `status` shapes.\n\n`success` carries the full `recipe`. `no_recipe` (HTTP 200) means the post held no usable recipe, or held several. `error` is `platform_unsupported` (HTTP 400), `post_unavailable` (HTTP 404: the post doesn't exist, was deleted, or isn't public) or `internal_error` (HTTP 500); of these only 500 is worth retrying, with backoff.",
        "operationId": "extract_v1_extract_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Extraction completed. `success` carries the recipe; `no_recipe` reports that the post held no usable recipe.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SuccessResponse"
                    },
                    {
                      "$ref": "#/components/schemas/NoRecipeResponse"
                    }
                  ],
                  "title": "Response Extract V1 Extract Post",
                  "discriminator": {
                    "propertyName": "status",
                    "mapping": {
                      "success": "#/components/schemas/SuccessResponse",
                      "no_recipe": "#/components/schemas/NoRecipeResponse"
                    }
                  }
                },
                "examples": {
                  "success": {
                    "summary": "Recipe extracted",
                    "value": {
                      "status": "success",
                      "recipe": {
                        "title": "One-Pan Garlic Butter Pasta",
                        "language": "en",
                        "sourceUrl": "https://www.tiktok.com/@chef/video/7300000000000000000",
                        "thumbnailUrl": "https://p16-sign.tiktokcdn.com/example/thumb.jpg",
                        "servings": 2,
                        "prepTimeMinutes": 5,
                        "cookTimeMinutes": 15,
                        "ingredients": [
                          {
                            "name": "spaghetti",
                            "quantity": 200,
                            "unit": "g",
                            "raw": "200g spaghetti"
                          },
                          {
                            "name": "garlic cloves",
                            "prep": "minced",
                            "quantity": 3,
                            "unit": "each",
                            "raw": "3 cloves garlic, minced"
                          },
                          {
                            "name": "butter",
                            "quantity": 2.5,
                            "quantityMin": 2,
                            "quantityMax": 3,
                            "unit": "tbsp",
                            "raw": "2-3 tbsp butter"
                          },
                          {
                            "name": "salt",
                            "raw": "salt to taste"
                          }
                        ],
                        "steps": [
                          {
                            "text": "Boil the spaghetti until al dente.",
                            "durationMinutes": 10
                          },
                          {
                            "text": "Melt the butter, cook the garlic until fragrant, then toss with the drained pasta.",
                            "durationMinutes": 5
                          }
                        ]
                      }
                    }
                  },
                  "no_recipe_found": {
                    "summary": "No recipe in the post",
                    "value": {
                      "status": "no_recipe",
                      "code": "no_recipe_found"
                    }
                  },
                  "multiple_recipes_detected": {
                    "summary": "Multiple recipes in one post",
                    "value": {
                      "status": "no_recipe",
                      "code": "multiple_recipes_detected"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "URL is not on a supported platform (`platform_unsupported`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformUnsupportedResponse"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: no `X-API-Key` header. `invalid_key`: the key isn't recognized. Not retryable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthError"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "No API key",
                    "value": {
                      "status": "error",
                      "code": "unauthorized",
                      "message": "No API key. Send your key in the X-API-Key header. Get a free key at https://clipparse.com/get-free-key"
                    }
                  },
                  "invalid_key": {
                    "summary": "Key not recognized",
                    "value": {
                      "status": "error",
                      "code": "invalid_key",
                      "message": "API key not recognized. Check that the X-API-Key header holds the full key. Get a free key at https://clipparse.com/get-free-key"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`key_revoked`: the API key has been revoked. Not retryable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthError"
                },
                "examples": {
                  "key_revoked": {
                    "summary": "Key revoked",
                    "value": {
                      "status": "error",
                      "code": "key_revoked",
                      "message": "This API key has been revoked. Contact contact@clipparse.com"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The post doesn't exist, was deleted, or isn't publicly viewable (`post_unavailable`). Not retryable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostUnavailableResponse"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: retry after `Retry-After` seconds. `quota_exceeded`: the allowance is spent until `resetsAt`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthError"
                },
                "examples": {
                  "rate_limited": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "code": "rate_limited",
                      "message": "Too many requests. Retry after the number of seconds in the Retry-After header."
                    }
                  },
                  "quota_exceeded": {
                    "summary": "Free allowance spent",
                    "value": {
                      "status": "error",
                      "code": "quota_exceeded",
                      "message": "This key's allowance is spent until the time in resetsAt. See plans at https://clipparse.com/pricing",
                      "resetsAt": "2026-11-14T00:00:00Z",
                      "upgradeUrl": "https://clipparse.com/pricing"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Transient server-side failure. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/extract/schema-org": {
      "post": {
        "tags": [
          "extract"
        ],
        "summary": "Extract a recipe as schema.org/Recipe JSON-LD",
        "description": "Extracts a recipe from a TikTok or Instagram post and returns it as a schema.org/Recipe JSON-LD document. It takes the same request as `/v1/extract` and shares its API key and allowance.\n\nOn `success` the body is a bare `schema.org/Recipe` object served as `application/ld+json`, so it drops straight into a schema.org importer with no unwrapping. Non-success outcomes are unchanged from `/v1/extract`: `no_recipe` (HTTP 200), `platform_unsupported` (HTTP 400), `post_unavailable` (HTTP 404), and `internal_error` (HTTP 500), each a `{status, code}` JSON body. The response `Content-Type` alone discriminates a success (`application/ld+json`) from a `no_recipe` verdict (`application/json`).",
        "operationId": "extract_schema_org_v1_extract_schema_org_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Extraction completed. On `success` the body is a bare `schema.org/Recipe` JSON-LD object (`application/ld+json`). A `no_recipe` verdict passes through unchanged from `/v1/extract`: `application/json` with a `{status, code}` body. Discriminate on the `Content-Type`.",
            "content": {
              "application/json": {
                "schema": {},
                "examples": {
                  "no_recipe_found": {
                    "summary": "No recipe in the post",
                    "value": {
                      "status": "no_recipe",
                      "code": "no_recipe_found"
                    }
                  },
                  "multiple_recipes_detected": {
                    "summary": "Multiple recipes in one post",
                    "value": {
                      "status": "no_recipe",
                      "code": "multiple_recipes_detected"
                    }
                  }
                }
              },
              "application/ld+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "@context": "https://schema.org",
                  "@type": "Recipe",
                  "name": "One-Pan Garlic Butter Pasta",
                  "inLanguage": "en",
                  "mainEntityOfPage": "https://www.tiktok.com/@chef/video/7300000000000000000",
                  "image": "https://p16-sign.tiktokcdn.com/example/thumb.jpg",
                  "recipeYield": "2",
                  "prepTime": "PT5M",
                  "cookTime": "PT15M",
                  "recipeIngredient": [
                    "200g spaghetti",
                    "3 cloves garlic, minced",
                    "2-3 tbsp butter",
                    "salt to taste"
                  ],
                  "recipeInstructions": [
                    {
                      "@type": "HowToStep",
                      "text": "Boil the spaghetti until al dente."
                    },
                    {
                      "@type": "HowToStep",
                      "text": "Melt the butter, cook the garlic until fragrant, then toss with the drained pasta."
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "URL is not on a supported platform (`platform_unsupported`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformUnsupportedResponse"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: no `X-API-Key` header. `invalid_key`: the key isn't recognized. Not retryable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthError"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "No API key",
                    "value": {
                      "status": "error",
                      "code": "unauthorized",
                      "message": "No API key. Send your key in the X-API-Key header. Get a free key at https://clipparse.com/get-free-key"
                    }
                  },
                  "invalid_key": {
                    "summary": "Key not recognized",
                    "value": {
                      "status": "error",
                      "code": "invalid_key",
                      "message": "API key not recognized. Check that the X-API-Key header holds the full key. Get a free key at https://clipparse.com/get-free-key"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`key_revoked`: the API key has been revoked. Not retryable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthError"
                },
                "examples": {
                  "key_revoked": {
                    "summary": "Key revoked",
                    "value": {
                      "status": "error",
                      "code": "key_revoked",
                      "message": "This API key has been revoked. Contact contact@clipparse.com"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The post doesn't exist, was deleted, or isn't publicly viewable (`post_unavailable`). Not retryable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostUnavailableResponse"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: retry after `Retry-After` seconds. `quota_exceeded`: the allowance is spent until `resetsAt`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthError"
                },
                "examples": {
                  "rate_limited": {
                    "summary": "Too many requests",
                    "value": {
                      "status": "error",
                      "code": "rate_limited",
                      "message": "Too many requests. Retry after the number of seconds in the Retry-After header."
                    }
                  },
                  "quota_exceeded": {
                    "summary": "Free allowance spent",
                    "value": {
                      "status": "error",
                      "code": "quota_exceeded",
                      "message": "This key's allowance is spent until the time in resetsAt. See plans at https://clipparse.com/pricing",
                      "resetsAt": "2026-11-14T00:00:00Z",
                      "upgradeUrl": "https://clipparse.com/pricing"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Transient server-side failure. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AuthError": {
        "properties": {
          "status": {
            "type": "string",
            "const": "error",
            "title": "Status",
            "default": "error"
          },
          "code": {
            "type": "string",
            "enum": [
              "unauthorized",
              "invalid_key",
              "key_revoked",
              "quota_exceeded",
              "rate_limited"
            ],
            "title": "Code",
            "description": "`unauthorized` or `invalid_key` (401), `key_revoked` (403), `rate_limited` or `quota_exceeded` (429)."
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message",
            "description": "What happened and what to do next, in plain language, for people and AI agents to read. Branch on `code`, not on this text: its wording can change."
          },
          "resetsAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resetsat",
            "description": "`quota_exceeded` only: when the allowance renews (UTC)."
          },
          "upgradeUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upgradeurl",
            "description": "`quota_exceeded` only: where to upgrade."
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "AuthError",
        "description": "Error body for a missing, invalid or revoked API key, or a spent\nallowance or rate limit. Same `{status, code}` shape as the other errors."
      },
      "ExtractRequest": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Url",
            "description": "Public URL of the TikTok or Instagram post to extract.",
            "examples": [
              "https://www.tiktok.com/@chef/video/7300000000000000000"
            ]
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "ExtractRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "Ingredient": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Ingredient name, normalized.",
            "examples": [
              "all-purpose flour"
            ]
          },
          "prep": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prep",
            "description": "Preparation note when the post gives one, such as \"finely chopped\". Null when none is stated."
          },
          "quantity": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantity",
            "description": "Amount expressed in `unit`. For a range such as \"3-4 tbsp\", the midpoint (3.5), with the bounds in `quantityMin` and `quantityMax`. Null when the post gives no amount."
          },
          "quantityMin": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantitymin",
            "description": "Low end of the range when the post gives one, such as 3 for \"3-4 tbsp\", in `unit`. Null for a single amount."
          },
          "quantityMax": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantitymax",
            "description": "High end of the range when the post gives one, such as 4 for \"3-4 tbsp\", in `unit`. Null for a single amount."
          },
          "unit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Unit"
              },
              {
                "type": "null"
              }
            ],
            "description": "Measurement unit for `quantity`. A measurement value (`g`, `ml`, `cup`, and so on) means `quantity` counts that unit. `each` means the ingredient is counted rather than measured, for example 4 eggs. Null means the post gave no unit information, which usually pairs with a null `quantity`."
          },
          "raw": {
            "type": "string",
            "title": "Raw",
            "description": "The ingredient exactly as written in the post, before normalization.",
            "examples": [
              "3 cloves garlic, minced"
            ]
          },
          "section": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Section",
            "description": "Grouping label when the recipe splits ingredients into sections, such as \"For the sauce\". Null when ungrouped."
          }
        },
        "type": "object",
        "required": [
          "name",
          "prep",
          "quantity",
          "quantityMin",
          "quantityMax",
          "unit",
          "raw",
          "section"
        ],
        "title": "Ingredient"
      },
      "InternalErrorResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "error",
            "title": "Status",
            "description": "Outcome discriminator. Always `error` for this response.",
            "default": "error"
          },
          "code": {
            "type": "string",
            "const": "internal_error",
            "title": "Code",
            "description": "A transient server-side failure. Retry with backoff.",
            "default": "internal_error"
          }
        },
        "type": "object",
        "title": "InternalErrorResponse"
      },
      "NoRecipeResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "no_recipe",
            "title": "Status",
            "description": "Outcome discriminator. `no_recipe` means the request succeeded but produced no recipe. Returned with HTTP 200; not retryable.",
            "default": "no_recipe"
          },
          "code": {
            "type": "string",
            "enum": [
              "no_recipe_found",
              "multiple_recipes_detected"
            ],
            "title": "Code",
            "description": "Reason no recipe was returned. `no_recipe_found`: the post contained no recipe. `multiple_recipes_detected`: it contained more than one recipe, which this version does not split."
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "NoRecipeResponse"
      },
      "PlatformUnsupportedResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "error",
            "title": "Status",
            "description": "Outcome discriminator. Always `error` for this response.",
            "default": "error"
          },
          "code": {
            "type": "string",
            "const": "platform_unsupported",
            "title": "Code",
            "description": "The URL is not a TikTok or Instagram post.",
            "default": "platform_unsupported"
          }
        },
        "type": "object",
        "title": "PlatformUnsupportedResponse"
      },
      "PostUnavailableResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "error",
            "title": "Status",
            "description": "Outcome discriminator. Always `error` for this response.",
            "default": "error"
          },
          "code": {
            "type": "string",
            "const": "post_unavailable",
            "title": "Code",
            "description": "The post doesn't exist, was deleted, or isn't publicly viewable. Retrying the same URL won't help.",
            "default": "post_unavailable"
          }
        },
        "type": "object",
        "title": "PostUnavailableResponse"
      },
      "Recipe": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title",
            "description": "Recipe title."
          },
          "language": {
            "type": "string",
            "title": "Language",
            "description": "Language of the recipe content as a short code, for example \"en\"."
          },
          "sourceUrl": {
            "type": "string",
            "title": "Sourceurl",
            "description": "URL of the source post.",
            "examples": [
              "https://www.tiktok.com/@chef/video/7300000000000000000"
            ]
          },
          "thumbnailUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnailurl",
            "description": "URL of the post's thumbnail image when available. Null otherwise."
          },
          "servings": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Servings",
            "description": "Number of servings when stated. Null when not given."
          },
          "prepTimeMinutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preptimeminutes",
            "description": "Preparation time in minutes when stated. Null when not given."
          },
          "cookTimeMinutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cooktimeminutes",
            "description": "Cooking time in minutes when stated. Null when not given."
          },
          "ingredients": {
            "items": {
              "$ref": "#/components/schemas/Ingredient"
            },
            "type": "array",
            "title": "Ingredients",
            "description": "Ingredients, in the order the post lists them."
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/Step"
            },
            "type": "array",
            "title": "Steps",
            "description": "Steps, in order."
          }
        },
        "type": "object",
        "required": [
          "title",
          "language",
          "sourceUrl",
          "thumbnailUrl",
          "servings",
          "prepTimeMinutes",
          "cookTimeMinutes",
          "ingredients",
          "steps"
        ],
        "title": "Recipe",
        "examples": [
          {
            "cookTimeMinutes": 15,
            "ingredients": [
              {
                "name": "spaghetti",
                "quantity": 200,
                "raw": "200g spaghetti",
                "unit": "g"
              },
              {
                "name": "garlic cloves",
                "prep": "minced",
                "quantity": 3,
                "raw": "3 cloves garlic, minced",
                "unit": "each"
              },
              {
                "name": "butter",
                "quantity": 2.5,
                "quantityMax": 3,
                "quantityMin": 2,
                "raw": "2-3 tbsp butter",
                "unit": "tbsp"
              },
              {
                "name": "salt",
                "raw": "salt to taste"
              }
            ],
            "language": "en",
            "prepTimeMinutes": 5,
            "servings": 2,
            "sourceUrl": "https://www.tiktok.com/@chef/video/7300000000000000000",
            "steps": [
              {
                "durationMinutes": 10,
                "text": "Boil the spaghetti until al dente."
              },
              {
                "durationMinutes": 5,
                "text": "Melt the butter, cook the garlic until fragrant, then toss with the drained pasta."
              }
            ],
            "thumbnailUrl": "https://p16-sign.tiktokcdn.com/example/thumb.jpg",
            "title": "One-Pan Garlic Butter Pasta"
          }
        ]
      },
      "Step": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text",
            "description": "The instruction text for this step."
          },
          "durationMinutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Durationminutes",
            "description": "Duration of this step in minutes when stated. Null when not given."
          },
          "section": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Section",
            "description": "Grouping label when the recipe splits steps into sections. Null when ungrouped."
          }
        },
        "type": "object",
        "required": [
          "text",
          "durationMinutes",
          "section"
        ],
        "title": "Step"
      },
      "SuccessResponse": {
        "properties": {
          "status": {
            "type": "string",
            "const": "success",
            "title": "Status",
            "description": "Outcome discriminator. `success` means a recipe was extracted.",
            "default": "success"
          },
          "recipe": {
            "$ref": "#/components/schemas/Recipe",
            "description": "The extracted recipe."
          }
        },
        "type": "object",
        "required": [
          "recipe"
        ],
        "title": "SuccessResponse"
      },
      "Unit": {
        "type": "string",
        "enum": [
          "g",
          "kg",
          "ml",
          "l",
          "tsp",
          "tbsp",
          "cup",
          "pt",
          "qt",
          "gal",
          "oz",
          "lb",
          "pinch",
          "each"
        ],
        "title": "Unit"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "description": "Your ClipParse API key. Get a free one at https://clipparse.com/get-free-key.",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
