> ## 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.

# requestAmazonProductByURL

> Requests an Amazon product to be tracked by Rye's API. Products will be refreshed on some interval. A product must be requested before it can be queried.

## Arguments

<ParamField path="input" type={<>RequestAmazonProductByURLInput!</>} required>
  An object containing the product's URL.

  <Expandable title="properties">
    <ParamField path="url" type="URL!" required>
      The URL of the product to be requested.
    </ParamField>
  </Expandable>
</ParamField>

## Returns

<ResponseField name="productId" type={<>ID!</>}>
  The `productId` is the unique identifier for the requested product, which can be used in subsequent queries to fetch product information, e.g. with [`productByID`](/api-reference/productbyid).
</ResponseField>

## Example

<CodeGroup>
  ```graphql Request theme={null}
  mutation RequestAmazonProductByURL {
    requestAmazonProductByURL(
      input: {
        url: "https://www.amazon.com/gp/product/B07S9NNCGQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1"
      }
    ) {
      productId
    }
  }
  ```

  ```json Response theme={null}
  {
    "data": {
      "requestAmazonProductByURL": {
        "productId": "B07S9NNCGQ"
      }
    }
  }
  ```
</CodeGroup>

***

## Errors

### Invalid URL

If the provided URL is not a valid Amazon product URL then the following error is returned

```JSON JSON theme={null}
{
  "errors": [
    {
      "message": "The provided `url` input (\"www.google.com\") is not a valid Amazon product URL.",
      "path": [
        "requestAmazonProductByURL"
      ]
    }
  ],
  "data": null
}
```

### Product data not found

If the product data can't be found, a `PRODUCT_NOT_FOUND_ERROR` is returned. This can happen for a variety of reasons:

1. The URL doesn't point to a valid product page (for example, the provided URL returns a 404 status code)

```json JSON theme={null}
{
  "errors": [
    {
      "message": "Product data not found - if the URL is valid, then the store may not be supported. See docs for more details",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "requestAmazonProductByURL"
      ],
      "extensions": {
        "code": "PRODUCT_NOT_FOUND_ERROR"
      }
    }
  ],
  "data": null
}
```

## Webhooks

Calling this mutation will subscribe your developer account to [product webhooks](/webhooks/events#product-related-webhooks) for the requested product.

***

## Related mutations

* [`requestShopifyProductByURL`](/api-reference/requestshopifyproductbyurl)
* [`requestStoreByURL`](/api-reference/requeststorebyurl)
