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

# Search Amazon

> Search Amazon and return structured results for the first page of matches.



## OpenAPI

````yaml get /v1/amazon/search
openapi: 3.1.0
info:
  title: Scrapio
  version: 1.0.0
  description: >-
    Turn any URL into structured data. Fetch raw HTML, crawl sites, extract
    structured content, interact with dynamic pages, and search the web through
    one API.
  contact:
    name: Scrapio Support
    url: https://scrapio.dev
  license:
    name: Proprietary
servers:
  - url: https://api.scrapio.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: System
  - name: Fetch
  - name: Crawl
  - name: Map
  - name: Interact
  - name: Search
  - name: Google
  - name: Fast Search
  - name: Jobs
  - name: YouTube
  - name: Amazon
  - name: Walmart
  - name: Booking
  - name: Agoda
  - name: Airbnb
  - name: ChatGPT
  - name: Perplexity
  - name: Gemini
  - name: Bing
  - name: Reddit
  - name: TikTok
  - name: Apple App Store
  - name: Target
  - name: Monitors
paths:
  /v1/amazon/search:
    get:
      tags:
        - Amazon
      summary: Search Amazon
      description: >-
        Search Amazon and return structured results for the first page: product
        titles, ASINs, prices, ratings, and image URLs. For multi-page searches,
        use the `/v1/amazon/search/crawl` async endpoint.
      operationId: searchAmazon
      parameters:
        - name: search
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: Search keywords
        - name: page
          in: query
          required: false
          schema:
            description: Result page number
            type: string
            pattern: ^\d+$
        - name: merchant_id
          in: query
          required: false
          schema:
            description: Filter results to a specific merchant
            type: string
            minLength: 1
        - name: sort_by
          in: query
          required: false
          schema:
            description: Sort order for results
            type: string
            minLength: 1
        - name: enrich
          in: query
          required: false
          schema:
            description: Enrich each result with pricing data
            type: string
            enum:
              - pricing
        - name: country
          in: query
          required: false
          schema:
            description: Country code for localized results
            type: string
            pattern: ^[a-z]{2}$
        - name: language
          in: query
          required: false
          schema:
            description: Language for results
            type: string
            minLength: 1
        - name: domain
          in: query
          required: false
          schema:
            description: Amazon domain suffix, e.g. com, co.uk, de
            type: string
            pattern: ^[a-z]+(?:\.[a-z]+)?$
        - name: device
          in: query
          required: false
          schema:
            type: string
            enum:
              - desktop
              - mobile
              - tablet
            description: Device profile to emulate
        - name: timeout_ms
          in: query
          required: false
          schema:
            description: Max time to wait, in ms
            type: string
            pattern: ^\d+$
      responses:
        '200':
          description: Structured Amazon search results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AmazonSearchResponse'
        '400':
          description: Invalid search parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Amazon blocked the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Amazon execution backend unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl
            "https://api.scrapio.dev/v1/amazon/search?query=wireless+headphones&country=us"
            \
              -H "Authorization: Bearer $SCRAPIO_API_KEY"
        - lang: Python
          label: Python
          source: |-
            import os, requests
            resp = requests.get(
                "https://api.scrapio.dev/v1/amazon/search",
                headers={"Authorization": f"Bearer {os.environ['SCRAPIO_API_KEY']}"},
                params={"query": "wireless headphones", "country": "us"},
            )
            for r in resp.json()["results"]:
                print(r["title"], r["price"])
        - lang: JavaScript
          label: Node.js
          source: >-
            const params = new URLSearchParams({ query: "wireless headphones",
            country: "us" });

            const { results } = await
            fetch(`https://api.scrapio.dev/v1/amazon/search?${params}`, {
              headers: { Authorization: `Bearer ${process.env.SCRAPIO_API_KEY}` },
            }).then(r => r.json());

            results.forEach(r => console.log(r.title, r.price));
components:
  schemas:
    AmazonSearchResponse:
      type: object
      properties:
        provider:
          type: string
          enum:
            - amazon
        page_type:
          type: string
          enum:
            - search
        meta_data:
          type: object
          properties:
            url:
              type: string
              format: uri
            query:
              anyOf:
                - type: string
                - type: 'null'
            start_page:
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            page:
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            end_page:
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            pages_requested:
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            pages_returned:
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            sort_by:
              anyOf:
                - type: string
                - type: 'null'
            merchant_id:
              anyOf:
                - type: string
                - type: 'null'
            country:
              anyOf:
                - type: string
                - type: 'null'
            domain:
              anyOf:
                - type: string
                - type: 'null'
            number_of_results:
              anyOf:
                - type: number
                - type: 'null'
            number_of_products:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - url
            - query
            - page
            - sort_by
            - merchant_id
            - country
            - domain
            - number_of_results
            - number_of_products
          additionalProperties: false
        products:
          type: array
          items:
            type: object
            properties:
              position:
                type: integer
                exclusiveMinimum: 0
                maximum: 9007199254740991
              asin:
                anyOf:
                  - type: string
                  - type: 'null'
              title:
                anyOf:
                  - type: string
                  - type: 'null'
              price:
                anyOf:
                  - type: number
                  - type: 'null'
              currency:
                anyOf:
                  - type: string
                  - type: 'null'
              rating:
                anyOf:
                  - type: number
                  - type: 'null'
              review_count:
                anyOf:
                  - type: number
                  - type: 'null'
              is_prime:
                anyOf:
                  - type: boolean
                  - type: 'null'
              is_sponsored:
                anyOf:
                  - type: boolean
                  - type: 'null'
              image:
                anyOf:
                  - type: string
                  - type: 'null'
              url:
                type: string
                format: uri
            required:
              - position
              - asin
              - title
              - price
              - currency
              - rating
              - review_count
              - is_prime
              - is_sponsored
              - image
              - url
            additionalProperties: false
      required:
        - provider
        - page_type
        - meta_data
        - products
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
        diagnostics:
          type: object
          properties:
            outcome:
              type: string
              enum:
                - failed
            retryable:
              type: boolean
            blocked:
              type: boolean
            timed_out:
              type: boolean
          required:
            - outcome
            - retryable
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````