openapi: 3.0.0
info:
  title: eBay Seller API
  description: |
    Retrieve an eBay seller's profile: feedback score, positive feedback share and ratings by period, detailed seller ratings, membership details, the followers, items sold, categories and listings the seller's eBay page shows, and the eBay store for sellers who have one.

    **Cross-linking**: The seller `name` in eBay Search API results is the seller's username. Pass it as the `username` parameter. The `item_id` of a listing can be used with the eBay Product API to fetch the full listing.
  version: 1.0.0
servers:
- url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: eBay Seller Search
      security:
      - ApiKeyAuth: []
      - ApiKeyQuery: []
      parameters:
      - name: engine
        in: query
        required: true
        description: Search engine to use
        schema:
          type: string
          enum:
          - ebay_seller
      - name: username
        in: query
        required: true
        description: eBay user ID of the seller, as in the seller's profile link (e.g. `musicmagpie` in `ebay.com/usr/musicmagpie`).
        schema:
          type: string
          pattern: '^\.*[A-Za-z0-9*_-][A-Za-z0-9.*_-]*$'
          maxLength: 64
      - name: ebay_domain
        in: query
        required: false
        description: eBay domain to load the seller's profile from. It sets the language, and which of the seller's listings are shown.
        schema:
          type: string
          enum: ["ebay.com", "ebay.com.au", "ebay.at", "befr.ebay.be", "benl.ebay.be", "ebay.ca", "cafr.ebay.ca", "ebay.fr", "ebay.de", "ebay.com.hk", "ebay.ie", "ebay.it", "ebay.com.my", "ebay.nl", "ebay.pl", "ebay.com.sg", "ebay.es", "ebay.ch", "ebay.co.uk"]
          default: "ebay.com"
      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'
        '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: Timeout. We could not retrieve results in 90 seconds.
          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'
        seller:
          $ref: '#/components/schemas/Seller'
        feedback_ratings:
          $ref: '#/components/schemas/FeedbackRatings'
        feature_rating:
          type: array
          description: Detailed seller ratings, one per aspect of the sale
          items:
            $ref: '#/components/schemas/FeatureRating'
        categories:
          type: array
          description: Categories the seller's listings are in
          items:
            $ref: '#/components/schemas/Category'
        listings:
          type: array
          description: Listings the seller's eBay page shows
          items:
            $ref: '#/components/schemas/Listing'
        error:
          type: string
          description: Message that eBay has no member with the username, or that the member is no longer registered
    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: "eBay URL for this search"
        html_url:
          type: string
          description: "URL to view HTML results"
        json_url:
          type: string
          description: "URL to view JSON results"
    SearchParameters:
      type: object
      properties:
        engine:
          type: string
          description: Search engine used
        username:
          type: string
          description: eBay user ID of the seller
        ebay_domain:
          type: string
          description: eBay domain the profile was loaded from
    Seller:
      type: object
      required:
      - username
      - name
      - link
      - joined
      - location
      properties:
        username:
          type: string
          description: eBay user ID of the seller
        name:
          type: string
          description: Name the seller's profile shows, the store name or the user ID
        link:
          type: string
          description: Link to the seller's eBay profile
        has_store:
          type: boolean
          description: Whether the seller has an eBay store
        store_id:
          type: string
          description: ID of the seller's eBay store
        store_link:
          type: string
          description: Link to the seller's eBay store
        reviews:
          type: integer
          description: Seller's feedback score
        feedback_received:
          type: integer
          description: Number of feedback the seller has received
        positive_feedback_percent:
          type: number
          description: Share of positive feedback over the last 12 months, in percent
        star:
          type: string
          description: Color of the feedback star the seller's feedback score earns
        followers:
          type: integer
          description: Number of members following the seller
        items_sold:
          type: string
          description: Number of items the seller has sold, as eBay shows it
        extracted_items_sold:
          type: integer
          description: Number of items the seller has sold
        total_listings:
          type: integer
          description: Number of the seller's listings shown on this eBay domain
        is_top_rated:
          type: boolean
          description: Whether the seller is an eBay Top Rated seller
        is_direct_from_seller:
          type: boolean
          description: Whether eBay marks the store as selling direct from the brand
        is_business_seller:
          type: boolean
          description: Whether the seller is registered as a business seller
        is_verified:
          type: boolean
          description: Whether eBay has verified the seller's identity
        joined:
          type: string
          description: Date the seller joined eBay, as eBay shows it
        location:
          type: string
          description: Country or region the seller is registered in
        bio:
          type: string
          description: Description the seller's eBay page shows
        thumbnail:
          type: string
          description: Seller's profile picture or store logo
        banner:
          type: string
          description: Banner image of the seller's store
    FeedbackRatings:
      type: object
      description: Number of feedback ratings the seller received, by rating and period
      required:
      - positive
      - neutral
      - negative
      properties:
        positive:
          $ref: '#/components/schemas/FeedbackRatingCounts'
        neutral:
          $ref: '#/components/schemas/FeedbackRatingCounts'
        negative:
          $ref: '#/components/schemas/FeedbackRatingCounts'
    FeedbackRatingCounts:
      type: object
      required:
      - one_month
      - six_months
      - twelve_months
      properties:
        one_month:
          type: integer
          description: Ratings received in the last month
        six_months:
          type: integer
          description: Ratings received in the last 6 months
        twelve_months:
          type: integer
          description: Ratings received in the last 12 months
    FeatureRating:
      type: object
      required:
      - text
      - rating
      - reviews
      properties:
        text:
          type: string
          description: Aspect of the sale the rating is about
        rating:
          type: number
          description: Average rating out of 5
        reviews:
          type: integer
          description: Number of buyers who rated this aspect
    Category:
      type: object
      required:
      - name
      - link
      properties:
        name:
          type: string
          description: Category name
        category_id:
          type: string
          description: eBay category ID
        store_category_id:
          type: string
          description: ID of a category the store owner created
        link:
          type: string
          description: Link to the seller's listings in this category
        subcategories:
          type: array
          description: Subcategories of this category
          items:
            $ref: '#/components/schemas/Category'
    Listing:
      type: object
      required:
      - position
      - item_id
      - title
      - link
      - price
      - thumbnail
      properties:
        position:
          type: integer
          description: Position of the listing on the seller's eBay page
        item_id:
          type: string
          description: eBay item ID of the listing
        title:
          type: string
          description: Listing title
        link:
          type: string
          description: Link to the listing
        price:
          type: string
          description: Price as eBay shows it
        extracted_price:
          type: number
          description: Price as a number
        is_price_range:
          type: boolean
          description: Whether the price is a range across the listing's variations
        extracted_price_range:
          $ref: '#/components/schemas/PriceRange'
        original_price:
          type: string
          description: Price before the discount
        extracted_original_price:
          type: number
          description: Price before the discount, as a number
        bids:
          type: integer
          description: Number of bids on the auction
        time_left:
          type: string
          description: Time left on the auction, as eBay shows it
        condition:
          type: string
          description: Item condition
        location:
          type: string
          description: Where the item ships from
        shipping:
          type: string
          description: Shipping cost or delivery promise
        extracted_shipping:
          type: number
          description: Shipping cost as a number
        stock:
          type: string
          description: Quantity left, as eBay shows it
        extracted_stock:
          type: integer
          description: Quantity left
        deal:
          type: string
          description: Volume or coupon discount on the listing
        rating:
          type: number
          description: Average product rating out of 5
        is_top_rated_plus:
          type: boolean
          description: Whether the listing is Top Rated Plus
        is_free_return:
          type: boolean
          description: Whether returns are free
        thumbnail:
          type: string
          description: Listing image
    PriceRange:
      type: object
      required:
      - from
      - to
      properties:
        from:
          type: number
          description: Lowest price
        to:
          type: number
          description: Highest price
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
