# Content Search iiisight can discover a resource's [Content Search](https://iiif.io/api/search/) service, run a query, and return the hits as annotations in the normalized model. It handles both Content Search 2.0 (`AnnotationPage` responses) and the older 1.0 (`sc:AnnotationList`, upgraded automatically). ## Searching Pass a manifest (its search service is discovered), a {class}`~iiisight.Service`, or a search base URL: ::::{tab-set} :::{tab-item} Async ```python async with iiisight.AsyncClient() as client: manifest = await client.fetch_manifest(url) page = await client.search(manifest, "cathedral") for hit in page.items: print(hit.target, hit.body) ``` ::: :::{tab-item} Sync ```python with iiisight.Client() as client: manifest = client.fetch_manifest(url) page = client.search(manifest, "cathedral") for hit in page.items: print(hit.target, hit.body) ``` ::: :::: The result is an {class}`~iiisight.AnnotationPage`; each hit is an {class}`~iiisight.Annotation` whose `target` points into the object (often with an `xywh` fragment) and whose `body` carries the matched text. ## Extra parameters Content Search supports parameters like `motivation`, `date`, and `user`: ```python page = await client.search(manifest, "cathedral", params={"motivation": "painting"}) ``` ## Discovering the service yourself ```python service = iiisight.find_search_service(manifest) # -> Service | None if service: url = iiisight.search_url(service, "cathedral") # ... fetch `url` however you like, then: # page = iiisight.parse_search_response(response_json) ```