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.
POST
https://api.sandbase.ai/v1/api/ebay/searchModel ID
ebay/search01
Input Schema
20 parameters · 1 required · 19 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
_nkw | stringnumberboolean | Required | 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. |
_dmd | stringnumberboolean | Optional | The visual layout for displaying results. The available options are 'Grid' and 'List'. |
_ipg | stringnumberboolean | Optional | The maximum number of results to return. There are three options: `60` (default), `120` and `240` results. |
_pgn | stringnumberboolean | Optional | 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.). |
_sop | stringnumberboolean | Optional | 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. |
_blrs | stringnumberboolean | Optional | 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 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. |
_sasl | stringnumberboolean | Optional | 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 specified seller(s). |
_udhi | stringnumberboolean | Optional | 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 | stringnumberboolean | Optional | 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`). |
_salic | stringnumberboolean | Optional | The location based on country. Head to the eBay location options for a full list of supported countries. |
_stpos | stringnumberboolean | Optional | The ZIP or Postal code. You can use it to filter the shipping products by a selected area. |
_saslop | union | Optional | 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 |
show_only | string | Optional | 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` - 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_PrefLoc | stringnumberboolean | Optional | The preferred location. The available options are 'Domestic', 'Regional', and 'Worldwide'. |
category_id | stringnumberboolean | Optional | 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 `category_id` parameter without specifying `_nkw` parameter. |
ebay_domain | stringnumberboolean | Optional | The eBay domain to use. It defaults to `ebay.com`. Head to the eBay domains for a full list of supported eBay domains. |
buying_format | union | Optional | The buying format you can apply to the results. Available options **(case-sensitive)**: `Auction` - Auction `BIN` - Buy It Now `BO` - Accepts Offers |
json_restrictor | stringnumberboolean | Optional | 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 | stringnumberboolean | Optional | 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 with `|` (e.g. `Brand=adidas|Majestic`). Values can be obtained from the `popular_filters[].parameter` field of the API response. |
LH_ItemCondition | stringnumberboolean | Optional | 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 supported IDs can be found on eBay documentation page. There is also undocumented ID `10` for `Not Specified` condition. |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom 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());