{
  "openapi": "3.1.0",
  "info": {
    "title": "Shopli AliExpress price history API",
    "version": "1.0.0",
    "description": "Shopli records the price and order count of thousands of AliExpress products every day. These read-only endpoints need no key. Shopli is an AliExpress affiliate; buyUrl links carry its tracking. An MCP server with the same tools is at https://www.tryshopli.com/api/mcp."
  },
  "servers": [
    {
      "url": "https://www.tryshopli.com"
    }
  ],
  "paths": {
    "/api/products/price-check": {
      "get": {
        "operationId": "checkAliexpressPrice",
        "summary": "Is this AliExpress price a real deal?",
        "description": "Compares today's price with the prices recorded for the product on previous days. Accepts a product URL, an app share link or an item id. A product not tracked yet gets verdict kind 'new' and is tracked daily from then on.",
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "AliExpress product URL, share link (a.aliexpress.com/_...) or numeric item id."
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "us",
                "uk",
                "eu",
                "fr",
                "de",
                "it",
                "es",
                "il",
                "ru"
              ],
              "default": "us"
            },
            "description": "Sets currency, language and shipping destination."
          }
        ],
        "responses": {
          "200": {
            "description": "Product with verdict and daily price record."
          },
          "400": {
            "description": "Not an AliExpress product link."
          },
          "404": {
            "description": "AliExpress did not return the product for this region."
          }
        }
      }
    },
    "/api/products/picks": {
      "get": {
        "operationId": "getPriceDrops",
        "summary": "Products under their own usual price, surging, or steady bestsellers",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "us",
                "uk",
                "eu",
                "fr",
                "de",
                "it",
                "es",
                "il",
                "ru"
              ],
              "default": "us"
            },
            "description": "Sets currency, language and shipping destination."
          },
          {
            "name": "reason",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "price_drop",
                "surging",
                "bestseller"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 50,
              "default": 12
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked picks with the score broken into its terms."
          }
        }
      }
    },
    "/api/products/search": {
      "get": {
        "operationId": "searchProducts",
        "summary": "Search live AliExpress listings",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "us",
                "uk",
                "eu",
                "fr",
                "de",
                "it",
                "es",
                "il",
                "ru"
              ],
              "default": "us"
            },
            "description": "Sets currency, language and shipping destination."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 10,
              "default": 8
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Quality-filtered products ranked by title match."
          }
        }
      }
    },
    "/api/products/similar": {
      "get": {
        "operationId": "similarProducts",
        "summary": "Products similar to one item",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "us",
                "uk",
                "eu",
                "fr",
                "de",
                "it",
                "es",
                "il",
                "ru"
              ],
              "default": "us"
            },
            "description": "Sets currency, language and shipping destination."
          }
        ],
        "responses": {
          "200": {
            "description": "Related products."
          }
        }
      }
    },
    "/{region}/product/{id}.md": {
      "get": {
        "operationId": "productMarkdown",
        "summary": "A product page as Markdown",
        "parameters": [
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{10,20}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown with price, verdict and daily price record.",
            "content": {
              "text/markdown": {}
            }
          }
        }
      }
    }
  }
}
