# eBay Search API

> Search eBay listings by keyword with price, condition, shipping, bids, time left and seller, plus condition, format, price and location filters.

Source: https://www.sandbase.ai/apis/ebay/search
API reference: https://www.sandbase.ai/apis/ebay/search/docs

## Facts

- Provider: eBay
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/ebay/search`
- Price: $0.01 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, ebay, ecommerce, product data
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/ebay/search` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `_nkw` | string \| number \| boolean | yes |  |
| `_dmd` | string \| number \| boolean | no |  |
| `_ipg` | string \| number \| boolean | no |  |
| `_pgn` | string \| number \| boolean | no |  |
| `_sop` | string \| number \| boolean | no |  |
| `_blrs` | string \| number \| boolean | no |  |
| `_sasl` | string \| number \| boolean | no |  |
| `_udhi` | string \| number \| boolean | no |  |
| `_udlo` | string \| number \| boolean | no |  |
| `_salic` | string \| number \| boolean | no |  |
| `_stpos` | string \| number \| boolean | no |  |
| `_saslop` | any | no |  |
| `show_only` | string | no |  |
| `LH_PrefLoc` | string \| number \| boolean | no |  |
| `category_id` | string \| number \| boolean | no |  |
| `ebay_domain` | string \| number \| boolean | no |  |
| `buying_format` | any | no |  |
| `json_restrictor` | string \| number \| boolean | no |  |
| `popular_filters` | string \| number \| boolean | no |  |
| `LH_ItemCondition` | string \| number \| boolean | no |  |

## FAQ

### How do I use the eBay Search API?

Send a POST request to https://api.sandbase.ai/v1/api/ebay/search with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the eBay Search API cost?

$0.01 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the eBay Search API accept?

Required: _nkw (string | number | boolean). Optional: _dmd (string | number | boolean), _ipg (string | number | boolean), _pgn (string | number | boolean), _sop (string | number | boolean), _blrs (string | number | boolean) and _sasl (string | number | boolean) and 13 more. The Parameters table and the Playground on this page list every field.

### What does the eBay Search API return?

A JSON result. This endpoint runs asynchronously, so the response tells you how to fetch the finished result.

### Do I need a eBay developer account or API key?

No. eBay Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for eBay API access separately.

## README

### eBay Search

Search eBay listings by keyword with price, condition, shipping, bids, time left and seller, plus condition, format, price and location filters.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ebay/search", "_nkw": "iphone 15"}'
```

This API runs asynchronously. `/v1/run` returns a task `id` with status `pending`; poll `GET https://api.sandbase.ai/v1/run/{id}` until `status` is `completed` and read the result from `outputs[0].data`.

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `_nkw` | string/number/boolean | Yes | The search query. You can use anything that you would use in a regular eBay search. `_nkw` parameter is optional when `category_id` parameter is specified. |
| `LH_ItemCondition` | string/number/boolean | No | One or multiple product conditions to limit the search to. Condition is represented via numeric ID, e.g. `1000` for `New`. Multiple IDs should be joined with `\|` delimiter, e.g. `1000\|3000`. List of… |
| `LH_PrefLoc` | string/number/boolean | No | The preferred location. The available options are 'Domestic', 'Regional', and 'Worldwide'. |
| `_blrs` | string/number/boolean | No | The exclusion of results from an auto-corrected query when the original query is spelled wrong. The recommended value for this parameter is `spell_auto_correct`. Omit `_blrs` if you want the search to… |
| `_dmd` | string/number/boolean | No | The visual layout for displaying results. The available options are 'Grid' and 'List'. |
| `_ipg` | string/number/boolean | No | The maximum number of results to return. There are three options: `60` (default), `120` and `240` results. |
| `_pgn` | string/number/boolean | No | The page number. It's used for pagination. (e.g., `1` (default) is the first page of results, `2` is the 2nd page of results, `3` is the 3rd page of results, etc.). |
| `_salic` | string/number/boolean | No | The location based on country. Head to the eBay location options for a full list of supported countries. |
| `_sasl` | string/number/boolean | No | The seller username(s) to filter results by. You can specify multiple sellers separated by commas (e.g. `iRobot,samsung`). Use with `_saslop` to control whether to include or exclude items from the sp… |
| `_saslop` | any | No | Whether to include or exclude items from the seller(s) specified in `_sasl`. Available options: `1` - Only show items from sellers (default) `2` - Don't show items from sellers |
| `_sop` | string/number/boolean | No | Results sorted by different options in the eBay. The default option is 'Best Match'. Head to the eBay sort options for a full list of supported sort options. |
| `_stpos` | string/number/boolean | No | The ZIP or Postal code. You can use it to filter the shipping products by a selected area. |
| `_udhi` | string/number/boolean | No | The highest price of items that should be included in the results (e.g. `20` will only return items that have lower price than `20`). |
| `_udlo` | string/number/boolean | No | The lowest price of items that should be included in the results (e.g. `10` will only return items that have higher price than `10`). |
| `buying_format` | any | No | The buying format you can apply to the results. Available options **(case-sensitive)**: `Auction` - Auction `BIN` - Buy It Now `BO` - Accepts Offers |
| `category_id` | string/number/boolean | No | The ID of a category where you want your search to be concentrated. ID values are accessible inside `categories` array, located in our JSON output (e.g. `categories[1].id`). You can search using `cate… |
| `ebay_domain` | string/number/boolean | No | The eBay domain to use. It defaults to `ebay.com`. Head to the eBay domains for a full list of supported eBay domains. |
| `json_restrictor` | string/number/boolean | No | The fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |
| `popular_filters` | string/number/boolean | No | Allows filtering items based on their attributes. The structure is a list of `key=value` pairs separated by `&` (e.g. `Brand=Nespresso&Size=L`). To pass multiple values for the same filter, join them … |
| `show_only` | string | No | The list of filters you can apply to the results. Available options **(case-sensitive)**: `FR` - Free returns `RPA` - Returns accepted `AS` - Authorized seller `Savings` - Deals and savings `SaleItems… |

#### Pricing

Flat price per call. Failed calls are not charged.
