<jupyter_start><jupyter_text>The most common use of the registry is to find archives with `VO data access services`, and the simplest wayto do this is to use the `~pyvo.regsearch` function.  For example, to find datacollections that contain searchable X-ray images:<jupyter_code>services = vo.regsearch(servicetype='sia', waveband='x-ray')
len(services)<jupyter_output><empty_output><jupyter_text>Aha! Perhaps you didn't realize there were that many.What collections are these?<jupyter_code>for service in services:
    print(service.res_title)<jupyter_output><empty_output><jupyter_text>As you can gather, each record in the registry search resultsrepresents a different service (in this case, an image service).Included in the record is the all-important base URL for the service:<jupyter_code>print(services[0].access_url)<jupyter_output><empty_output><jupyter_text>However, it's not necessary to keep track of that URL because you cannow search that collection directly via the registry record:<jupyter_code>images = services[0].search(pos=(350.85, 58.815), size=0.25)
len(images)<jupyter_output><empty_output><jupyter_text>Other types of services via the ``servicetype`` parameter:| set ``servicetype`` to... | ...to find:| ------------------------- | -------------------------------------| sia                       | Simple Image Access (SIA) services| ssa                       | Simple Spectral Access (SSA) services| scs                       | Simple Cone Search (SCS) services| slap                      | Simple Line Access (SLA) services| tap                       | Table Access Protocol (TAP) servicesFor example, to find all known Cone Search services:<jupyter_code>cats = vo.regsearch(servicetype='conesearch')
len(cats)<jupyter_output><empty_output><jupyter_text>Wow, that's a lot of catalogs.  (Most of these are from the`Vizier Catalog Archive `)every Vizier catalog that includes a position is available as a ConeSearch service.)  For just catalogs related to blazars:<jupyter_code>cats = vo.regsearch(keywords=['blazar'], servicetype='conesearch')
len(cats)<jupyter_output><empty_output><jupyter_text>How about blazars observed with Fermi?<jupyter_code>cats = vo.regsearch(keywords=['blazar', 'Fermi'], servicetype='conesearch')
len(cats)<jupyter_output><empty_output><jupyter_text>Sometimes you may be looking for a particular catalog or image collectionsthat you already know exists, and you just need to learn the base URLfor the service.  The ``keywords`` parameter can be used to find it.For example, suppose you want to get cutout images from the NRAO VLASky Survey (NVSS):<jupyter_code>colls = vo.regsearch(keywords=["NVSS"], servicetype='sia')
for coll in colls:
    print(coll.res_title)<jupyter_output><empty_output><jupyter_text>More powerful than a cone search is a generic TAP service.  These services optionally provide helpful information on how to use them.  First, let's see what services are available that serve NASA data:<jupyter_code>taps = vo.regsearch(servicetype='tap',keywords=['HEASARC'])
for tapsvc in taps:
    tapsvc.describe()
    print("---------")<jupyter_output><empty_output><jupyter_text>Then we need to find out what tables each service serves, because each *may* server many.<jupyter_code>tables=taps[0].service.tables
for table in tables:
    table.describe()<jupyter_output><empty_output><jupyter_text>You can see example queries if the service offers them.  This .examples method returns a TAPQuery object that can be executed.<jupyter_code>for example in taps[0].service.examples:
    print(example['QUERY'])
    result=example.execute()
    break
result.to_table()<jupyter_output><empty_output><jupyter_text>And for each table, you can find out the available columns:<jupyter_code>print("Columns={}".format(sorted([k.name for k in tables['a1'].columns ])))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11399636458062841, 'fraction_numerical': 0.004674110620618021, 'mean_word_length': 4.972093023255814, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '12', 'dir': 'jupyter-structured-clean-dedup', 'id': '399866', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1125, 'n_words': 363, 'path': 'examples/notebooks/simple_service_discovery.ipynb', 'repo_name': 'zoghbi-a/pyvo', 'size': '3851'}