> ## Documentation Index
> Fetch the complete documentation index at: https://socialquery.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Klarna Search

> Returns the first 20 native Klarna product-search results with the source product-hit total. Source ranking can include fuzzy matches. Supports all 13 catalog regions. No pagination or additional filters are accepted. UK, Sweden and Denmark preserve legacy paths with null absolute URLs; prices and stock flags are source snapshots.

Returns the first 20 native Klarna product-search results with the source product-hit total. Source ranking can include fuzzy matches. Supports all 13 catalog regions. No pagination or additional filters are accepted. UK, Sweden and Denmark preserve legacy paths with null absolute URLs; prices and stock flags are source snapshots.

Supply `query`, such as `headphone`. Text is trimmed and must contain 1–100 characters without control characters. Regions are `usa` (default), `uk`, `germany`, `sweden`, `france`, `italy`, `spain`, `netherlands`, `austria`, `ireland`, `norway`, `finland` and `denmark`. Prices use the regional source currency: USD, GBP, EUR, SEK, NOK or DKK.

Each `items` entry contains `product` with its native `id`, `title`, category, source path, price, rating, images, condition and stock flag. Null values remain unknown. Prices and availability are snapshots of the upstream shopping data, not checkout quotes or a guarantee of merchant stock. Ratings retain their native scale of 0–5 and count when provided.

Autocomplete also returns `suggestions`, preserving nested category groups and feature links. Suggestion IDs retain their native format and can be null. Search returns an empty suggestions list. `returned_count` counts product rows; `suggestion_count` counts top-level suggestions. Search exposes the source product-hit `total`; autocomplete sets `total` to null. Neither endpoint supports pagination; `next_cursor` is null. No personalized or account search history is accessed.

UK, Swedish and Danish data uses legacy paths. Its absolute product/category `url` is null rather than an inferred working link. `source_path` preserves the original value. Other regions expose source-based Klarna shopping links.

A fresh successful request with products or suggestions costs **5 SocialQuery credits**. When both lists are empty, the hold is fully refunded. Cached responses, successful idempotent replays and failures have no net charge. Source errors are not reported as empty results. Set `X-Max-Credits: 5` to cap the request hold.

The adapter reads Klarna's public anonymous search service, with a shared 20-source-request/minute ceiling, 20-second timeout and 2 MiB response limit. It checks query identity for search, unique product IDs, product/category links, currency and rating fields. It rejects malformed or mismatched data instead of silently truncating it.


## OpenAPI

````yaml GET /klarna/search
openapi: 3.1.0
info:
  title: SocialQuery API
  version: '2026-10-09'
  description: >-
    Documented requests for public-source records. Inspect accepted inputs and
    credit amounts, then verify the selected operation before integrating
    preview coverage.
servers:
  - url: https://socialquery.dev/v1
security:
  - apiKey: []
paths:
  /klarna/search:
    get:
      tags:
        - Klarna
      summary: Klarna Search
      description: >-
        Returns the first 20 native Klarna product-search results with the
        source product-hit total. Source ranking can include fuzzy matches.
        Supports all 13 catalog regions. No pagination or additional filters are
        accepted. UK, Sweden and Denmark preserve legacy paths with null
        absolute URLs; prices and stock flags are source snapshots.
      operationId: get_klarna_search
      parameters:
        - name: query
          in: query
          required: true
          example: headphone
          schema:
            type: string
            minLength: 1
            maxLength: 100
          description: >-
            Nonempty search text, trimmed, up to 100 characters. Control
            characters are rejected.
        - name: region
          in: query
          required: false
          schema:
            type: string
            enum:
              - usa
              - uk
              - germany
              - sweden
              - france
              - italy
              - spain
              - netherlands
              - austria
              - ireland
              - norway
              - finland
              - denmark
        - name: Cache-Control
          in: header
          required: false
          example: no-cache
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: false
          example: 7a5e1b4c-2d8f-4a3b-9c1e-6e8b4d2a1f3c
          schema:
            type: string
        - name: X-Max-Credits
          in: header
          required: false
          description: >-
            Optional nonnegative integer cap on the maximum request hold. A live
            request whose hold exceeds this cap returns 422
            CREDIT_BUDGET_EXCEEDED before spending. Metered holds use the
            requested limit; cache hits and successful idempotent replays cost
            zero.
          schema:
            type: integer
            minimum: 0
      responses:
        '200':
          description: >-
            Returns the first 20 native Klarna product-search results with the
            source product-hit total. Source ranking can include fuzzy matches.
            Supports all 13 catalog regions. No pagination or additional filters
            are accepted. UK, Sweden and Denmark preserve legacy paths with null
            absolute URLs; prices and stock flags are source snapshots.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SocialQueryResponse'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                product:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    title:
                                      type: string
                                    source_path:
                                      type:
                                        - string
                                        - 'null'
                                    url:
                                      type:
                                        - string
                                        - 'null'
                                    description:
                                      type:
                                        - string
                                        - 'null'
                                    category:
                                      anyOf:
                                        - type: object
                                          properties:
                                            id:
                                              type:
                                                - string
                                                - 'null'
                                            name:
                                              type: string
                                            source_path:
                                              type:
                                                - string
                                                - 'null'
                                            url:
                                              type:
                                                - string
                                                - 'null'
                                          required:
                                            - id
                                            - name
                                            - source_path
                                            - url
                                        - type: 'null'
                                    price:
                                      type: object
                                      properties:
                                        current:
                                          type:
                                            - number
                                            - 'null'
                                          minimum: 0
                                        currency:
                                          type: string
                                      required:
                                        - current
                                        - currency
                                    rating:
                                      type: object
                                      properties:
                                        average:
                                          type:
                                            - number
                                            - 'null'
                                          minimum: 0
                                        count:
                                          type:
                                            - integer
                                            - 'null'
                                          minimum: 0
                                      required:
                                        - average
                                        - count
                                    image_urls:
                                      type: array
                                      items:
                                        type: string
                                    availability:
                                      type:
                                        - string
                                        - 'null'
                                      enum:
                                        - in_stock
                                        - out_of_stock
                                        - null
                                    condition:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - id
                                    - title
                                    - source_path
                                    - url
                                    - description
                                    - category
                                    - price
                                    - rating
                                    - image_urls
                                    - availability
                                    - condition
                              required:
                                - product
                          suggestions:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type:
                                    - string
                                    - 'null'
                                name:
                                  type: string
                                type:
                                  type: string
                                source_path:
                                  type:
                                    - string
                                    - 'null'
                                url:
                                  type:
                                    - string
                                    - 'null'
                                category:
                                  anyOf:
                                    - type: object
                                      properties:
                                        id:
                                          type:
                                            - string
                                            - 'null'
                                        name:
                                          type: string
                                        source_path:
                                          type:
                                            - string
                                            - 'null'
                                        url:
                                          type:
                                            - string
                                            - 'null'
                                      required:
                                        - id
                                        - name
                                        - source_path
                                        - url
                                    - type: 'null'
                                categories:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      type:
                                        type: string
                                      subcategory_name:
                                        type:
                                          - string
                                          - 'null'
                                      source_path:
                                        type:
                                          - string
                                          - 'null'
                                      url:
                                        type:
                                          - string
                                          - 'null'
                                    required:
                                      - name
                                      - type
                                      - subcategory_name
                                      - source_path
                                      - url
                              required:
                                - id
                                - name
                                - type
                                - source_path
                                - url
                                - category
                                - categories
                          returned_count:
                            type: integer
                            minimum: 0
                          suggestion_count:
                            type: integer
                            minimum: 0
                          total:
                            type:
                              - integer
                              - 'null'
                            minimum: 0
                          next_cursor:
                            type: 'null'
                          query:
                            type: string
                          region:
                            type: string
                          country_code:
                            type: string
                          source:
                            type: string
                          coverage_note:
                            type: string
                        required:
                          - items
                          - suggestions
                          - returned_count
                          - suggestion_count
                          - total
                          - next_cursor
                          - query
                          - region
                          - country_code
                          - source
                          - coverage_note
        '400':
          $ref: '#/components/responses/Error400'
        '401':
          $ref: '#/components/responses/Error401'
        '402':
          $ref: '#/components/responses/Error402'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '405':
          $ref: '#/components/responses/Error405'
        '409':
          $ref: '#/components/responses/Error409'
        '422':
          $ref: '#/components/responses/Error422'
        '429':
          $ref: '#/components/responses/Error429'
        '500':
          $ref: '#/components/responses/Error500'
        '502':
          $ref: '#/components/responses/Error502'
        '503':
          $ref: '#/components/responses/Error503'
        '504':
          $ref: '#/components/responses/Error504'
components:
  schemas:
    SocialQueryResponse:
      type: object
      required:
        - success
        - platform
        - endpoint
        - credits_used
        - credits_remaining
        - request_id
        - cached
        - data
      properties:
        success:
          type: boolean
          const: true
        platform:
          type: string
        endpoint:
          type: string
        credits_used:
          type: integer
          minimum: 0
        credits_remaining:
          type:
            - integer
            - 'null'
        request_id:
          type: string
        cached:
          type: boolean
        data:
          type: object
          additionalProperties: true
          description: >-
            The selected operation determines the resource fields in this
            object. Source data can omit a metric or report it as null.
    SocialQueryError:
      type: object
      required:
        - success
        - platform
        - endpoint
        - credits_used
        - credits_remaining
        - request_id
        - cached
        - error
      properties:
        success:
          type: boolean
          const: false
        platform:
          type: string
        endpoint:
          type: string
        credits_used:
          type: integer
          minimum: 0
        credits_remaining:
          type:
            - integer
            - 'null'
        request_id:
          type: string
        cached:
          type: boolean
        error:
          type: object
          required:
            - code
            - type
            - message
            - status
            - doc_url
          properties:
            code:
              type: string
            type:
              type: string
            message:
              type: string
            status:
              type: integer
            doc_url:
              type: string
              format: uri
  responses:
    Error400:
      description: Upstream rejected the request.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error401:
      description: Missing, expired, invalid, or revoked API key.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error402:
      description: Insufficient SocialQuery credits.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error403:
      description: Key scope or provider policy denied access.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error404:
      description: Endpoint or upstream resource not found.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error405:
      description: HTTP method is not supported.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error409:
      description: Idempotency conflict or request in progress.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error422:
      description: Invalid parameters.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error429:
      description: Request limit reached.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error500:
      description: Request processing failed.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error502:
      description: Upstream service failed.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error503:
      description: Provider or required service is unavailable.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
    Error504:
      description: Upstream service timed out.
      headers:
        X-Request-Id:
          schema:
            type: string
        X-Credits-Used:
          schema:
            type: integer
        X-Credits-Remaining:
          schema:
            type: string
        X-Cache:
          schema:
            type: string
            enum:
              - HIT
              - MISS
              - BYPASS
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SocialQueryError'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.