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

# Validate Shopify Store

> Check if a URL is a supported Shopify store

Public endpoint used during onboarding to validate that a user's website is a Shopify store we can support. This prevents non-Shopify stores from signing up.

<Note>
  This is a **public endpoint** - no authentication required. Rate limited to 5 requests/minute per IP.
</Note>

## How It Works

The endpoint checks if the domain has an accessible `/products.json` endpoint, which is a Shopify-specific API that every standard Shopify store exposes.

**Why /products.json?**

* Every Shopify store has this endpoint
* Returns 200 for Shopify stores, 404 for non-Shopify sites
* If blocked (403), the store is using a headless setup we can't support

## Request Body

<ParamField body="url" type="string" required>
  Website URL to validate (e.g., "gymshark.com" or "[https://www.allbirds.com](https://www.allbirds.com)")
</ParamField>

## Response

<ResponseField name="is_shopify" type="boolean">
  `true` if the URL is a supported Shopify store, `false` otherwise
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message
</ResponseField>

## Supported vs Unsupported Stores

| Store Type                 | /products.json | Supported? |
| -------------------------- | -------------- | ---------- |
| Standard Shopify           | 200 ✅          | Yes        |
| Shopify behind Cloudflare  | 200 ✅          | Yes        |
| Headless (custom frontend) | 403/404 ❌      | No         |
| Non-Shopify                | 404 ❌          | No         |

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://searchcompany-main.up.railway.app/api/onboarding/validate-shopify" \
    -H "Content-Type: application/json" \
    -d '{"url": "gymshark.com"}'
  ```
</RequestExample>

<ResponseExample>
  ```json Valid Shopify Store theme={null}
  {
    "is_shopify": true,
    "message": "Valid Shopify store"
  }
  ```

  ```json Not a Shopify Store theme={null}
  {
    "is_shopify": false,
    "message": "This does not appear to be a Shopify store"
  }
  ```
</ResponseExample>

## Usage in Onboarding

```typescript theme={null}
const response = await fetch(
  "https://searchcompany-main.up.railway.app/api/onboarding/validate-shopify",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ url: userInput }),
  }
);
const { is_shopify, message } = await response.json();

if (!is_shopify) {
  showError("This does not appear to be a Shopify store");
  return;
}

// Proceed with onboarding...
```
