def search_data(
        self,
        query: str,
        direction: Optional[str] = None,
        timestamp: Optional[str] = None,
        value: Optional[str] = None,
        property: Optional[str] = None,
        page_size: int = 100,
    ) -> List[Dict[str, Any]]:
        """
        Search a list of relevant pages.

        Contains metadata for each page (but not the page content).
        params:
           query: the title of the page or database to search for, which is fuzzy matched.
        """
        payload: Dict[str, Any] = {
            "query": query,
            "page_size": page_size,
        }
        if direction is not None or timestamp is not None:
            payload["sort"] = {}
            if direction is not None:
                payload["sort"]["direction"] = direction
            if timestamp is not None:
                payload["sort"]["timestamp"] = timestamp

        if value is not None or property is not None:
            payload["filter"] = {}
            if value is not None:
                payload["filter"]["value"] = value
            if property is not None:
                payload["filter"]["property"] = property

        response = requests.post(SEARCH_URL, json=payload, headers=self.reader.headers)
        response_json = response.json()
        return response_json["results"]

        Search a list of relevant pages.

        Contains metadata for each page (but not the page content).
        params:
           query: the title of the page or database to search for, which is fuzzy matched.
        
llama-index-integrations/tools/llama-index-tools-notion/llama_index/tools/notion/base.py