openapi: 3.0.0
info:
  title: Vinted Product API
  description: |
    Get one Vinted item by its id, on any of Vinted's 27 country sites.

    The answer carries the item's title, description, brand, category, size, condition, color and material, every photo, the price, Vinted's buyer protection fee and the total, the cheapest shipping, likes, whether the item is sold or reserved, and the seller's username or business name, rating, review count and badges. Prices are in the site's currency, as text and as numbers. The text is the amount with a dot decimal and the currency symbol after it (e.g., `12.00 €`), as in Vinted Search.

    Any item opens on any site. The site sets the currency and the language of every label, such as `condition` and `size`. When the seller prices the item in another currency, the answer also carries the seller's own price.
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: Vinted Product
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: 'Search engine. Must be set to: `vinted_product`'
          schema:
            type: string
            enum: ["vinted_product"]
        - name: item_id
          in: query
          required: true
          description: Vinted item id, the number in the item's link and the `item_id` of a Vinted Search result (e.g., `10816398352`).
          schema:
            type: string
            pattern: '^[1-9][0-9]{0,17}$'
        - name: vinted_domain
          in: query
          required: false
          description: Vinted country site to open the item on. It sets the currency, the shipping price and the language of every label.
          schema:
            type: string
            enum: ["vinted.fr", "vinted.be", "vinted.es", "vinted.lu", "vinted.nl", "vinted.lt", "vinted.de", "vinted.at", "vinted.it", "vinted.co.uk", "vinted.pt", "vinted.com", "vinted.cz", "vinted.sk", "vinted.pl", "vinted.se", "vinted.ro", "vinted.hu", "vinted.dk", "vinted.fi", "vinted.hr", "vinted.gr", "vinted.ie", "vinted.ee", "vinted.lv", "vinted.si", "vinted.com.au"]
            default: "vinted.fr"
        - name: zero_retention
          in: query
          required: false
          description: Set to true to disable logging and persistent storage for this request. Enterprise plans only.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          description: Validation Error. There is an issue with query parameters, such as missing required parameters or invalid values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication Error. The API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden. Zero data retention is not available to the account, or the account requires `zero_retention=true`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate Limit Exceeded. The number of allowed requests has been exceeded. Consider upgrading your plan or waiting for the limit to reset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error. Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Retrieval failure. We could not retrieve results in 90 seconds, or Vinted kept answering with nothing usable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use Bearer authentication. Format: "Bearer YOUR_API_KEY"'
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: Pass API key as query parameter
  schemas:
    SearchResponse:
      type: object
      properties:
        search_metadata:
          $ref: '#/components/schemas/SearchMetadata'
        search_parameters:
          $ref: '#/components/schemas/SearchParameters'
        item:
          $ref: '#/components/schemas/Item'
        error:
          type: string
          description: Why the search returned no item.
    SearchMetadata:
      type: object
      required: [status, created_at]
      properties:
        id:
          type: string
          description: "Unique identifier for the search request"
        status:
          type: string
          description: "Status of the search request"
        created_at:
          type: string
          format: date-time
          description: "Timestamp when the search was created"
        request_time_taken:
          type: number
          description: "Time taken to make the request in seconds"
        parsing_time_taken:
          type: number
          description: "Time taken to parse the results in seconds"
        total_time_taken:
          type: number
          description: "Total time taken for the search in seconds"
        request_url:
          type: string
          description: "Vinted item page for this search"
        html_url:
          type: string
          description: "URL to view the raw results"
        json_url:
          type: string
          description: "URL to view JSON results"
    SearchParameters:
      type: object
      properties:
        engine:
          type: string
          description: Search engine used
        item_id:
          type: string
          description: Vinted item id asked for
        vinted_domain:
          type: string
          description: Vinted country site the item was opened on
        zero_retention:
          type: boolean
          description: Whether zero data retention was requested
    Item:
      type: object
      required: [item_id, price, extracted_price, currency, total_price, extracted_total_price, is_sold, is_reserved]
      properties:
        item_id:
          type: integer
          description: Vinted item id.
        title:
          type: string
          description: Item title, as the seller wrote it.
        link:
          type: string
          description: Item page on Vinted.
        description:
          type: string
          description: Item description, as the seller wrote it.
        brand:
          type: string
          description: Brand as Vinted prints it on the item.
        brand_id:
          type: integer
          description: Vinted brand id, which Vinted Search takes in `brand_id`.
        category_id:
          type: integer
          description: Vinted id of the item's category, which Vinted Search takes in `category_id`.
        categories:
          type: array
          description: The item's category and the categories above it, from the top.
          items:
            $ref: '#/components/schemas/Category'
        condition:
          type: string
          description: Condition as Vinted prints it on the item, in the site's language.
        is_new:
          type: boolean
          description: Whether the item is new, with or without its tags.
        size:
          type: string
          description: Size as Vinted prints it on the item, in the site's own sizing and language.
        color:
          type: string
          description: Colors as Vinted prints them on the item, in the site's language.
        material:
          type: string
          description: Materials as Vinted prints them on the item, in the site's language.
        specifications:
          type: array
          description: Listing attributes such as brand, size, condition, author and ISBN, with the site's own labels.
          items:
            $ref: '#/components/schemas/Specification'
        price:
          type: string
          description: Price as text, the amount with a dot decimal and the currency symbol after it (e.g., `12.00 €`).
        extracted_price:
          type: number
          description: Numeric price.
        currency:
          type: string
          description: ISO 4217 code of the site's currency.
        seller_price:
          type: string
          description: The seller's own price as text, when the seller prices the item in another currency than the site's.
        extracted_seller_price:
          type: number
          description: Numeric seller's own price.
        seller_currency:
          type: string
          description: ISO 4217 code of the seller's currency.
        buyer_protection_fee:
          type: string
          description: Vinted's buyer protection fee as text, in the same format as `price`.
        extracted_buyer_protection_fee:
          type: number
          description: Numeric buyer protection fee.
        total_price:
          type: string
          description: Price with Vinted's buyer protection fee, as text in the same format as `price`.
        extracted_total_price:
          type: number
          description: Numeric price with Vinted's buyer protection fee.
        shipping:
          type: string
          description: Cheapest shipping Vinted offers for the item, as text in the same format as `price`.
        extracted_shipping:
          type: number
          description: Numeric cheapest shipping.
        likes:
          type: integer
          description: Number of members who marked the item as a favourite.
        is_sold:
          type: boolean
          description: Whether the item is sold.
        is_reserved:
          type: boolean
          description: Whether the seller has reserved the item for a buyer.
        main_image:
          type: string
          description: Item's main photo.
        images:
          type: array
          description: Every photo of the item, the main one first.
          items:
            type: string
        seller:
          $ref: '#/components/schemas/Seller'
    Category:
      type: object
      required: [title, category_id, link]
      properties:
        title:
          type: string
          description: Category name, in the site's language.
        category_id:
          type: integer
          description: Vinted category id.
        link:
          type: string
          description: Category page on Vinted.
    Specification:
      type: object
      required: [name, value]
      properties:
        name:
          type: string
          description: Detail label, in the site's language.
        value:
          type: string
          description: Detail value.
    Seller:
      type: object
      description: Member who sells the item.
      required: [id, is_business]
      properties:
        id:
          type: integer
          description: Vinted member id.
        username:
          type: string
          description: Member's username on Vinted.
        name:
          type: string
          description: A business seller's trading name.
        link:
          type: string
          description: Member's profile on Vinted.
        is_business:
          type: boolean
          description: Whether the seller is a business account.
        rating:
          type: number
          description: Member's rating from 0 to 5, as Vinted shows it in stars.
        reviews:
          type: integer
          description: Number of reviews the member has received.
        thumbnail:
          type: string
          description: Member's profile photo.
        badges:
          type: array
          description: Vinted's badges for the member, such as `active_lister` or `speedy_shipping`.
          items:
            type: string
    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
