# Storefront API Access

## Introduction

Nimstrata's Storefront API allows merchants with composable commerce solutions to send events, retrieve search results and recommendations, and request autocomplete suggestions.

If you're using Hydrogen, Oxygen, or another custom headless storefront solution, you can call Nimstrata and Shopify's APIs directly.

[!ref text="Nimstrata's Storefront API Documentation" target="blank" icon=":book:"](https://storefront.retailconnect.app/docs)
[!ref text="Shopify's Storefront API Documentation" target="blank" icon=":book:"](https://shopify.dev/docs/api/storefront)

<br/>

## Rate Limits

Shopify and Nimstrata's Storefront APIs handle businesses ranging from tens to millions of SKUs, so there are no explicit rate limits on the number of requests that can be sent. However, various malicious user prevention systems are in place and you may receive **430 Shopify Security Rejection** or **429 (Too Many Requests)** error codes.

To avoid being rate limited, ensure your solution uses the correct **Buyer IP Header** when calling Shopify’s Storefront API, Nimstrata’s Storefront API uses the **End User’s IP Address**.

<br/>

## Endpoints

### Retail API - Vertex AI Search for Commerce

#### User Events

[!badge https://storefront.retailconnect.app/v1/event]

If you'd like to send User Events to our Storefront API in addition to (or instead of) our Shopify App Pixel and App Embed, there are some special requirements for search events. This is a common use case to facilitate faster AI model training or to leverage the Experiments tab in the Google Cloud Console for additional A/B test data.

Because Vertex AI Search for Commerce uses a single API to serve search and browse events, "Browse" events are technically "Search" events without a search query. However, you must send at least one Page Category and Filter for them to be processed correctly. Please see the examples below.

System Attributes and Custom Attributes used for filtering results should be sent to improve Dynamic Facet training.

#### User Event Examples

==- Search User Event
:::code source="/static/code-snippets/search-user-event.json":::
==- Browse User Event
:::code source="/static/code-snippets/browse-user-event.json":::
==- Retail Cloud Connect Visitor ID (rcc-visitor-id)
:::code source="/static/code-snippets/rcc-visitor-id.js":::
===
