AI City Remix$11,500 prize pool. Pick a city, let AI tell its story, Oct 22 – 28.Join now
API reference · eBay

ebay/search

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/api/ebay/search
Model IDebay/search
01

Input Schema

20 parameters · 1 required · 19 optional

ParameterTypeRequiredDescription
_nkwstringnumberbooleanRequiredThe 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.
_dmdstringnumberbooleanOptionalThe visual layout for displaying results. The available options are 'Grid' and 'List'.
_ipgstringnumberbooleanOptionalThe maximum number of results to return. There are three options: `60` (default), `120` and `240` results.
_pgnstringnumberbooleanOptionalThe 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.).
_sopstringnumberbooleanOptionalResults 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.
_blrsstringnumberbooleanOptionalThe 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 include results for an auto-corrected query. Note that this parameter may not prevent eBay from returning results for an auto-corrected query if no other results are available.
_saslstringnumberbooleanOptionalThe 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 specified seller(s).
_udhistringnumberbooleanOptionalThe highest price of items that should be included in the results (e.g. `20` will only return items that have lower price than `20`).
_udlostringnumberbooleanOptionalThe lowest price of items that should be included in the results (e.g. `10` will only return items that have higher price than `10`).
_salicstringnumberbooleanOptionalThe location based on country. Head to the eBay location options for a full list of supported countries.
_stposstringnumberbooleanOptionalThe ZIP or Postal code. You can use it to filter the shipping products by a selected area.
_saslopunionOptionalWhether 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
show_onlystringOptionalThe 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` - Sale items `Lots` - Listed as lots `Charity` - Benefits charity `AV` - Authenticity Guarantee `FS` - Free shipping `LPickup` - Local pickup You can also combine multiple filter values by joining them with a comma (`value` + `,` + `value`; eg: `FS,RPA`). The `Sold` and `Complete` options are deprecated and no longer supported.
LH_PrefLocstringnumberbooleanOptionalThe preferred location. The available options are 'Domestic', 'Regional', and 'Worldwide'.
category_idstringnumberbooleanOptionalThe 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 `category_id` parameter without specifying `_nkw` parameter.
ebay_domainstringnumberbooleanOptionalThe eBay domain to use. It defaults to `ebay.com`. Head to the eBay domains for a full list of supported eBay domains.
buying_formatunionOptionalThe buying format you can apply to the results. Available options **(case-sensitive)**: `Auction` - Auction `BIN` - Buy It Now `BO` - Accepts Offers
json_restrictorstringnumberbooleanOptionalThe fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
popular_filtersstringnumberbooleanOptionalAllows 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 with `|` (e.g. `Brand=adidas|Majestic`). Values can be obtained from the `popular_filters[].parameter` field of the API response.
LH_ItemConditionstringnumberbooleanOptionalOne 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 supported IDs can be found on eBay documentation page. There is also undocumented ID `10` for `Not Specified` condition.
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from the completed response
03

Code Examples

Ready-to-run snippets

const apiKey = process.env.SANDBASE_API_KEY;
const response = await fetch("https://api.sandbase.ai/v1/api/ebay/search", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});

if (!response.ok) throw new Error(await response.text());
console.log(await response.json());