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

# Analyze a product

> Get product informations from an url



## OpenAPI

````yaml POST /analyze
openapi: 3.1.0
info:
  title: Stoaty OpenAPI
  description: OpenAPI specifications for Stoaty
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.stoaty.com
security:
  - bearerAuth: []
paths:
  /analyze:
    post:
      description: Get product informations from an url
      requestBody:
        description: Configuration for the analysis
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalysisInput'
        required: true
      responses:
        '200':
          description: Analysis response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalysisResponse'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AnalysisInput:
      required:
        - url
      type: object
      properties:
        url:
          description: The url of the product to analyze
          type: string
          example: http://…
        nocache:
          description: >-
            Disable the abilit to pull the informations from the cache, consume
            token
          type: boolean
          default: false
        currency:
          description: The currency symbol (ISO 4217) you want the price converted to
          type: string
          example: USD
        country:
          description: >-
            The country code (ISO 3166-1 alpha-2) you want to request the
            website from (does not work for all domains)
          type: string
          example: US
    AnalysisResponse:
      required:
        - name
      type: object
      properties:
        product:
          $ref: '#/components/schemas/Product'
          description: The product analyzed
          type: object
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: The metadata concerning the request
          type: object
    Error:
      type: string
      example: 'invalid_type: url: Required'
    Product:
      type: object
      properties:
        name:
          description: The name of the product
          type: string
          example: Macbook Air M2
        description:
          description: The description of the product
          type: string
          example: An Apple laptop
        canonical:
          description: The canonical url of the product
          type: string
          example: https://…
        images:
          description: The canonical url of the product
          type: array
          items:
            type: string
          example:
            - https://…
            - https://…
        price:
          description: The price in the original or requested currency
          type: number
          example: 1199.99
        originalPrice:
          description: The price in the original currency if another one was requested
          type: number
          example: 1299.9
        currency:
          description: The symbol of the original or requested currency
          type: string
          example: USD
        originalCurrency:
          description: The symbol of the original currency if another one was requested
          type: string
          example: EUR
        available:
          description: If the product is available to be bought or not
          type: boolean
        sku:
          description: The stock keeping unit reference for the product
          type: string
          example: '9278451'
        brand:
          description: The brand name of the product
          type: string
          example: Apple
        color:
          description: The color of the product
          type: string
          example: Black
        size:
          description: The size of the product
          type: string
          example: 13 inches
    Metadata:
      type: object
      required:
        - success
        - tokens
      properties:
        success:
          description: If the analysis was a success or not
          type: boolean
          example: true
        cached:
          description: If the results are coming from the cache or not
          type: boolean
          example: false
        executionTime:
          description: The time the analyse took on our servers, in milliseconds
          type: number
          example: 1120
        tokens:
          description: Informations related to the token consumption
          type: object
          properties:
            consumed:
              type: number
              description: Number of token consumed by the request
              example: 1
            remaining:
              type: number
              description: Number of token remaining for the current billing period
              example: 13489
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````