Given a url and a target string, returns several pieces of information on the url, including "text" - the text of the page (similar to /util/Url2Text) , "title" - the page title, "summary" - a summary of the page text (using either the meta description of the page, or, if this is not available, the summary of the page text via /nlp/Summarizer), "thumbnail" - the url of the main image on the page, if it can be located, and a boolean denoting if the page source contains the target string. Note that all information is provided on a best effort basis, if something can be found it will not be included in the output.
Finish the setup steps to use Analyze URL in Slack.
Run this function with a POST request to Blockspring.
Visit the node.js quickstart to get started fast.
Visit the php quickstart to get started fast.
Visit the python quickstart to get started fast.
Visit the ruby quickstart to get started fast.
Visit the r quickstart to get started fast.
Visit the javascript quickstart to get started fast.
Use this URL for webhooks. You'll want to make a POST request.
curl -H "Content-Type: application/json" -d "{ \"url\": , \"AlgoKey\": }" "https://run.blockspring.com/api_v2/blocks/analyze-url-algorithmia?"
var blockspring = require("blockspring");
blockspring.runParsed("analyze-url-algorithmia", { "url": , AlgoKey: }, function(res) {
console.log(res.params);
});
var request = require("request");
request.post({
url: "https://run.blockspring.com/api_v2/blocks/analyze-url-algorithmia?",
form: { "url": , AlgoKey: }
},
function(err, response, body) {
console.log(JSON.parse(body));
});
<?php
$url = 'https://run.blockspring.com/api_v2/blocks/analyze-url-algorithmia?';
$data = json_encode(array("url" => , "AlgoKey" => ));
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => array("Accept: application/json", "Content-Type: application/json"),
'method' => 'POST',
'content' => $data,
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
var_dump(json_decode($result));
?>
<?php
require('blockspring.php');
var_dump(Blockspring::runParsed("analyze-url-algorithmia", array("url" => , "AlgoKey" => ))->params);
import json
import urllib2
req = urllib2.Request("https://run.blockspring.com/api_v2/blocks/analyze-url-algorithmia?")
req.add_header('Content-Type', 'application/json')
data = { "url": , "AlgoKey": }
results = urllib2.urlopen(req, json.dumps(data)).read()
print json.loads(results)
import blockspring
import json
print blockspring.runParsed("analyze-url-algorithmia", { "url": , "AlgoKey": }).params
require 'rest_client'
response = RestClient.post 'https://run.blockspring.com/api_v2/blocks/analyze-url-algorithmia?', JSON.dump({ "url" => , "AlgoKey" => }), :content_type => :json
puts JSON.load(response)
require 'blockspring'
puts Blockspring.runParsed("analyze-url-algorithmia", { "url" => , "AlgoKey" => } ).params
require 'rest_client'
response = RestClient.post 'https://run.blockspring.com/api_v2/blocks/analyze-url-algorithmia?', JSON.dump({ "url" = , "AlgoKey" = }), :content_type => :json
puts JSON.load(response)
library('blockspring')
library('rjson')
print(blockspringRunParsed("analyze-url-algorithmia", list( "url" = , "AlgoKey" = ))$params)
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://cdn.blockspring.com/blockspring.js"></script>
<script>
blockspring.runParsed("analyze-url-algorithmia", { "url": , AlgoKey: }, { "api_key": "" }, function(res){
console.log(res.params);
})
</script>
https://run.blockspring.com/api_v2/blocks/analyze-url-algorithmia?
Finish the setup steps to use Analyze URL in Code.