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

# find_product_by_image

> Find the Shopify stores that sell the product in an image.

Finds the Shopify stores that sell the product shown in an image, with Copyfy's visual search (the search by image of the dashboard's Products page). It ranks matching products with their price, store, and similarity score, or, with `mode: "shops"`, the stores that sell them.

The tool appears only when visual search is switched on for Copyfy.

**Cost:** 1 credit per successful call.

## Arguments

| Argument | Type | Allowed values |
| - | - | - |
| `image_url` | string | Direct https link to a JPEG, PNG, or WebP image of at most 4 MB, for example an ad `image_url` from [`search_ads`](https://docs.copyfy.io/tools/search-ads). |
| `product_id` | integer or numeric string | Copyfy product id: finds other stores selling the same product. |
| `mode` | enum | `products` (default) ranks products; `shops` ranks stores. |
| `limit` | integer | Results, 1 to 30. Default: `10`. |

Pass `image_url` or `product_id`, not both.

## Example

```json Tool call theme={null}
{
  "name": "find_product_by_image",
  "arguments": { "image_url": "https://bucket.copyfy.io/ads/example-brush-preview.jpg", "limit": 1 }
}
```

```json Result theme={null}
{
  "match": "match",
  "threshold": 0.8,
  "products": [
    {
      "product_id": 5590211,
      "title": "Self-cleaning brush",
      "url": "https://rival-store.example/products/brush",
      "image_url": "https://cdn.shopify.com/s/files/1/0001/products/brush.jpg",
      "price": 24.5,
      "currency": "USD",
      "score": 0.91,
      "matched_images": 2,
      "shop": {
        "id": 902118,
        "name": "Rival Store",
        "domain": "rival-store.example",
        "country": "US",
        "dashboard_url": "https://app.copyfy.io/dashboard/track/902118"
      }
    }
  ],
  "dashboard_url": "https://app.copyfy.io/dashboard/products?visual=6f1c2a0e-3b8d-4f0a-9c55-2d7e1b4a9f10"
}
```

## Result fields

| Field | Type | Description |
| - | - | - |
| `match` | string | `match`, or `no_match` when nothing is similar enough. |
| `threshold` | number | Minimum similarity score for a result. |
| `products` | array | With `mode: "products"`: `product_id`, `title`, `url`, `image_url`, `price`, `currency`, `score`, `matched_images`, and `shop`. |
| `shops` | array | With `mode: "shops"`: `id`, `name`, `domain`, `country`, `currency`, `score`, `matched_products`, `estimated_monthly_revenue`, `monthly_visits`, `dashboard_url`. |
| `dashboard_url` | string or null | Reopens these results on the dashboard's Products page for 24 hours. `null` when Copyfy could not save them. |

## Errors

| Code | When |
| - | - |
| [`invalid_arguments`](https://docs.copyfy.io/errors#invalid_arguments) | Both or neither source, or a link that does not return a JPEG, PNG, or WebP image under 4 MB. |
| [`media_unavailable`](https://docs.copyfy.io/errors#media_unavailable) | Copyfy could not download the image within 8 seconds. |
| [`not_found`](https://docs.copyfy.io/errors#not_found) | The product is not in the visual search index yet: pass its image instead. |
| [`rate_limited`](https://docs.copyfy.io/errors#rate_limited) | More than 10 image searches in a minute, shared with the dashboard. |
| [`search_unavailable`](https://docs.copyfy.io/errors#search_unavailable) | Visual search is temporarily down. |


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