openapi: 3.0.0
info:
  title: Steam Game API
  description: |
    Get one Steam store app by its app ID: a game, DLC, soundtrack, video, software or hardware.

    The response carries the app's type, title, descriptions, developers and publishers, its release date, price and discount in the chosen country, its review summary, Metacritic score, platforms, Steam Deck rating, controller support, age, genres, store features, languages, system requirements, DLC, website and support links, screenshots and videos. Text comes in the chosen language.

    **Cross-linking**: the `app_id` is the number after `/app/` in a Steam store page URL.
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: Steam Game Search
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: 'Search engine. Must be set to: `steam_game`'
          schema:
            type: string
            enum: ["steam_game"]
        - name: app_id
          in: query
          required: true
          description: Steam app ID, a whole number from 1 to 4294967295, such as `1091500` for Cyberpunk 2077.
          schema:
            type: string
            pattern: '^[1-9][0-9]{0,9}$'
        - name: gl
          in: query
          required: false
          description: Country of the store (ISO 3166-1 alpha-2), which sets the price and its currency.
          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 the text.
          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"
      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
      required: [search_metadata, search_parameters]
      properties:
        search_metadata:
          $ref: '#/components/schemas/SearchMetadata'
        search_parameters:
          $ref: '#/components/schemas/SearchParameters'
        product:
          $ref: '#/components/schemas/Product'
        screenshots:
          type: array
          items:
            $ref: '#/components/schemas/Screenshot'
        videos:
          type: array
          items:
            $ref: '#/components/schemas/Video'
        error:
          type: string
          description: Why there is no app to return.
    Product:
      type: object
      required: [link]
      properties:
        app_id:
          type: integer
          description: Steam app ID.
        type:
          type: string
          description: Steam's type for the app, such as `game`, `dlc`, `demo`, `music`, `video` or `hardware`.
        title:
          type: string
          description: Name of the app.
        link:
          type: string
          description: Store page URL.
        thumbnail:
          type: string
          description: Header image URL.
        snippet:
          type: string
          description: Short description.
        description:
          type: string
          description: Full description as plain text.
        developers:
          type: array
          items:
            type: string
          description: Developers of the app.
        publishers:
          type: array
          items:
            type: string
          description: Publishers of the app.
        release_date:
          type: string
          description: Release date as Steam shows it in the requested language.
        iso_release_date:
          type: string
          format: date-time
          description: Release time in ISO 8601, in UTC.
        is_coming_soon:
          type: boolean
          description: Whether the app is not released yet.
        is_free:
          type: boolean
          description: Whether the app is free.
        price:
          type: string
          description: Price as Steam shows it in the requested country.
        extracted_price:
          type: number
          description: Price as a number, 0 for a free app.
        currency:
          type: string
          description: ISO 4217 code of the price's currency.
        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: Review score label the store page shows, such as "Very Positive".
        reviews:
          type: integer
          description: Number of user reviews behind the store page's score.
        recommended_percentage:
          type: integer
          description: Share of positive user reviews behind the store page's score, in percent.
        metacritic:
          $ref: '#/components/schemas/Metacritic'
        platforms:
          type: array
          items:
            type: string
            enum: ["windows", "mac", "linux"]
          description: Operating systems the app runs on.
        steam_deck_compatibility:
          type: string
          enum: ["verified", "playable", "unsupported"]
          description: Steam Deck compatibility rating.
        controller_support:
          type: string
          enum: ["full", "partial"]
          description: Controller support.
        required_age:
          type: integer
          description: Minimum age to buy the app in the requested country.
        genres:
          type: array
          items:
            type: string
          description: Genres in the requested language.
        categories:
          type: array
          items:
            type: string
          description: Store features in the requested language, such as Single-player or Steam Achievements.
        languages:
          type: array
          items:
            $ref: '#/components/schemas/Language'
        system_requirements:
          $ref: '#/components/schemas/SystemRequirements'
        dlc_app_ids:
          type: array
          items:
            type: integer
          description: App IDs of the app's DLC.
        full_game:
          $ref: '#/components/schemas/FullGame'
        website:
          type: string
          description: Website of the app.
        support:
          $ref: '#/components/schemas/Support'
        mature_content_description:
          type: string
          description: Steam's note on the app's mature content.
    Metacritic:
      type: object
      properties:
        score:
          type: integer
          description: Metacritic score.
        link:
          type: string
          description: Metacritic page URL.
    Language:
      type: object
      required: [name]
      properties:
        name:
          type: string
          description: Language name in the requested language.
        has_full_audio:
          type: boolean
          description: Whether the app has full audio in this language.
    SystemRequirements:
      type: object
      properties:
        windows:
          $ref: '#/components/schemas/RequirementLevels'
        mac:
          $ref: '#/components/schemas/RequirementLevels'
        linux:
          $ref: '#/components/schemas/RequirementLevels'
    RequirementLevels:
      type: object
      properties:
        minimum:
          type: array
          items:
            $ref: '#/components/schemas/Requirement'
        recommended:
          type: array
          items:
            $ref: '#/components/schemas/Requirement'
    Requirement:
      type: object
      required: [value]
      properties:
        name:
          type: string
          description: Requirement label in the requested language, such as OS or Memory.
        value:
          type: string
          description: The requirement.
    FullGame:
      type: object
      properties:
        app_id:
          type: integer
          description: Steam app ID of the game this app belongs to.
        title:
          type: string
          description: Name of the game this app belongs to.
    Support:
      type: object
      properties:
        link:
          type: string
          description: Support page URL.
        email:
          type: string
          description: Support email address.
    Screenshot:
      type: object
      properties:
        thumbnail:
          type: string
          description: Thumbnail URL.
        image:
          type: string
          description: Full-size image URL.
    Video:
      type: object
      properties:
        title:
          type: string
          description: Title of the video.
        thumbnail:
          type: string
          description: Thumbnail URL.
        link:
          type: string
          description: HLS stream URL.
        is_highlighted:
          type: boolean
          description: Whether Steam features the video first.
    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 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
        app_id:
          type: string
        gl:
          type: string
        hl:
          type: string
    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
