Get Recommendations

No algorithm description given

This algorithm provides page recommendations for a domain. It is primarily geared for use with the Algorithmia recommendation system , which provides more specificity, but can be used independently of this as well. It takes as input a url and a required string. Only urls whose source contains the required string will be considered as recommendations. Note that the page source itself is inspected, not just the user-readable text. Examples include long UUIDs embedded in the page's java script, or simply the empty string "" to consider every page. Get Recommendations maintains a permanent algorithm collection (see the documentation ). When a url is sent to it, it checks to see if any url from the same domain has ever been sent. If not, the domain is explored, for 200 urls or 2 minutes, whichever comes first, using  /web/BreadthFirstSiteMap  and filtering for urls containing the required string. These urls are processed into recommendations as described below. It also takes an optional third integer parameter, which dictates how many months in the past (relative to a given page) will be considered for recommendation. For example, if the parameter is 24, no page that is more than 24 months older than a given page will be recommended. Note however that recommendations are always being updated as new pages are added, and for any given page, anything published more recently than it is eligible as a recommendation assuming some nonzero similarity. If this parameter is not supplied or is equal to -1, all pages will be considered. For each explored domain, the algorithm maintains a word count summary for each url and for the domain as a whole. For every new url in an existing domain, it scrapes the url for content using /web/AnalyzeURL , processes this into word statistics, and generates keywords for each url using   /nlp/KeywordsForDocumentSet , and generates recommendations from these keywords using  /nlp/KeywordSetSimilarity .  All recommendations are stored in a table, and any time the algorithm is queried with a url that is in this table, it returns the corresponding recommendations. Thus, the first call to a domain takes a few minutes and a call with a novel url takes up to a few seconds, but any subsequent call with a url returns very quickly.

(no tags)

Cost Breakdown

2 cr
royalty per call
1 cr
usage per second
avg duration
This algorithm has permission to call other algorithms which may incur separate royalty and usage costs.

Cost Calculator

API call duration (sec)
API calls
Estimated cost
per calls
for large volume discounts
For additional details on how pricing works, see Algorithmia pricing.

Internet access

This algorithm has Internet access. This is necessary for algorithms that rely on external services, however it also implies that this algorithm is able to send your input data outside of the Algorithmia platform.

Calls other algorithms

This algorithm has permission to call other algorithms. This allows an algorithm to compose sophisticated functionality using other algorithms as building blocks, however it also carries the potential of incurring additional royalty and usage costs from any algorithm that it calls.

To understand more about how algorithm permissions work, see the permissions documentation.

1. Type your input

2. See the result

Running algorithm...

3. Use this algorithm

curl -X POST -d '{{input | formatInput:"curl"}}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY'
View cURL Docs
algo auth
algo run algo://web/GetRecommendations/0.4.68 -d '{{input | formatInput:"cli"}}'
View CLI Docs
import (
  algorithmia ""

input := {{input | formatInput:"go"}}

var client = algorithmia.NewClient("YOUR_API_KEY", "")
algo, _ := client.Algo("algo://web/GetRecommendations/0.4.68")
resp, _ := algo.Pipe(input)
response := resp.(*algorithmia.AlgoResponse)
View Go Docs
import com.algorithmia.*;
import com.algorithmia.algo.*;

String input = "{{input | formatInput:"java"}}";
AlgorithmiaClient client = Algorithmia.client("YOUR_API_KEY");
Algorithm algo = client.algo("algo://web/GetRecommendations/0.4.68");
AlgoResponse result = algo.pipeJson(input);
View Java Docs
import com.algorithmia._
import com.algorithmia.algo._

val input = {{input | formatInput:"scala"}}
val client = Algorithmia.client("YOUR_API_KEY")
val algo = client.algo("algo://web/GetRecommendations/0.4.68")
val result = algo.pipeJson(input)
View Scala Docs
var input = {{input | formatInput:"javascript"}};
           .then(function(output) {
View Javascript Docs
using Algorithmia;

var input = "{{input | formatInput:"cs"}}";
var client = new Client("YOUR_API_KEY");
var algorithm = client.algo("algo://web/GetRecommendations/0.4.68");
var response = algorithm.pipe<object>(input);
View .NET/C# Docs
var input = {{input | formatInput:"javascript"}};
           .then(function(response) {
View NodeJS Docs
import Algorithmia

input = {{input | formatInput:"python"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('web/GetRecommendations/0.4.68')
print algo.pipe(input)
View Python Docs

input <- {{input | formatInput:"r"}}
client <- getAlgorithmiaClient("YOUR_API_KEY")
algo <- client$algo("web/GetRecommendations/0.4.68")
result <- algo$pipe(input)$result
View R Docs
require 'algorithmia'

input = {{input | formatInput:"ruby"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('web/GetRecommendations/0.4.68')
puts algo.pipe(input).result
View Ruby Docs
use algorithmia::Algorithmia;

let input = {{input | formatInput:"rust"}};
let client = Algorithmia::client("YOUR_API_KEY");
let algo = client.algo("web/GetRecommendations/0.4.68");
let response = algo.pipe(input);
View Rust Docs
import Algorithmia

let input = "{{input | formatInput:"swift"}}";
let client = Algorithmia.client(simpleKey: "YOUR_API_KEY")
let algo = client.algo(algoUri: "web/GetRecommendations/0.4.68") { resp, error in
View Swift Docs
  • {{comment.username}}