> For the complete documentation index, see [llms.txt](https://docs.feedotter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.feedotter.com/newsletters/content-sources/json-xml-api/search-parameter-support.md).

# Search Parameter Support

You can now define a search parameter so that your users can dynamically search an API from within FeedOtter.&#x20;

### What’s New

* When setting up a JSON content source, you specify a **search parameter** (like `query` or `q`).&#x20;
* Automatically retrieve and display dynamic, filtered JSON content in your newsletters.

### How It Works

1. **Add a JSON/XML content source**
   * Go to **Settings > Content Sources > Add New Content Source**
   * Choose JSON or XML as the **Content Source Type**
   * Enter a **Name**
   * Paste a sample URL with a search term for testing, e.g.:
     * <https://api.chucknorris.io/jokes/search?query=beer>

2. **Define the Repeating Element**

* When working with a JSON feed, you need to tell FeedOtter where to find the list of content items.  This is called the "Repeating Element".

3. **Map Your Fields**

Example field mappings:

| Label     | Mapping      | Type  |
| --------- | ------------ | ----- |
| Title     | `value`      | Text  |
| URL       | `url`        | Text  |
| Date      | `created_at` | Date  |
| Image URL | `icon_url`   | Image |

{% hint style="info" %} <mark style="color:blue;">**You should customize these to fit your API's structure.**</mark>
{% endhint %}

4. **Set the Search Parameter**&#x20;

* Under the **Search Parameter** section (beneath Custom Data Mapping), add the parameter name used in your API query string. This tells FeedOtter to append `?query=YOURSEARCHTERM` when a user types into the search box.

<div align="left"><figure><img src="/files/2c9IOO91XxE8sK7FuTfF" alt="" width="495"><figcaption><p>Screenshot: Example JSON content source setup with <code>query</code> as the search parameter and mapped fields.</p></figcaption></figure></div>

### Example In Action

Once configured, your users can now:

* Select the content source within your curated newsletter
* Type any keyword into the **search box**
* Instantly view filtered results from the JSON feed!

<div align="left"><figure><img src="/files/wJi4vAnsb3hkHswzf8Fp" alt=""><figcaption></figcaption></figure></div>
