Get state, city, latitude, longitude, and estimated population for a given zip code.
At the 21 command line, execute the code below.
$ 21 buy "https://mkt.21.co/zipdata/collect?zip_code=94109" --maxprice 2750
# Output:
# {
# "EstimatedPopulation": "38763",
# "Decommisioned": "false",
# "City": "SAN FRANCISCO",
# "Long": "-122.42",
# "Lat": "37.79",
# "ZipcodeType": "STANDARD",
# "Zipcode": "94109",
# "State": "CA"
# }
Aggregate responses from n ping21 servers through a single endpoint.
At the 21 command line, execute the code below.
$ 21 buy https://mkt.21.co/ping21/buypings --data '{"n": 3, "website": "21.co"}' --maxprice 9000
# Output:
# {
# "pings": [
# {
# "ping": [
# "PING 21.co (104.20.83.116) 64(92) bytes of data.",
# "72 bytes from 104.20.83.116: icmp_seq=1 ttl=55 time=13.3 ms",
# "72 bytes from 104.20.83.116: icmp_seq=2 ttl=55 time=13.3 ms",
# "72 bytes from 104.20.83.116: icmp_seq=3 ttl=55 time=13.5 ms",
# "--- 21.co ping statistics ---",
# "3 packets transmitted, 3 received, 0% packet loss, time 2003ms",
# "rtt min\/avg\/max\/mdev = 13.306\/13.385\/13.532\/0.140 ms"
# ],
# "server": {
# "city": "",
# "country": "US",
# "hostname": "104-63-201-227.lightspeed.austtx.sbcglobal.net",
# "ip": "104.63.201.227",
# "loc": "38.0000,-97.0000",
# "org": "AS7018 AT&T Services, Inc.",
# "region": ""
# }
# }, ...
# ]
# }
Order list of Twitter usernames by Klout score.
At the 21 command line, execute the code below.
$ 21 buy https://mkt.21.co/klouttwitter/score --data '{"usernames": ["balajis", "bhorowitz", "pmarca"]}' --maxprice 5000
# Output:
# {
# "score": [
# [
# "pmarca",
# "86.79"
# ],
# [
# "bhorowitz",
# "80.92"
# ],
# [
# "balajis",
# "68.02"
# ]
# ]
# }
Tags words in text with corresponding part of speech.
At the 21 command line, execute the code below.
$ 21 buy https://mkt.21.co/pos/analyze --data '{"text": "The quick brown fox jumped over the lazy dogs."}' --maxprice 6000
# Output:
# {
# "tags":[
# "Determiner",
# "Adjective",
# "Adjective",
# "Noun, singular or mass",
# "Verb, past tense",
# "Preposition or subordinating conjunction",
# "Determiner",
# "Adjective",
# "Noun, plural",
# "."
# ]
# }
Return the coordinates of an address.
At the 21 command line, execute the code below.
$ 21 buy "https://mkt.21.co/geocode/get?address=1600 Pennsylvania Ave NW, Washington, DC" --maxprice 5000
# Output:
# {
# "latitude": 38.8976094,
# "longitude": -77.0367349
# }
Analyze text, URLs, or HTML for entities.
At the 21 command line, execute the code below.
$ 21 buy https://mkt.21.co/text_entities/text --data '{"text": "And by minting a trillion dollar coin, then depositing it at the Fed, the Treasury could acquire enough cash to sidestep the debt ceiling while doing no economic harm at all."}' --maxprice 5000
# Output:
# {
# "entities":[
# {
# "disambiguated":{
# "name":"Federal Reserve System",
# "yago":"http://yago-knowledge.org/resource/Federal_Reserve_System",
# "website":"http://www.federalreserve.gov/",
# "opencyc":"http://sw.opencyc.org/concept/Mx4rvct-4JwpEbGdrcN5Y29ycA",
# "freebase":"http://rdf.freebase.com/ns/m.02xmb",
# "dbpedia":"http://dbpedia.org/resource/Federal_Reserve_System"
# },
# "count":"1",
# "text":"Fed",
# "type":"Organization",
# "relevance":"0.33"
# }, ...
# ]
# }
$ 21 buy https://mkt.21.co/text_entities/url --data '{"url": "medium.com/@21/a-bitcoin-miner-in-every-device-and-in-every-hand-e315b40f2821"}' --maxprice 5000
# Output:
# {
# "entities":[
# {
# "count":"16",
# "text":"bitcoin",
# "type":"Technology",
# "relevance":"0.801373"
# },
# {
# "count":"8",
# "text":"Balaji S. Srinivasan",
# "type":"Person",
# "relevance":"0.540656"
# },
# {
# "count":"4",
# "text":"BitShare",
# "type":"Company",
# "relevance":"0.39282"
# }, ...
# ]
# }
$ 21 buy https://mkt.21.co/text_entities/html --data '{"html": "<html><body>The White House</body></html>"}' --maxprice 5000
# {
# "entities":[
# {
# "relevance":"0.33",
# "count":"1",
# "text":"White House",
# "type":"Facility"
# }
# ]
# }
Fetch a company's logo.
At the 21 command line, execute the code below.
$ 21 buy "https://mkt.21.co/company/logo?domain_url=21.co" --maxprice 2000 | jq -r '.logo.data' | base64 --decode > logo.png
# Note: run `sudo apt-get install jq` if jq is not already installed.
Get the full text of a Wikipedia page.
At the 21 command line, execute the code below.
$ 21 buy "https://mkt.21.co/wikipedia_content/scrape?title=Bitcoin" --maxprice 2000
# Output:
# {
# "content": "<p><b>Bitcoin</b> is a digital asset and a payment system invented by Satoshi Nakamoto, who published the invention in 2008 and released it as open-source software in 2009. The system is peer-to-peer; users can transact directly without an intermediary. Transactions are verified by network nodes and recorded in a public distributed ledger called the <i>block chain</i>.".....
# }
Get all external links from a Wikipedia page.
At the 21 command line, execute the code below.
$ 21 buy "https://mkt.21.co/wikipedia_links/collect?title=Bitcoin" --maxprice 2000
# Output:
# {
# "links":[
# "http://arxiv.org/abs/1311.0243",
# "http://arxiv.org/abs/1402.4778",
# "http://commons.wikimedia.org/wiki/Special:Search/Bitcoin",
# "http://en.wikibooks.org/wiki/Special:Search/Bitcoin",
# "http://en.wikinews.org/wiki/Special:Search/Bitcoin",
# "http://en.wikiquote.org/wiki/Special:Search/Bitcoin",
# "http://en.wikisource.org/wiki/Special:Search/Bitcoin",
# "http://en.wikiversity.org/wiki/Special:Search/Bitcoin",
# "http://en.wiktionary.org/wiki/Special:Search/Bitcoin",
# "http://www.wikidata.org/wiki/Q131723"
# ]
# }
Get recommended news articles based on a given text.
At the 21 command line, execute the code below.
$ 21 buy "https://mkt.21.co/recommend_news/find?text=A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution." --maxprice 2000
# Output:
# {
# "recommended":[
# {
# "author":"Katie Benner, Mike Isaac",
# "summary":"The company is in talks with banks about a service that would let people use their iPhones to send money to one another as easily as they send messages.",
# "published":"2015-11-12T01:23:47.000Z",
# "source_name":"New York Times",
# "url":"http://rss.nytimes.com/c/34625/f/640316/s/4b6e5d9e/sc/28/l/0L0Snytimes0N0C20A150C110C120Ctechnology0Capple0Eplans0Epeer0Eto0Epeer0Epayment0Eservice0Bhtml0Dpartner0Frss0Gemc0Frss/story01.htm",
# "distance":0.8674031496,
# "title":"Apple Plans Peer-to-Peer Payment Service",
# "source_slug":"new-york-times",
# "thumbnail":"https://images.getnewsbot.com/3962556.jpg",
# "image":"http://static01.nyt.com/images/icons/t_logo_291_black.png",
# "document_id":1759395
# }
# ]
# }
No topics found