openapi: 3.0.0
info:
  title: Steam Search API
  description: |
    Search the Steam store for games, software, DLC, soundtracks and other products.

    Each result carries its Steam app id, or its package id and the app ids it includes, with the title, store link, capsule image, release date, platforms, price, discount and review summary Steam shows. Prices are in the currency of the `gl` country, as Steam shows them and as numbers. Titles, release dates and review labels are in the `hl` language.

    A search with no `q` browses the whole store with the filters and the sort.
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: Steam Search
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: 'Search engine. Must be set to: `steam_search`'
          schema:
            type: string
            enum: ["steam_search"]
        - name: q
          in: query
          required: false
          description: The terms to search for, up to 64 characters, the limit of the Steam search box. Steam ignores symbols, so `C++` searches for `C`. Leave it out to browse the whole store.
          schema:
            type: string
            maxLength: 64
        - name: gl
          in: query
          required: false
          description: Country of the store (ISO 3166-1 alpha-2, lowercase). It sets the currency of the prices and the products sold there.
          schema:
            type: string
            enum: ["af", "al", "dz", "as", "ad", "ao", "ai", "aq", "ag", "ar", "am", "aw", "au", "at", "az", "bs", "bh", "bd", "bb", "by", "be", "bz", "bj", "bm", "bt", "bo", "ba", "bw", "bv", "br", "io", "bn", "bg", "bf", "bi", "kh", "cm", "ca", "cv", "ky", "cf", "td", "cl", "cn", "cx", "cc", "co", "km", "cg", "cd", "ck", "cr", "ci", "hr", "cu", "cy", "cz", "dk", "dj", "dm", "do", "ec", "eg", "sv", "gq", "er", "ee", "et", "fk", "fo", "fj", "fi", "fr", "gf", "pf", "tf", "ga", "gm", "ge", "de", "gh", "gi", "gr", "gl", "gd", "gp", "gu", "gt", "gn", "gw", "gy", "ht", "hm", "va", "hn", "hk", "hu", "is", "in", "id", "ir", "iq", "ie", "il", "it", "jm", "jp", "jo", "kz", "ke", "ki", "kp", "kr", "kw", "kg", "la", "lv", "lb", "ls", "lr", "ly", "li", "lt", "lu", "mo", "mk", "mg", "mw", "my", "mv", "ml", "mt", "mh", "mq", "mr", "mu", "yt", "mx", "fm", "md", "mc", "mn", "ms", "ma", "mz", "mm", "na", "nr", "np", "nl", "nc", "nz", "ni", "ne", "ng", "nu", "nf", "mp", "no", "om", "pk", "pw", "ps", "pa", "pg", "py", "pe", "ph", "pn", "pl", "pt", "pr", "qa", "re", "ro", "ru", "rw", "sh", "kn", "lc", "pm", "vc", "ws", "sm", "st", "sa", "sn", "rs", "sc", "sl", "sg", "sk", "si", "sb", "so", "za", "gs", "es", "lk", "sd", "sr", "sj", "sz", "se", "ch", "sy", "tw", "tj", "tz", "th", "tl", "tg", "tk", "to", "tt", "tn", "tr", "tm", "tc", "tv", "ug", "ua", "ae", "uk", "gb", "us", "um", "uy", "uz", "vu", "ve", "vn", "vg", "vi", "wf", "eh", "ye", "zm", "zw", "gg", "je", "im", "me"]
            default: "us"
        - name: hl
          in: query
          required: false
          description: Language of titles, release dates and review labels. An app's review numbers count the reviews written in that language when it has enough of them.
          schema:
            type: string
            enum: ["ar", "bg", "zh-cn", "zh-tw", "cs", "da", "nl", "en", "fi", "fr", "de", "el", "hu", "id", "it", "ja", "ko", "ms", "no", "pl", "pt", "pt-br", "ro", "ru", "es", "es-419", "sv", "th", "tr", "uk", "vi"]
            default: "en"
        - name: product_type
          in: query
          required: false
          description: 'Limits the results to one or more product types, comma-separated. Options: `games`, `software`, `dlc`, `demos`, `soundtracks`, `playtests`, `videos`, `mods`, `hardware`.'
          schema:
            type: string
            pattern: '^(games|software|dlc|demos|soundtracks|playtests|videos|mods|hardware)( *, *(games|software|dlc|demos|soundtracks|playtests|videos|mods|hardware))*$'
        - name: platform
          in: query
          required: false
          description: 'Limits the results to products for one or more operating systems, comma-separated. Options: `windows`, `mac`, `linux`.'
          schema:
            type: string
            pattern: '^(windows|mac|linux)( *, *(windows|mac|linux))*$'
        - name: supported_language
          in: query
          required: false
          description: Limits the results to products that support one or more languages, comma-separated, given as `hl` codes such as `de,ja`.
          schema:
            type: string
            pattern: '^(ar|bg|zh-cn|zh-tw|cs|da|nl|en|fi|fr|de|el|hu|id|it|ja|ko|ms|no|pl|pt|pt-br|ro|ru|es|es-419|sv|th|tr|uk|vi)( *, *(ar|bg|zh-cn|zh-tw|cs|da|nl|en|fi|fr|de|el|hu|id|it|ja|ko|ms|no|pl|pt|pt-br|ro|ru|es|es-419|sv|th|tr|uk|vi))*$'
        - name: is_discounted
          in: query
          required: false
          description: Set to `true` to return only discounted products.
          schema:
            type: boolean
        - name: safe
          in: query
          required: false
          description: Controls adult content. `active` leaves it out, as the store does for a visitor who is not signed in, and `off` includes it.
          schema:
            type: string
            enum: ["active", "off"]
            default: "active"
        - name: sort_by
          in: query
          required: false
          description: Sorts the results. Sorting by `newest` or `user_reviews` leaves out products with no release date or no reviews, and sorting by `name` can start with products Steam shows without a name, which come without `title`.
          schema:
            type: string
            enum: ["relevance", "newest", "name", "price_low_to_high", "price_high_to_low", "user_reviews", "deck_compatibility_date"]
            default: "relevance"
        - name: page
          in: query
          required: false
          description: Page of results.
          schema:
            type: integer
            minimum: 1
            maximum: 1000000
            default: 1
        - name: num
          in: query
          required: false
          description: Number of results per page. Store pages hold 25, so `pagination.next` links to the next one when `num` is 25.
          schema:
            type: integer
            minimum: 25
            maximum: 100
            default: 50
      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'
        search_information:
          $ref: '#/components/schemas/SearchInformation'
        organic_results:
          type: array
          description: Products Steam lists for the search, in Steam's order.
          items:
            $ref: '#/components/schemas/OrganicResult'
        pagination:
          $ref: '#/components/schemas/Pagination'
        error:
          type: string
          description: Why the search returned no products.
    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: "Steam store search 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
        q:
          type: string
          description: The terms searched for
        gl:
          type: string
          description: Country of the store
        hl:
          type: string
          description: Language of the results
        sort_by:
          type: string
          description: Sort order
        product_type:
          type: string
          description: Product types the results are limited to
        platform:
          type: string
          description: Operating systems the results are limited to
        supported_language:
          type: string
          description: Languages the results are limited to
        is_discounted:
          type: boolean
          description: Whether only discounted products were asked for
        safe:
          type: string
          description: Adult content setting
        page:
          type: integer
          description: Page of results
        num:
          type: integer
          description: Number of results per page
    SearchInformation:
      type: object
      required: [total_results]
      properties:
        total_results:
          type: integer
          description: Number of products matching the search.
    OrganicResult:
      type: object
      required: [position]
      properties:
        position:
          type: integer
          description: Position of the product in the results, counted across pages.
        app_id:
          type: integer
          description: Steam app id of the product.
        package_id:
          type: integer
          description: Steam package id of the product.
        app_ids:
          type: array
          description: Steam app ids of the apps the package includes.
          items:
            type: integer
        title:
          type: string
          description: Product title.
        link:
          type: string
          description: Store page of the product.
        thumbnail:
          type: string
          description: Capsule image of the product.
        release_date:
          type: string
          description: Release date as Steam shows it, which can also be a text such as "Coming soon".
        platforms:
          type: array
          description: Operating systems the product runs on.
          items:
            type: string
            enum: ["windows", "mac", "linux"]
        vr_support:
          type: string
          description: Whether the product needs a VR headset or supports one.
          enum: ["required", "supported"]
        price:
          type: string
          description: Price as Steam shows it, in the currency of the store country.
        extracted_price:
          type: number
          description: Price as a number.
        is_free:
          type: boolean
          description: Whether the product is free.
        original_price:
          type: string
          description: Price before the discount, as Steam shows it.
        extracted_original_price:
          type: number
          description: Price before the discount, as a number.
        discount_percentage:
          type: integer
          description: Discount in percent.
        rating_label:
          type: string
          description: Steam's label for the product's user reviews, such as "Very Positive".
        reviews:
          type: integer
          description: Number of user reviews the label and the percentage are based on.
        recommended_percentage:
          type: integer
          description: Percentage of those reviewers who recommend the product.
    Pagination:
      type: object
      required: [current]
      properties:
        current:
          type: integer
          description: Current page.
        next:
          type: string
          description: Steam store page with the next 25 results.
    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
