---
title: Search
slug: countdownapi/ebay-product-data-api/parameters/search
docTags: 
createdAt: 2024-07-29T12:49:20.015Z
---

# Search Parameters

<font color="#52c41a">`GET`</font>  `/request`

The Search Parameters are applicable when making a request with  `type=search`  to retrieve search results for an Ebay domain - the Ebay domain is specified using the  `ebay_domain`  parameter and the search term is specified in the  `search_term`  parameter. The parameters should be appended as querystring parameters to the Ebay Product Data API `GET` HTTP request.

Search results are retrieved from the [search results page](https://www.ebay.com/sch/i.html?_nkw=memory+cards) on Ebay.

![](https://apiimages.imgix.net/countdownapi/images/png/docs/search.png?auto=format\&ixlib=react-9.5.1-beta.1\&w=600 "Search Results Page")

For example, to request search results for the search term "memory cards" sorted by "high to low price", on  `ebay.com` , the request would be:

:::CodeblockTabs
HTTP

```HTTP
https://api.countdownapi.com/request?api_key=demo&type=search&ebay_domain=ebay.com&search_term=memory+cards&sort_by=price_high_to_low
```

```curl
curl -L --get https://api.countdownapi.com/request \
-d api_key="demo" \
-d type="search" \
-d ebay_domain="ebay.com" \
-d search_term="memory+cards" \
-d sort_by="price_high_to_low"
```

```nodejs
const axios = require('axios');

// set up the request parameters
const params = {
  api_key: "demo",
  type: "search",
  ebay_domain: "ebay.com",
  search_term: "memory cards",
  sort_by: "price_high_to_low"
}

// make the http GET request to Countdown API
axios.get('https://api.countdownapi.com/request', { params })
  .then(response => {

    // print the JSON response from Countdown API
    console.log(JSON.stringify(response.data, 0, 2));

  }).catch(error => {
    // catch and print the error
    console.log(error);
  })
```

```python
import requests
import json

# set up the request parameters
params = {
  'api_key': 'demo',
  'type': 'search',
  'ebay_domain': 'ebay.com',
  'search_term': 'memory cards',
  'sort_by': 'price_high_to_low'
}

# make the http GET request to Countdown API
api_result = requests.get('https://api.countdownapi.com/request', params)

# print the JSON response from Countdown API
print(json.dumps(api_result.json()))
```

```php
<?php
      
# set up the request parameters
$queryString = http_build_query([
  'api_key' => 'demo',
  'type' => 'search',
  'ebay_domain' => 'ebay.com',
  'search_term' => 'memory cards',
  'sort_by' => 'price_high_to_low'
]);

# make the http GET request to Countdown API
$ch = curl_init(sprintf('%s?%s', 'https://api.countdownapi.com/request', $queryString));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
# the following options are required if you're using an outdated OpenSSL version
# more details: https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 180);

$api_result = curl_exec($ch);
curl_close($ch);

# print the JSON response from Countdown API
echo $api_result;

?>
```
:::

***

### Search Parameters

The following parameters are available for all requests made when  `type=search` .

| `Parameter`               | `Required` | `Description`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ebay_domain`             | `optional` | The Ebay domain to retrieve search results from. For a full list of supported Ebay domains see [Supported Ebay Domains ](https://docs.trajectdata.com/countdownapi/ebay-product-data-api/reference/ebay-domains).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `category_id`             | `optional` | Determines the category to filter search results to. Category IDs can be retrieved from any Ebay search URL in the `_sacat` Ebay URL querystring parameter.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `search_term`             | `optional` | A search term to use to search for Ebay items.<br />::Image[]{src="https://apiimages.imgix.net/countdownapi/images/png/docs/search_search_term.png?auto=format&ixlib=react-9.5.1-beta.1&w=260" size="100" width="260" height="35" position="center" darkWidth="260" darkHeight="35" showCaption="false" indent="2"}<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `listing_type`            | `optional` | Determines the type of listings to search for.<br />::Image[]{src="https://apiimages.imgix.net/countdownapi/images/png/docs/listing_type.png?auto=format&ixlib=react-9.5.1-beta.1&w=260" size="100" width="260" height="30" position="center" darkWidth="260" darkHeight="30" showCaption="false" indent="2"}<br /><br />1) `all`&#x20;
2) Search for listings of any type.<br /><br />1) `buy_it_now`&#x20;
2) Search for listings with a Buy It Now price.<br /><br />1) `auction`&#x20;
2) Search for auction-format listings.<br /><br />1) `accepts_offers`&#x20;
2) Search for listings marked as accepting-offers.                                                                                                                                                                                                                                                                                                                                                                                                  |
| `sort_by`                 | `optional` | Determines the sort order of search results to return. Valid values are:<br />1) `best_match`&#x20;
2) Sort search results by best match to the `search_term` .<br /><br />1) `price_high_to_low`&#x20;
2) Sort search results by highest to lowest price.<br /><br />1) `price_low_to_high`&#x20;
2) Sort search results by lowest to highest price.<br /><br />1) `price_high_to_low_plus_postage`&#x20;
2) Sort search results by highest to lowest price.<br /><br />1) `price_low_to_high_plus_postage`&#x20;
2) Sort search results by lowest to highest price.<br /><br />1) `newly_listed`&#x20;
2) Sort search results by newest listed first.<br /><br />1) `ending_soonest`&#x20;
2) Sort search results by listings ending soonest.<br />::Image[]{src="https://apiimages.imgix.net/countdownapi/images/png/docs/search_sort_by.png?auto=format&ixlib=react-9.5.1-beta.1&w=150" size="100" width="150" height="286" position="center" darkWidth="150" darkHeight="286" showCaption="false" indent="2"}         |
| `condition`               | `optional` | Determines the condition of listings to search for. Valid values are:<br />1) `all`&#x20;
2) Do not filter on condition, return all listings.<br /><br />1) `new`&#x20;
2) Filter to just New listings.<br /><br />1) `used`&#x20;
2) Filter to just Used listings.<br /><br />1) `open_box`&#x20;
2) Filter to just Open Box listings.<br /><br />1) `manufacturer_refurbished`&#x20;
2) Filter to just Manufacturer Refurbished listings.<br /><br />1) `seller_refurbished`&#x20;
2) Filter to just Seller Refurbished listings.<br /><br />1) `parts_or_not_working`&#x20;
2) Filter to just listings listed for parts or in a not working state.<br /><br />1) `not_specified`&#x20;
2) Filter to just listings that do not specify a condition.<br />::Image[]{src="https://apiimages.imgix.net/countdownapi/images/png/docs/search_condition.png?auto=format&ixlib=react-9.5.1-beta.1&w=150" size="100" width="150" height="207" position="center" darkWidth="150" darkHeight="207" showCaption="false" indent="2"} |
| `page`                    | `optional` | The current page of search results to retrieve.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `max_page`                | `optional` | Use the `max_page` parameter to get multiple pages of results in one request. The API will automatically paginate through pages and concatenate the results into one response.  <br />See the [Pagination ](https://docs.trajectdata.com/countdownapi/ebay-product-data-api/pagination)docs for more information.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `num`                     | `optional` | The number of search results to request (note that it's up to Ebay as to how many are actually returned). Valid values are `60` , `120` , `240` .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `url`                     | `optional` | The Ebay search results page URL to retrieve search results from.  <br />**Note** : If the `url` parameter is supplied then the `sort_by` , `search_term` , `listing_type` , `condition` and `page` parameters are ignored as they should be specified in the `url` .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `authorized_sellers`      | `optional` | Determines whether to filter Ebay search results to just items offered by 'authorized sellers'. Valid values are `true` or `false` (default).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `returns_accepted`        | `optional` | Determines whether to filter Ebay search results to just 'returns accepted items'. Valid values are `true` or `false` (default).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `free_returns`            | `optional` | Determines whether to filter Ebay search results to just 'free returns items'. Valid values are `true` or `false` (default).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `authenticity_verified`   | `optional` | Determines whether to filter Ebay search results to just 'authenticity verified items'. Valid values are `true` or `false` (default).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `deals_and_savings`       | `optional` | Determines whether to filter Ebay search results to just 'deals and savings items'. Valid values are `true` or `false` (default).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `sale_items`              | `optional` | Determines whether to filter Ebay search results to just 'sale items'. Valid values are `true` or `false` (default).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `facets`                  | `optional` | A free-form set of search filter facets to use with the request. The facet parameter should be expressed in comma seperated notation, with the name and value of the facet delimited by an equals ("=") character.  <br />For example, to set the `Brand` facet to the value `SanDisk` and the `Format` facet to the value `MicroSD` the value of the `facets` request parameter would be `facets=Brand=SanDisk,Format=MicroSD` .  <br />Facet name and values are case sensitive and can be found in the Ebay search URL. If you have a facet that takes multiple values they can be seperated with a pipe "\|" character, for example to set the `Brand` facet to the values `SanDisk` and `Samsung` the `facets` request parameter would be `facets=Brand=SanDisk\|Samsung`                                                                                                                                                                                                                                             |
| `allow_rewritten_results` | `optional` | Set to `false` if you wish to exclude results that appear beneath the "Results matching fewer words" banner (meaning the search result doesn't exactly match the `search_term` and has been suggested as an alternative). An example of the "Results matching fewer words banner is shown below. Defaults to `true` .<br />::Image[]{src="https://apiimages.imgix.net/countdownapi/images/png/docs/is_rewritten_result.png?auto=format&ixlib=react-9.5.1-beta.1&w=250" size="100" width="250" height="53" position="center" showCaption="false" indent="2"}                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

***

**Next Steps**
     [Search Results](https://docs.trajectdata.com/countdownapi/ebay-product-data-api/results/search)
