I'm trying to update the page covers of pages in a database. I've tried using notion/search to look for pages but I end up with all pages in the database instead of the typed result. Currently, I'm trying to query a database with filters for property Title and see if it contains the drama name but I'm with a similar result as earlier
url = f"https://api.notion.com/v1/databases/{database_id}/query"
search_data = {
"filter":{
"and": [
{
"property":"Drama Title",
"text": {
"contains":"example_show"
}
}
]}
}
res = requests.request("POST", url, headers=headers, data=search_data)
page = res.json()
print(page)
The reason to get the page is so I can get its page_id to use notions patch "Update Page" to change the cover of the page.