Multi-cluster content generation
Request samples
Python
Node.js
import requests
api_host = "https://api.seocontent.ai"
api_key = "your_api_key"
if not api_key:
raise ValueError("Missing SEOCONTENT AI API key.")
project_title = "api_mc3"
counts = {
"primary_count": 1000,
"secondary_count": 1000,
}
additional = {
"seo_title": True,
"seo_meta": True,
"seo_faq": True,
"seo_tagline": True,
"seo_contact": True,
"negative_words": ["facility"],
"find_and_replace": {"facility": "services"},
"phrase_blocking": [
"Facilities",
"Rent",
"Pays",
"Religion",
"Health conditions",
],
"tone": "Default",
"featured_image": True,
"h2_images": True,
}
img_generation = "Realistic Vision v2.0"
interlinking = True
content_language = "English"
content_type = "multi_cluster"
keywords = [
"what is assisted living",
"how much does assisted living cost",
# ... Add more keywords if needed
]
data = {
"keywords": keywords,
"project_title": project_title,
"counts": counts,
"additional": additional,
"content_type": content_type,
"content_language": content_language,
"img_generation": img_generation,
"interlinking": interlinking,
"interlinking_type": "infinte_interlinking",
"clustersize": 3,
}
headers = {
"Content-Type": "application/json",
"x-api-key": api_key,
}
response = requests.post(
f"{api_host}/v1/content-generator/",
json=data,
headers=headers
)
print("Response:", response.text) # Log the response data
print(response.status_code)
const axios = require("axios");
const apiHost = process.env.API_HOST || "https://api.seocontent.ai";
const apiKey = "your_api_key";
if (!apiKey) throw new Error("Missing SEOCONTENT AI API key.");
const requestConfig = {
headers: {
"Content-Type": "application/json",
"x-api-key": apiKey,
},
};
const generateContent = async () => {
try {
const response = await axios.post(
`${apiHost}/v1/content-generator/`,
data,
requestConfig
);
if (response.status !== 200) {
throw new Error(`Non-200 response: ${response.statusText}`);
}
return response.data; // Return the response data
} catch (error) {
throw new Error(`Error generating content: ${error.message}`);
}
};
const project_title = "api_mc2";
const counts = {
primary_count: 1000,
secondary_count: 1000,
};
const additional = {
seo_title: true,
seo_meta: true,
seo_faq: true,
seo_tagline: true,
seo_contact: true,
negative_words: ["facility"],
find_and_replace: { facility: "services" },
phrase_blocking: [
"Facilities",
"Rent",
"Pays",
"Religion",
"Health conditions",
],
tone: "Default",
featured_image: true,
h2_images: true,
};
const img_generation = "Realistic Vision v2.0";
const interlinking = true;
const content_language = "English";
const content_type = "multi_cluster";
const keywords = [
"what is assisted living",
"how much does assisted living cost",
// ... Add more keywords if needed
];
const data = {
keywords: keywords,
project_title: project_title,
counts: counts,
additional: additional,
content_type: content_type,
content_language: content_language,
img_generation: img_generation,
interlinking: interlinking,
interlinking_type: "infinte_interlinking",
clustersize: 3,
};
// Usage example:
(async () => {
try {
const responseJSON = await generateContent();
console.log("Response:", responseJSON); // Log the response data
console.log("Your Content will be generated");
} catch (error) {
console.error("Error:", error.message);
}
})();
AUTHORIZATIONS: SEOCONTENT_API_KEY
HEADER PARAMETERS:
- Content-Type: application/json
- x-api-key: Your API key
BODY PARAMETERS:
project_title
(string)- The title of the project, e.g., “api_mc3”.
counts
(object)- An object containing the primary and secondary counts:
primary_count
: (integer) The primary count value, e.g., 1000.secondary_count
: (integer) The secondary count value, e.g., 1000.
- An object containing the primary and secondary counts:
additional
(object) : An object containing additional Seo-related parameters:- seo_title: (boolean) Include SEO title.
- seo_meta: (boolean) Include SEO meta tags.
- seo_faq: (boolean) Include SEO FAQ.
- seo_tagline: (boolean) Include SEO tagline.
- seo_contact: (boolean) Include SEO contact information.
- negative_words: (array of strings) List of negative words, e.g., [“facility”].
- find_and_replace: (object) Find and replace specific words, e.g., {“facility”: “services”}.
- phrase_blocking: (array of strings) List of phrases to block.
- tone: (string) Tone of the content, e.g., “Default”.
- featured_image: (boolean) Include a featured image.
- h2_images: (boolean) Include H2 images.
img_generation
(string)- Image generation type, e.g., “Realistic Vision v2.0”.
interlinking
(boolean)- Enable or disable interlinking.
content_language
(string)- Language of the content, e.g., “English”.
content_type
(string)- Type of content, e.g., “multi_cluster”.
keywords
(array of strings)- List of keywords for the content.
interlinking_type
(string)- Type of interlinking, e.g., “infinte_interlinking”.
clustersize
(integer)- Size of the cluster, e.g. 3.
Notes:
- Ensure that the
api_key
is correctly set. - Customize the parameters according to your specific requirements.