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

# Lookup product

> Lookup a product's information by URL.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/checkout-intents/openapi.documented.yml get /api/v1/products/lookup
openapi: 3.0.0
info:
  title: Universal Checkout API
  version: 1.0.5
  description: >-
    Turn any product URL into a completed checkout. Instantly retrieve price,
    tax, and shipping for any product, and let users buy without ever leaving
    your native AI experience.


    View the [Rye API docs](https://docs.rye.com).
  termsOfService: https://rye.com/terms-of-service
  license:
    name: UNLICENSED
  contact:
    name: Rye
    email: dev@rye.com
    url: https://docs.rye.com
servers:
  - url: https://staging.api.rye.com
security: []
paths:
  /api/v1/products/lookup:
    get:
      tags:
        - Products
      summary: Lookup product
      description: Lookup a product's information by URL.
      operationId: Lookup
      parameters:
        - in: query
          name: url
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Product information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeError'
      security:
        - bearerAuth:
            - checkout_intents:read
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import CheckoutIntents from 'checkout-intents';

            const client = new CheckoutIntents({
              apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
            });

            const product = await client.products.lookup({ url: 'url' });

            console.log(product.id);
        - lang: Python
          source: |-
            import os
            from checkout_intents import CheckoutIntents

            client = CheckoutIntents(
                api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"),  # This is the default and can be omitted
            )
            product = client.products.lookup(
                url="url",
            )
            print(product.id)
        - lang: Java
          source: |-
            package com.rye.example;

            import com.rye.client.CheckoutIntentsClient;
            import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
            import com.rye.models.products.Product;
            import com.rye.models.products.ProductLookupParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();

                    ProductLookupParams params = ProductLookupParams.builder()
                        .url("url")
                        .build();
                    Product product = client.products().lookup(params);
                }
            }
        - lang: cURL
          source: |-
            curl https://staging.api.rye.com/api/v1/products/lookup \
                -H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"
components:
  schemas:
    Product:
      properties:
        variants:
          items:
            $ref: '#/components/schemas/ProductVariant'
          type: array
          nullable: true
        variantDimensions:
          items:
            $ref: '#/components/schemas/VariantDimension'
          type: array
          nullable: true
        isPurchasable:
          type: boolean
          example: true
        availability:
          $ref: '#/components/schemas/ProductAvailability'
          example: in_stock
        price:
          $ref: '#/components/schemas/Money'
        images:
          items:
            $ref: '#/components/schemas/ProductImage'
          type: array
        description:
          type: string
          nullable: true
          example: A high-quality widget designed for professionals.
        brand:
          type: string
          nullable: true
          example: Acme
        name:
          type: string
          example: Widget Pro
        sku:
          type: string
          nullable: true
          example: SKU-12345
        retailer:
          type: string
          nullable: true
          example: Amazon
        url:
          type: string
          example: https://example.com/products/widget-pro
        id:
          type: string
          example: amazon.com:B0DFC9MT8Q
      required:
        - isPurchasable
        - availability
        - price
        - images
        - description
        - brand
        - name
        - sku
        - retailer
        - url
        - id
      type: object
    AuthenticationError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    NotFoundError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    ValidateError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
        status:
          type: number
          format: double
        fields:
          $ref: '#/components/schemas/FieldErrors'
      required:
        - name
        - message
        - status
        - fields
      type: object
      additionalProperties: false
    RuntimeError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    ProductVariant:
      properties:
        availability:
          $ref: '#/components/schemas/ProductAvailability'
        images:
          items:
            $ref: '#/components/schemas/ProductImage'
          type: array
        price:
          $ref: '#/components/schemas/Money'
        dimensions:
          items:
            $ref: '#/components/schemas/VariantSelection'
          type: array
        name:
          type: string
          nullable: true
        sku:
          type: string
          nullable: true
        id:
          type: string
          nullable: true
      required:
        - availability
        - images
        - price
        - dimensions
        - name
        - sku
        - id
      type: object
    VariantDimension:
      properties:
        values:
          items:
            type: string
          type: array
        label:
          type: string
      required:
        - values
        - label
      type: object
    ProductAvailability:
      type: string
      enum:
        - in_stock
        - out_of_stock
        - preorder
        - backorder
        - unknown
      description: |-
        The availability status of a product.
        - `in_stock`: Product is available for immediate purchase
        - `out_of_stock`: Product is currently unavailable
        - `preorder`: Product is available for pre-order before release
        - `backorder`: Product is temporarily out of stock but can be ordered
        - `unknown`: Availability could not be determined
    Money:
      properties:
        currencyCode:
          type: string
          example: USD
        amountSubunits:
          type: integer
          format: int32
          example: 1500
      required:
        - currencyCode
        - amountSubunits
      type: object
    ProductImage:
      properties:
        isFeatured:
          type: boolean
          example: true
        url:
          type: string
          example: https://example.com/images/product-123.jpg
      required:
        - isFeatured
        - url
      type: object
    FieldErrors:
      properties: {}
      type: object
      additionalProperties:
        properties:
          value: {}
          message:
            type: string
        required:
          - message
        type: object
    VariantSelection:
      properties:
        value:
          anyOf:
            - type: string
            - type: number
              format: double
          example: Small, Red, XS, L, etc.
          maxLength: 60
        label:
          type: string
          example: Size, Color, etc.
          maxLength: 30
      required:
        - value
        - label
      type: object
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Rye API key

````