> 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.feedotter.com/newsletters/content-sources/json-xml-api/search-parameter-support.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
