Get AI Article Recommendations
curl --request POST \
--url https://api.dappier.com/app/v2/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"similarity_top_k": 9,
"ref": "<string>",
"num_articles_ref": 0,
"page": 1,
"num_results": 10
}
'import requests
url = "https://api.dappier.com/app/v2/search"
payload = {
"query": "<string>",
"similarity_top_k": 9,
"ref": "<string>",
"num_articles_ref": 0,
"page": 1,
"num_results": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
similarity_top_k: 9,
ref: '<string>',
num_articles_ref: 0,
page: 1,
num_results: 10
})
};
fetch('https://api.dappier.com/app/v2/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dappier.com/app/v2/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'similarity_top_k' => 9,
'ref' => '<string>',
'num_articles_ref' => 0,
'page' => 1,
'num_results' => 10
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dappier.com/app/v2/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"similarity_top_k\": 9,\n \"ref\": \"<string>\",\n \"num_articles_ref\": 0,\n \"page\": 1,\n \"num_results\": 10\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dappier.com/app/v2/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"similarity_top_k\": 9,\n \"ref\": \"<string>\",\n \"num_articles_ref\": 0,\n \"page\": 1,\n \"num_results\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dappier.com/app/v2/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"similarity_top_k\": 9,\n \"ref\": \"<string>\",\n \"num_articles_ref\": 0,\n \"page\": 1,\n \"num_results\": 10\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"response": {
"query": "<string>",
"results": [
{
"author": "<string>",
"image_url": "<string>",
"preview_content": "<string>",
"pubdate": "<string>",
"pubdate_unix": 123,
"score": 123,
"site": "<string>",
"site_domain": "<string>",
"source_url": "<string>",
"summary": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"message": "<string>"
}
}Publisher APIs
AI Recommendations API
Retrieve articles based on queries or URLs, powered by semantic search.
POST
/
app
/
v2
/
search
Get AI Article Recommendations
curl --request POST \
--url https://api.dappier.com/app/v2/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"similarity_top_k": 9,
"ref": "<string>",
"num_articles_ref": 0,
"page": 1,
"num_results": 10
}
'import requests
url = "https://api.dappier.com/app/v2/search"
payload = {
"query": "<string>",
"similarity_top_k": 9,
"ref": "<string>",
"num_articles_ref": 0,
"page": 1,
"num_results": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
similarity_top_k: 9,
ref: '<string>',
num_articles_ref: 0,
page: 1,
num_results: 10
})
};
fetch('https://api.dappier.com/app/v2/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dappier.com/app/v2/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'similarity_top_k' => 9,
'ref' => '<string>',
'num_articles_ref' => 0,
'page' => 1,
'num_results' => 10
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dappier.com/app/v2/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"similarity_top_k\": 9,\n \"ref\": \"<string>\",\n \"num_articles_ref\": 0,\n \"page\": 1,\n \"num_results\": 10\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dappier.com/app/v2/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"similarity_top_k\": 9,\n \"ref\": \"<string>\",\n \"num_articles_ref\": 0,\n \"page\": 1,\n \"num_results\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dappier.com/app/v2/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"similarity_top_k\": 9,\n \"ref\": \"<string>\",\n \"num_articles_ref\": 0,\n \"page\": 1,\n \"num_results\": 10\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"response": {
"query": "<string>",
"results": [
{
"author": "<string>",
"image_url": "<string>",
"preview_content": "<string>",
"pubdate": "<string>",
"pubdate_unix": 123,
"score": 123,
"site": "<string>",
"site_domain": "<string>",
"source_url": "<string>",
"summary": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"message": "<string>"
}
}Authorizations
Bearer token authentication using your Dappier API key. Get your API key at https://platform.dappier.com/profile/api-keys.
Query Parameters
Data model ID, starting with dm_. Browse and find data models in the Dappier Marketplace.
Body
application/json
The search algorithm for retrieving articles.
most_recent: Retrieves the most recent articles by publication date. semantic (default): Retrieves contextually relevant articles based on the query or the page content from the provided URL. most_recent_semantic: Performs semantic search and retrieves the most recent articles by publication date. trending: Performs a trending search and retrieves the most relevant articles to trending keywords in the past 24 hours.
Available options:
most_recent, semantic, most_recent_semantic, trending 
