Uniform Resource Locators

Understanding the URLs in your browser address bar is the first step to using web APIs. So let’s dissect a URL:

protocol :// domain . top-level domain (optional port :80) / path and filename ? query with parameters # fragment or anchor

Networking basics

A network is two or more computers connected. URLs are stand ins for Internet Protocol addresses (IP), which are numerical identifiers for devices connected to a network.

Network Demo
  • Find your IP
  • Check another IP: ping www.google.com or nslookup www.uidaho.edu
  • Follow your traffic: traceroute / tracert / tracepath tracepath www.google.com or mtr --report google.com
  • Make a request: curl www.google.com

For an in-depth, but fun intro, checkout Julia Evan’s Networking Zine.

Third party “widget” example:

Use Twitter publish to embed a tweet (see Twitter API)

<blockquote class="twitter-tweet">
<p lang="en" dir="ltr">ping &amp; traceroute <a href="https://t.co/ePIwtXGEJk">pic.twitter.com/ePIwtXGEJk</a></p>
&mdash; 🔎Julia Evans🔍 (@b0rk) <a href="https://twitter.com/b0rk/status/1088647566949056512?ref_src=twsrc%5Etfw">January 25, 2019</a>
</blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 

Becomes: