Keyword API Documentation
The Keyword API is designed to support autocomplete features by returning matching keywords as the user types. It's useful for implementing dynamic search suggestions.
API Overview
Endpoint URL
https://api.crediblemind.com/keyword
Method
GET
Authentication
Requests to the Keyword API require a valid API key provided in the request header:
💡
Ask your client success representative for your API key
GET /keyword HTTP/1.1
Host: api.crediblemind.com
x-api-key: YOUR_API_KEY
Request Parameters
Required Parameters
brand
: A unique identifier for each CredibleMind client.q
: The query string as typed by the user.
Optional Parameters
subbrand
: Additional identifier used when applicable.lang
: The language of the query, used for localization of search results.
Example Request
curl -X GET "https://api.crediblemind.com/keyword?brand=benovo&subbrand=acme&q=anx&lang=en" \
-H "x-api-key: YOUR_API_KEY"
Response Format
The response will be in JSON format, structured as follows:
{
"numResults": 5,
"results": [
{
"title": "Anxiety",
"path": "topics/anxiety"
},
{
"title": "Anxiety in Teens",
"path": "topics/anxiety-in-teens"
}
]
}
Response Definitions
numResults
(int): The total number of results for the search.results
(array): An array of all results, in order of relevance. Each entry contains:title
(string): The result name or title.path
(string, optional): A URL path for the result, to be programmatically appended to the CredibleMind content source URL.
Success Response
- Code: 200 OK
- Content:
{
"numResults": 5,
"results": [
{
"title": "keyword1",
"path": "path1"
},
{
"title": "keyword2",
"path": "path2"
}
]
}
Error Response
- Code: 401 Unauthorized
- Content:
{
"error": "Invalid API Key"
}