{"files":{"SKILL.md":"---\nname: legacy-search-api\ndescription: \"Legacy Search API skill. Use when working with Legacy Search for api, buscaautocomplete. Covers 15 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Legacy Search API\nAPI version: 1.0\n\n## Auth\nApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header\n\n## Base URL\nhttps://apiexamples.vtexcommercestable.com.br\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /api/catalog_system/pub/products/search -- verify access\n\n## Endpoints\n\n15 endpoints across 2 groups. See references/api-spec.lap for full details.\n\n### api\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /api/catalog_system/pub/products/crossselling/whosawalsosaw/{productId} | Get product search of who saw also saw |\n| GET | /api/catalog_system/pub/products/crossselling/whosawalsobought/{productId} | Get product search of who saw also bought |\n| GET | /api/catalog_system/pub/products/crossselling/whoboughtalsobought/{productId} | Get product search of who bought also bought |\n| GET | /api/catalog_system/pub/products/crossselling/showtogether/{productId} | Get product search of show together |\n| GET | /api/catalog_system/pub/products/crossselling/accessories/{productId} | Get product search of accessories |\n| GET | /api/catalog_system/pub/products/crossselling/similars/{productId} | Get product search of similars |\n| GET | /api/catalog_system/pub/products/crossselling/suggestions/{productId} | Get product search of suggestions |\n| GET | /api/catalog_system/pub/products/search/{search} | Search for products |\n| GET | /api/catalog_system/pub/products/search | Search for products with filter, order and pagination |\n| GET | /api/catalog_system/pub/products/search/{product-text-link}/p | Search product by product URL |\n| GET | /api/catalog_system/pub/products/offers/{productId} | Search product offers |\n| GET | /api/catalog_system/pub/products/offers/{productId}/sku/{skuId} | Search SKU offers |\n| GET | /api/catalog_system/pub/facets/category/{categoryId} | Get category facets |\n| GET | /api/catalog_system/pub/facets/search/{term} | Search by store facets |\n\n### buscaautocomplete\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /buscaautocomplete | Product search autocomplete |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Get whosawalsosaw details?\" -> GET /api/catalog_system/pub/products/crossselling/whosawalsosaw/{productId}\n- \"Get whosawalsobought details?\" -> GET /api/catalog_system/pub/products/crossselling/whosawalsobought/{productId}\n- \"Get whoboughtalsobought details?\" -> GET /api/catalog_system/pub/products/crossselling/whoboughtalsobought/{productId}\n- \"Get showtogether details?\" -> GET /api/catalog_system/pub/products/crossselling/showtogether/{productId}\n- \"Get accessory details?\" -> GET /api/catalog_system/pub/products/crossselling/accessories/{productId}\n- \"Get similar details?\" -> GET /api/catalog_system/pub/products/crossselling/similars/{productId}\n- \"Get suggestion details?\" -> GET /api/catalog_system/pub/products/crossselling/suggestions/{productId}\n- \"Search search?\" -> GET /api/catalog_system/pub/products/search/{search}\n- \"List all search?\" -> GET /api/catalog_system/pub/products/search\n- \"List all p?\" -> GET /api/catalog_system/pub/products/search/{product-text-link}/p\n- \"Get offer details?\" -> GET /api/catalog_system/pub/products/offers/{productId}\n- \"Get sku details?\" -> GET /api/catalog_system/pub/products/offers/{productId}/sku/{skuId}\n- \"Get category details?\" -> GET /api/catalog_system/pub/facets/category/{categoryId}\n- \"Get search details?\" -> GET /api/catalog_system/pub/facets/search/{term}\n- \"List all buscaautocomplete?\" -> GET /buscaautocomplete\n- \"How to authenticate?\" -> See Auth section\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n\n## CLI\n\n```bash\n# Update this spec to the latest version\nnpx @lap-platform/lapsh get legacy-search-api -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search legacy-search-api\n```\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Legacy Search API\n@base https://apiexamples.vtexcommercestable.com.br\n@version 1.0\n@auth ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header\n@common_fields {Accept: str # HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand., Content-Type: str # Describes the type of the content being sent.}\n@endpoints 15\n@toc api(14), buscaautocomplete(1)\n\n@group api\n@endpoint GET /api/catalog_system/pub/products/crossselling/whosawalsosaw/{productId}\n@desc Get product search of who saw also saw\n@required {productId: int # Product unique identifier.}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/crossselling/whosawalsobought/{productId}\n@desc Get product search of who saw also bought\n@required {productId: str # Product unique identifier.}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/crossselling/whoboughtalsobought/{productId}\n@desc Get product search of who bought also bought\n@required {productId: str # Product unique identifier.}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/crossselling/showtogether/{productId}\n@desc Get product search of show together\n@required {productId: int # Product's unique identifier}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/crossselling/accessories/{productId}\n@desc Get product search of accessories\n@required {productId: int # Product's unique identifier}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/crossselling/similars/{productId}\n@desc Get product search of similars\n@required {productId: int # Product's unique identifier}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/crossselling/suggestions/{productId}\n@desc Get product search of suggestions\n@required {productId: int # Product's unique identifier}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/search/{search}\n@desc Search for products\n@required {search: str # Term used to search products}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/search\n@desc Search for products with filter, order and pagination\n@optional {_from: str # Starting page of the pagination range. This number must be below or equal to 2500 for the query to work. Note that the difference between the initial and final pages cannot exceed 50 pages. Therefore, each page will display a maximum of 50 items., _to: str # Final page of the pagination range. Note that the difference between the initial and final pages cannot exceed 50 pages. Therefore, each page will display a maximum of 50 items., ft: str # Filter by full text. The form is`ft={searchWord}`., fq: str # General filter. It can be by category (`fq=C:{a}/{b}`), by specification (`fq=specificationFilter_{a}:{b}`),  by price range (`fq=P:[{a} TO {b}]`), by collection (`fq=productClusterIds:{{productClusterId}}`), by product ID (`fq=productId:{{productId}}`),  by SKU ID (`fq=skuId:{{skuId}}`), by Reference ID (`fq=alternateIds_RefId:{{referenceId}}`), by EAN13 (`fq=alternateIds_Ean:{{ean13}}`), by availability at a specific sales channel (`fq=isAvailablePerSalesChannel_{{sc}}:{{bool}}`), by available at a specific seller (`fq=sellerId:{{sellerId}}`)., O: str # Sorting method. It can be by Price (`O=OrderByPriceDESC` or `O=OrderByPriceASC`), by Top Selling Products (`O=OrderByTopSaleDESC`), by Best Reviews (`O=OrderByReviewRateDESC`), by Name (`O=OrderByNameASC` or `O=OrderByNameDESC`), by Release Date (`O=OrderByReleaseDateDESC`), by Best Discounts (`O=OrderByBestDiscountDESC`), by Score (`O=OrderByScoreDESC`).}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/search/{product-text-link}/p\n@desc Search product by product URL\n@required {product-text-link: str # Product URL}\n@returns(200)\n\n@endpoint GET /api/catalog_system/pub/products/offers/{productId}\n@desc Search product offers\n@required {productId: str # Product unique number identifier.}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/products/offers/{productId}/sku/{skuId}\n@desc Search SKU offers\n@required {productId: str # Product unique number identifier., skuId: str # Product unique number identifier.}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/facets/category/{categoryId}\n@desc Get category facets\n@required {categoryId: str # Category unique number identifier.}\n@optional {_from: str # Starter page range. These parameters allow the API to be paginated. Take into account that the initial and final pages cannot have a separation superior to 50 pages. Thus, it will be displayed 50 items per page., _to: str # Finisher page range. These parameters allow the API to be paginated. Take into account that the initial and final pages cannot have a separation superior to 50 pages. Thus, it will be displayed 50 items per page.}\n@returns(200) OK\n\n@endpoint GET /api/catalog_system/pub/facets/search/{term}\n@desc Search by store facets\n@required {map: str # Mapping of the term. It can be `c` for a category, `b` for a brand, or `specificationFilter_{specificationId}` for a specification. You need to include a map for each term you are searching for in the same term's order., term: str # Term used for the facet's search. You can search for as much term as you want. The term can be: `categoryId`, `brandId`, `specificationId`.}\n@returns(200) {Departments: [map], Brands: [map], SpecificationFilters: map, CategoriesTrees: [map], PriceRanges: [any], Summary: map{Departments: map{DisplayedItems: int, TotalItems: int}, CategoriesTrees: map{DisplayedItems: int, TotalItems: int}, Brands: map{DisplayedItems: int, TotalItems: int}, PriceRanges: map{DisplayedItems: int, TotalItems: int}, SpecificationFilters: map}} # OK\n\n@endgroup\n\n@group buscaautocomplete\n@endpoint GET /buscaautocomplete\n@desc Product search autocomplete\n@required {productNameContains: str # Part of the string that will be searched.}\n@returns(200) {itemsReturned: [map]} # OK\n\n@endgroup\n\n@end\n"}}