Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter NameGuidelinesExamples
zip

ZIP code must have 5 characters.

22202, 05354
stateabbrState must have a universally accepted two letter abbreviation.AL, VA
ipMust be complete and valid IP address.138.88.141.44

...


...

Search Callsign Availabilities by ZIP Code


Code Block
titleEndpoint
http://services.pbs.org/callsigns/zip/<zip>.json

...

Code Block
languagejavascript
titleFind Callsign, Station, and Flagship by Zipcode
{
   "$type":"application/vnd.pbs-collection+json",
   "$self":"http://services.pbs.org/callsigns/zip/22202.json",
   "$items":[
      {
         "confidence":100,
         "$type":"application/vnd.pbs-resource+json",
         "$class":"CallSign2ZipMapping",
         "rank":1,
         "$self":"http://services.pbs.org/callsigns/zip/22202/WETA.json",
         "$links":[
            {
               "callsign":"WETA",
               "$links":[
                  {
                     "$type":"application/vnd.pbs-resource+json",
                     "mailing_state":"VA",
                     "short_common_name":"WETA",
                     "$class":"Station",
                     "$relationship":"parent",
                     "$self":"http://services.pbs.org/station/139.json",
                     "mailing_city":"Arlington",
                     "$created":"2012-11-12T04:54:55-05:00",
                     "$links":[
                        {
                           "$type":"application/vnd.pbs-collection+json",
                           "$relationship":"children",
                           "$self":"http://services.pbs.org/callsigns/station/139.json",
                           "$elements":"Callsign",
                           "$accepts":[
                              {
                                 "$type":"application/vnd.pbs-resource+json",
                                 "$class":"Callsign"
                              }
                           ]
                        },
                        {
                           "$relationship":"flagship",
                           "$type":"application/vnd.pbs-resource+json",
                           "$class":"Callsign",
                           "callsign":"WETA",
                           "$self":"http://services.pbs.org/callsign/WETA.json"
                        }
                     ],
                     "common_name":"WETA Television and Radio",
                     "$edited":"2012-11-12T04:54:55-05:00"
                  },
                  {
                     "$type":"application/vnd.pbs-collection+json",
                     "$relationship":"children",
                     "$elements":"Feed",
                     "$self":"http://services.pbs.org/feeds/callsign/WETA.json"
                  }
               ],
               "$type":"application/vnd.pbs-resource+json",
               "$class":"Callsign",
               "$relationship":"related",
               "$self":"http://services.pbs.org/callsign/WETA.json"
            }
         ]
      },
      ... more elements here ...
   ],
   "$elements":"CallSign2ZipMapping",
   "$accepts":[
      {
         "$type":"application/vnd.pbs-resource+json",
         "$class":"CallSign2ZipMapping"
      }
   ]
}

...


Search Station by State

Code Block
titleEndpoint
http://services.pbs.org/stations/state/<stateabbr>.json

...

Code Block
languagejavascript
titleFind Station by State
{ 
   $type: "application/vnd.pbs-collection+json",
   $items: [ 
     { 
	$type: "application/vnd.pbs-resource+json",
   	$class: "Station2StateMapping",
	$links: [ 
           { 
		$type: "application/vnd.pbs-resource+json",
		mailing_state: "AK",
		short_common_name: "KAKM",
		$class: "Station",
		$relationship: "related",
		$self: http://services.pbs.org/station/26.json,
		mailing_city: "Anchorage",
		$created: "2012-11-12T04:54:52-05:00",
		$links: [ 
		   { 
			$type: "application/vnd.pbs-collection+json",
			$relationship: "children",
			$self: http://services.pbs.org/callsigns/station/26.json,
			$elements: "Callsign",
			$accepts: [ 
			   { 
				$type: "application/vnd.pbs-resource+json",
				$class: "Callsign"
			   }
			]
		   },
		   { 
			$relationship: "flagship",
			$type: "application/vnd.pbs-resource+json",
			$class: "Callsign",
			callsign: "KAKM",
			$self: http://services.pbs.org/callsign/KAKM.json
		   }
		],
		common_name: "KAKM-TV Channel 7",
		$edited: "2012-11-12T04:54:52-05:00"
	   }
	],
   $self: http://services.pbs.org/stations/state/AK/26.json
},
{ 
   $type: "application/vnd.pbs-resource+json",
   $class: "Station2StateMapping",
   $links: [ 
	{ 
	   $type: "application/vnd.pbs-resource+json",
	   mailing_state: "AK",
	   short_common_name: "KTOO",
	   $class: "Station",
	   $relationship: "related",
	   $self: http://services.pbs.org/station/106.json,
	   mailing_city: "Juneau",
	   $created: "2012-11-12T04:54:54-05:00",
	   $links: [ 
		{ 
		   $type: "application/vnd.pbs-collection+json",
		   $relationship: "children",
		   $self: http://services.pbs.org/callsigns/station/106.json,
		   $elements: "Callsign",
		   $accepts: [ 
			{ 
			   $type: "application/vnd.pbs-resource+json",
			   $class: "Callsign"
			}
		   ]
		},
		{ 
		   $relationship: "flagship",
		   $type: "application/vnd.pbs-resource+json",
		   $class: "Callsign",
		   callsign: "KTOO",
		   $self: http://services.pbs.org/callsign/KTOO.json
		}
	   ],
	   common_name: "KTOO",
	   $edited: "2012-11-12T04:54:54-05:00"
	}
   ],
   $self: http://services.pbs.org/stations/state/AK/106.json
},
{ 
   $type: "application/vnd.pbs-resource+json",
   $class: "Station2StateMapping",
   $links: [ 
	{ 
	   $type: "application/vnd.pbs-resource+json",
	   mailing_state: "AK",
	   short_common_name: "KUAC",
	   $class: "Station",
	   $relationship: "related",
	   $self: http://services.pbs.org/station/68.json,
	   mailing_city: "Fairbanks",
	   $created: "2012-11-12T04:54:53-05:00",
	   $links: [ 
		{ 
		   $type: "application/vnd.pbs-collection+json",
		   $relationship: "children",
		   $self: http://services.pbs.org/callsigns/station/68.json,
		   $elements: "Callsign",
		   $accepts: [ 
			{ 
			   $type: "application/vnd.pbs-resource+json",
			   $class: "Callsign"
			}
		   ]
		},
		{ 
		   $relationship: "flagship",
		   $type: "application/vnd.pbs-resource+json",
		   $class: "Callsign",
		   callsign: "KUAC",
		   $self: http://services.pbs.org/callsign/KUAC.json
		}
	   ],
	   common_name: "AlaskaOne",
	   $edited: "2012-11-12T04:54:53-05:00"
	}
   ],
   $self: http://services.pbs.org/stations/state/AK/68.json
  }
],

$elements: "Station2StateMapping",

$self: "http://services.pbs.org/stations/state/AK.json"


} 

...

Search Zip Code by IP Address

Code Block
titleEndpoint
http://services.pbs.org/zipcodes/ip/138.88.141.44.json

...