Annotations XML File

The search annotations file, (cse.xml), is the XML specification for Google Custom Search Engine. It specifies how the search engine works and looks, and can be downloaded, edited and used to programatically create search engines on the fly.

The annotations file has four elements in the following hierarchy:

Annotations (root element) Annotation Label Comment (optional)

# Example

The following is an example of XML annotations. This annotations file tells Custom Search to include everything under www.webmd.com/hw/* but exclude everything under www.webmd.com/hw/cancer/*.

<Annotations> <Annotation about="www.cancer.gov/cancertopics/types/liver/*"> <Label name="_cse_Ansi-stoubiq"/> <Comment>government site</Comment> </Annotation> <Annotation about="www.medicinenet.com/liver_cancer/"> <Label name="_cse_exclude_Ansi-stoubiq"/> <Comment>site on symptoms</Comment> </Annotation> <Annotation about="www.webmd.com/hw/cancer/*"> <Label name="_cse_exclude_Ansi-stoubiq"/> <Comment>great sites for patients!</Comment> </Annotation> <Annotation about="www.oncologychannel.com/*/treatment"> <Label name="_cse_exclude_Ansi-stoubiq"/> </Annotation> </Annotations>

# Managing Annotations Files

When you upload your files in the Control Panel, Custom Search merges all your annotations into a single annotations file that is shared by all your search engines.

This is the annotations file you download from the Control Panel. You can distinguish the annotations by their Search Engine Labels (the value in the Label element and the name attribute).

<Annotation about="http://www.solarenergy.org/*"> <Label name="_cse_abcdefghijk"/> </Annotation>

If you prefer to keep the annotations for each search engine separate, you should maintain the original annotations files and upload them to the Control Panel when you make changes.

To keep things simple, stick with using the XML format. Do not alternate between using the XML format and the Sites tab in the Control Panel to include or exclude sites, because changes made to the Sites tab are appended to the communal annotations file and you'll have to copy these new annotations to your copy of the annotations file.