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:

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

Result:

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

Method: entries

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

http://www.weblaws.org/api/glossary/v1/API_KEY/entries.xml?term=u.s.+attorney

Result:

<?xml version="1.0" encoding="UTF-8"?>
<glossary-entries type="array">
  <glossary-entry>
    <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>
    <glossary-source>
      <author>United States Court of Appeals for the Ninth Circuit</author>
      <name>Commonly Used Terms - U.S. Courts</name>
    </glossary-source>
  </glossary-entry>
</glossary-entries>

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:

http://www.weblaws.org/api/glossary/v1/API_KEY/entries.json?phrase=attorney