API Documentation

This XML & JSON API makes the WebLaws Glossary available as a web service. Visit the the Google Group External_link_icon to ask questions, make suggestions, and get announcements about new features and content.

Terms of Use

This service is freely available in exchange for a simple credit and link back to this website.

Request an API Key

  1. Sign in to WebLaws.org/OregonLaws.org via OpenID, Twitter, Facebook, or Google.
  2. Drop us a line asking for API access, and tell us your nickname: It will appear here after you sign in.
  3. We'll send you your API key.

Method: terms

Search for matching terms. Example:



<?xml version="1.0" encoding="UTF-8"?>
<glossary-terms type="array">
    <phrase>u.s. attorney</phrase>
    <phrase>prosecuting attorney</phrase>

Method: entries

Return the entries (definitions) for the given term. Example:



<?xml version="1.0" encoding="UTF-8"?>
<glossary-entries type="array">
    <body>A lawyer appointed by the President in each judicial district 
          to prosecute and defend cases for the federal government. The U.S. Attorney 
          employs a staff of Assistant U.S. Attorneys who appear as the government's 
          attorneys in individual cases.</body>
      <author>United States Court of Appeals for the Ninth Circuit</author>
      <name>Commonly Used Terms - U.S. Courts</name>

Misc. Notes

The methods are accessed via GET:

curl http://www.weblaws.org/api/glossary/v1/API_KEY/terms.xml?phrase=court

They may also be accessed via https:

curl https://www.weblaws.org/api/glossary/v1/API_KEY/terms.xml?phrase=court

Get JSON output by substituting .json for .xml: