# SearchPapersByContent

## Description

Searches flipbooks recursively for text content on the indexed pages.

## Parameters

| Name              | Value                                                                                                       |
| ----------------- | ----------------------------------------------------------------------------------------------------------- |
| query             | The text string to search for. Max length: 128 chars                                                        |
| categoryOrPaperID | Either a PaperID or a CategoryID that should be searched. Will search recursively if CategoryID is provided |
| xmlOptions        | Not currently used                                                                                          |

## Sample Response

```xml
<?xml version="1.0" encoding="utf-8"?>
<result>
  <code><![CDATA[SUCCESS]]></code>
  <message><![CDATA[Search results returned.]]></message>
  <data>
    <results>
      <result paperID="1213" pageNumber="4" paperName="Test Catalog" paperUrl="/Demos/TestCatalog/" />
      <result paperID="1213" pageNumber="5" paperName="Test Catalog" paperUrl="/Demos/TestCatalog/" />
    </results>
  </data>
</result>
```

## Return Codes

* SUCCESS
* ERROR
* LOGIN\_SECURITY\_VIOLATION
* SEARCH\_TEMPORARILY\_UNAVAILABLE


---

# Agent Instructions: 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:

```
GET https://docs.ipaper.io/flipbook-backend-api/search/search-papers-by-content.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
