{
"openapi": "3.1.0",
"info": {
"title": "Dappier AI Recommendations API",
"description": "Provides AI-powered content recommendations based on structured data models. Returns a list of articles with titles, summaries, images, and source URLs.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.dappier.com",
"description": "Dappier AI API Server"
}
],
"paths": {
"/app/datamodel/{datamodel_id}": {
"post": {
"operationId": "getRecommendations",
"summary": "Fetch AI-powered recommendations",
"description": "Retrieves AI-powered recommendations based on structured data models. The response includes articles with metadata such as title, author, publication date, source, and relevance score.",
"parameters": [
{
"name": "datamodel_id",
"in": "path",
"required": true,
"description": "The unique ID of the data model to use for recommendations. Each ID starts with 'dm_'.\n\nAvailable Data Models include:\n- Sports News: Covers real-time updates from top sports sources.\n- Lifestyle News: Offers lifestyle trends and analysis.\n- iHeartDogs & iHeartCats AI: Provides expert pet care insights.\n- GreenMonster: Focuses on eco-conscious living.\n- WISH-TV AI: Covers a variety of news categories.\n\nDefaults to 'dm_01j0pb465keqmatq9k83dthx34'. Full list at: https://marketplace.dappier.com/marketplace",
"schema": {
"type": "string",
"enum": [
"dm_01j0pb465keqmatq9k83dthx34",
"dm_01j0q82s4bfjmsqkhs3ywm3x6y",
"dm_01j1sz8t3qe6v9g8ad102kvmqn",
"dm_01j1sza0h7ekhaecys2p3y0vmj",
"dm_01j5xy9w5sf49bm6b1prm80m27",
"dm_01jagy9nqaeer9hxx8z1sk1jx6"
]
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The user-provided input string for AI recommendations across multiple domains."
},
"similarity_top_k": {
"type": "integer",
"default": 9,
"description": "The number of top articles to retrieve based on similarity."
},
"ref": {
"type": "string",
"nullable": true,
"description": "The site domain where AI recommendations should be prioritized."
},
"num_articles_ref": {
"type": "integer",
"default": 0,
"description": "The minimum number of articles to return from the specified reference domain (`ref`)."
},
"search_algorithm": {
"type": "string",
"enum": [
"most_recent",
"semantic",
"most_recent_semantic",
"trending"
],
"default": "most_recent",
"description": "The search algorithm to use for retrieving articles."
}
},
"required": ["query"]
}
}
}
},
"responses": {
"200": {
"description": "A list of recommended articles.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the article."
},
"author": {
"type": "string",
"description": "The author of the article."
},
"published_on": {
"type": "string",
"format": "date-time",
"description": "The publication date of the article."
},
"source": {
"type": "string",
"description": "The name of the source website."
},
"source_domain": {
"type": "string",
"description": "The domain of the source website."
},
"url": {
"type": "string",
"format": "uri",
"description": "The full URL of the article."
},
"image_url": {
"type": "string",
"format": "uri",
"description": "The thumbnail image URL of the article."
},
"summary": {
"type": "string",
"description": "A brief summary of the article."
},
"score": {
"type": "number",
"description": "The relevance score of the article."
}
}
}
}
}
}
},
"400": {
"description": "Invalid request parameters."
},
"404": {
"description": "Data model not found."
}
}
}
}
}
}