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

# Offer Search (CP+RP+Offer)

> Find replacement offers using a string or image as the input.

export const EndpointButton = ({title, href}) => <div className="button-container">
    <a className="button" href={href}>
      {title}
      <span className="arrow">➜</span>
    </a>
  </div>;

This endpoint accomplishes 3 tasks in 1 simple POST:

* Performs a CP search with an RP performed automatically (for example:
  request a search for "random product string" and also get prices for
  that product in the response body). This eliminates the need for
  separate `/product_search` and `/prices` API requests.
* Returns a ValueChecker recommended solution whether indexed price,
  clustered shopping price or ValueChecker curated price. This eliminates
  any confusion when you require just one price for a searched query.
* Can accept an image as the query (instead of a query text string) that
  is analyzed for price result(s).

```json payload example theme={null}
{
  "query": "string",
  "image_urls": ["string"],
  "images": ["string"]
}
```

<Note>
  Only one of the parameters `query`, `image_urls` and `images` is required. The
  images parameter expects a list of `base64` encoded images. While the
  `image_urls` parameter expects a list of URLs where the images are stored.
</Note>

## Optional configuration

You can provide a `claimed_amount` parameter which will be used as a
benchmark price when finding offers.

If a `claimed_amount` is provided, price limits will be applied based on
the `category` (a setting defined per client). E.g. if a
`claimed_amount` of 1000 is given and the category is *Mobile Phones*
and the `price_limits` for said category are:

```py theme={null}
price_min = 20% * claimed_amount
price_max = 150% * claimed_amount
```

ValueChecker will search for offers within that range.

```json payload example theme={null}
{
    "query": "string",
    "image_urls": ["string"],
    "images": ["string"],
    "claimed_amount": <number>,
}
```

You can also provide a `price_min` and `price_max` parameters which,
when provided, will take precedence over the claimed\_amount benchmark
logic for calculating the price ranges.

```json payload example theme={null}
{
    "query": "string",
    "image_urls": ["string"],
    "images": ["string"],
    "price_min": <number>,
    "price_max": <number>,
}
```

## Standardized response body

The response JSON formatting is updated so that all types of RPs
(Replacement Products) have the same field structure which simplifies
your parsing requirements.

### [Core products](/before-getting-started/valuechecker-service-concepts#core-categories)

Products from our curated inventory. (phones, laptops, TVs, white goods,
etc.)

### [Non-Core products](/before-getting-started/valuechecker-service-concepts#non-core-categories)

Almost anything that can be found (with a price) on the internet.

### [Clustered products](/before-getting-started/valuechecker-api-essentials#clustered-prices)

Prices for products in non-core categories aggregated into price
buckets.

### Indexed products

Prices statistically set or adjusted by ValueChecker for generic
products.

## Recommended price

Every response comes with a ValueChecker recommended price and type.
This can be used for STP or in cases where you want to return exactly 1
price for a searched CP.

## Photo validation and estimation

You can send product photos via `image_urls` (public URLs) or `images` (base64-encoded strings) instead of or in addition to a text `query`. Photos are analyzed to extract category and description, compare against the original description for validation, and identify the best Like-Kind-and-Quality replacement products and prices.

## Image analysis vs query string

If both a `query` and an `image` are provided, we will do the following:

* Use the image to find a product description.
* Check said product description against the query that was provided.
* If the predicted product description is a more detailed description of
  the claimed product, it will be used to find offers.
* If the user provides a query together with an image that does not
  match the query, the query will take precedence and will be used to find
  offers.

<EndpointButton title="Offer Search Endpoint" href="/api-reference/default/offer-search" />
