# SearchPapersWithHiearchyByContent

## Description

Searches Flipbooks recursively for text content on the indexed pages and return Flipbooks with hiearchy information.

## Parameters

| Name       | Value                                                           |
| ---------- | --------------------------------------------------------------- |
| query      | The text string to search for. Max length: 128 chars            |
| categoryID | The CategoryID that should be searched. Will search recursively |
| 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>
    <papers>
      <paper paperID="4984" name="MyPaper" url="/Client1/MyPaper/" parentID="3629" category="False" />
      <paper paperID="4985" name="Category1" url="/Client1/Category1/" parentID="3629" category="True" />
      <paper paperID="4986" name="NewPaper" url="/Client/Category1/NewPaper/" parentID="4985" category="False" />
    </papers>
  </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-with-hierarchy-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.
