> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.trykeet.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.trykeet.com/_mcp/server.

# Get Buy Again Items

GET https://api.trykeet.com/v1/amazon/items/buy-again

Get a list of products that you can buy again or have purchased before.

Reference: https://docs.trykeet.com/api-reference/api-reference/integrations/amazon/get-buy-again-items

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Headers

- `X-Account-Token` (string, required) — The account token that is associated with the end user linked to this account

## Response

### 200

- `status` (enum, required)
  - Allowed values: `ok`, `error`
- `items` (list of AmazonItem, required)

## Errors

### 401 Un Authorized Error

- `error` (string, required)

### 500 Internal Server Error

- `error` (string, required)

### 404 Not Found Error

- `error` (string, required)

### 400 Bad Request Error

- `error` (string, required)

### 500 Not Implemented Error

- `error` (string, required)

## Types

### AmazonItem

- `title` (string, required)
- `price` (string, required)
- `url` (string, required)
- `imageUrl` (string, required)
- `availability` (string, required)
- `brand` (string, optional)
- `pricePerUnit` (string, optional)
- `rating` (string, optional)
- `reviewCount` (string, optional)
- `merchant` (string, optional)
- `purchaseDate` (string, optional)

## Examples

**Response**

```json
{
  "status": "ok",
  "items": [
    {
      "title": "title",
      "price": "price",
      "url": "url",
      "imageUrl": "imageUrl",
      "availability": "availability",
      "brand": "brand",
      "pricePerUnit": "pricePerUnit",
      "rating": "rating",
      "reviewCount": "reviewCount",
      "merchant": "merchant",
      "purchaseDate": "purchaseDate"
    },
    {
      "title": "title",
      "price": "price",
      "url": "url",
      "imageUrl": "imageUrl",
      "availability": "availability",
      "brand": "brand",
      "pricePerUnit": "pricePerUnit",
      "rating": "rating",
      "reviewCount": "reviewCount",
      "merchant": "merchant",
      "purchaseDate": "purchaseDate"
    }
  ]
}
```

**SDK Code**

```typescript
import { KeetClient } from "@keet-tech/keet-node-client";

const client = new KeetClient({ token: "YOUR_TOKEN", accountToken: "YOUR_ACCOUNT_TOKEN" });
await client.integrations.amazon.getBuyAgainItems();

```

```python
import requests

url = "https://api.trykeet.com/v1/amazon/items/buy-again"

headers = {
    "X-Account-Token": "X-Account-Token",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.trykeet.com/v1/amazon/items/buy-again"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Account-Token", "X-Account-Token")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.trykeet.com/v1/amazon/items/buy-again")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Account-Token"] = 'X-Account-Token'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.trykeet.com/v1/amazon/items/buy-again")
  .header("X-Account-Token", "X-Account-Token")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.trykeet.com/v1/amazon/items/buy-again', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Account-Token' => 'X-Account-Token',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.trykeet.com/v1/amazon/items/buy-again");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Account-Token", "X-Account-Token");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Account-Token": "X-Account-Token",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.trykeet.com/v1/amazon/items/buy-again")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```