Blog
Writing blog
info
- URL:
/third-part/blog/v2
- Method:
POST
Request
-
Authorization: API Key
Add parameter in header
X-LP-TOKEN
Example:
X-LP-TOKEN: xxxxxxxx
-
Body Params
site_id
: string | required- Site ID
is_publish
: boolean | optional | Default Value: false- Whether to publish
author_id
: string | optional- author id
version
: string | optional | Default Value: 2- Blog Engine Version. It is recommended to set it to
latest
- Support Value :
2
,3
,4
,5
,latest
- Blog Engine Version. It is recommended to set it to
config
: object | required- Configuration options
- Internal parameters:
sitemap
: string | optional- If you fill in the sitemap, QuickCreator will find links to 1-5 related articles and add them to the end of the article.
is_start_external_hyperlink
: boolean | optional | Default Value: true- Whether to automatically add external links in the article
is_start_internal_hyperlink
: boolean | optional | Default Value: true- Whether to automatically add internal links in the article
internal_hyperlink_domain
: string | optional- Domain from which internal links are sourced.
- Support link or domain. eg:
https://xxxxxx.io/blog
orxxxxxxxx.io
is_add_main_image
: boolean | optional | Default Value: true- Whether to automatically add a cover image in the article
is_add_h2_images
: boolean | optional | Default Value: true- Whether to automatically add 1-2 h2 section level images in the article
params
: object | required- Parameters
- Internal parameters:
input_type
: string | required- Type of input text
- Support Value
Keyword
: Write a blog post based on the target primary keywordTopic
: Write a blog post based on the target TopicTitle
: Write a blog post titled with the target Title
p_input
: string | required- Corresponds to the type of input.
- Eg: If
input_type
=Keyword
,p_input
should be the target primary keyword.
target_blog_word_count
: string | optional- Around range of words for the generated article
- Support Value :
800-1000
,1000-2000
,2000-3000
language_id
: string | optional | Default Value: en- Language for generated article, represented by i18n code
- Support Value : See the list below for details
is_add_keyword_frequency
: boolean | optional | Default Value: false- Whether to automatically add related keywords except the primary keyword
is_add_evidence
: boolean | optional | Default Value: true- Whether to automatically add real-time evidence and facts to support writing
additional_knowledge
: string | optional- Additional supplementary knowledge, such as an introduction to your brand or product.
additional_title_prompt
: string | optional- Additional requirements for generating the blog title(H1)
additional_outline_prompt
: string | optional- Additional requirements for generating the outline
additional_section_prompt
: string | optional-
Additional requirements for generating the article content
-
Language ID | Language |
---|---|
en | English |
zh-CN | Chinese (Simplified) |
zh-TW | Chinese (Traditional) |
de | German |
es | Spanish |
fr | French |
it | Italian |
pt-PT | Portuguese (Portugal) |
pt-BR | Portuguese (Brazil) |
nl | Dutch |
pl | Polish |
vi | Vietnamese |
hi | Hindi |
id | Indonesian |
ar | Arabic |
ru | Russian |
ja | Japanese |
tr | Turkish |
th | Thai |
el | Greek |
da | Danish |
cs | Czech |
bg | Bulgarian |
ko | Korean |
hu | Hungarian |
lt | Lithuanian |
ms | Malay |
no | Norwegian |
ro | Romanian |
sv | Swedish |
bo | Tibetan |
Example
{
"site_id": "xxxxxxxxxxxx",
"is_publish": true,
"config": {
"sitemap": "https://xxxxxx/sitemap.xml",
"is_start_external_hyperlink": true,
"is_start_internal_hyperlink": true,
"internal_hyperlink_domain": "xxxxxxx.io",
"is_add_main_image": true,
"is_add_h2_images": true
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": true
}
}
- Sample code
- Shell
- Java
- Golang
- Python
- HTTP
curl --location --request POST '/third-part/blog/v2' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--data-raw '{
"site_id": "xxxxxxxxxxxx",
"is_publish": true,
"config": {
"sitemap": "https://xxxxxxxx/sitemap.xml",
"is_start_external_hyperlink": true,
"is_start_internal_hyperlink": true,
"internal_hyperlink_domain": "xxxxxx.io",
"is_add_main_image": true,
"is_add_h2_images": true
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": true
}
}'
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("/third-part/blog/v2")
.header("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"xxxxxxxxxxxx\",\n \"is_publish\": true,\n \"config\": {\n \"sitemap\": \"https://xxxxxx/sitemap.xml\",\n \"is_start_external_hyperlink\": true,\n \"is_start_internal_hyperlink\": true,\n \"internal_hyperlink_domain\": \"xxxxxxx.io\",\n \"is_add_main_image\": true,\n \"is_add_h2_images\": true\n },\n \"params\": {\n \"input_type\": \"Keyword\",\n \"p_input\": \"best ai writing tools\",\n \"language_id\": \"en\",\n \"target_blog_word_count\": \"800-1000\",\n \"is_add_evidence\": true\n }\n}")
.asString();
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "/third-part/blog/v2"
method := "POST"
payload := strings.NewReader(`{
"site_id": "xxxxxxxxxxxx",
"is_publish": true,
"config": {
"sitemap": "https://xxxxxxx/sitemap.xml",
"is_start_external_hyperlink": true,
"is_start_internal_hyperlink": true,
"internal_hyperlink_domain": "xxxxxxx.io",
"is_add_main_image": true,
"is_add_h2_images": true
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": true
}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import http.client
import json
conn = http.client.HTTPSConnection("")
payload = json.dumps({
"site_id": "xxxxxxxxxxxx",
"is_publish": True,
"config": {
"sitemap": "https://xxxxxxxx/sitemap.xml",
"is_start_external_hyperlink": True,
"is_start_internal_hyperlink": True,
"internal_hyperlink_domain": "xxxxxxx.io",
"is_add_main_image": True,
"is_add_h2_images": True
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": True
}
})
headers = {
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
'Content-Type': 'application/json'
}
conn.request("POST", "/third-part/blog/v2", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
POST /third-part/blog/v2 HTTP/1.1
Host:
User-Agent: Apifox/1.0.0 (https://apifox.com)
Content-Type: application/json
Content-Length: 613
{
"site_id": "xxxxxxxxxxxx",
"is_publish": true,
"config": {
"sitemap": "https://xxxxxxxx/sitemap.xml",
"is_start_external_hyperlink": true,
"is_start_internal_hyperlink": true,
"internal_hyperlink_domain": "xxxxxxxxx.io",
"is_add_main_image": true,
"is_add_h2_images": true
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": true
}
}
Responses
- Status
HTTP Status Code | Content Type |
---|---|
200 | JSON |
- Example
{
"code": "200",
"body": {
"blogId": "xxdoewreo",
"jobId": "xxx230203200"
}
}
Getting Blog
info
- URL:
/third-part/blog/v2/{blogId}
- Method:
GET
Request
-
Authorization: API Key
Add parameter in header
X-LP-TOKEN
Example:
X-LP-TOKEN: xxxxxxxxx
-
Path Params
Name Location Type Required Description blogId path string yes Unique identifier of the blog returned by the blog interface -
Sample code
- Shell
- Java
- Golang
- Python
- HTTP
curl --location --request GET '/third-part/blog/v2/' --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/third-part/blog/v2/")
.method("GET", body)
.addHeader("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
.build();
Response response = client.newCall(request).execute();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "/third-part/blog/v2/"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import http.client
conn = http.client.HTTPSConnection("")
payload = ''
headers = {
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)'
}
conn.request("GET", "/third-part/blog/v2/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
GET /third-part/blog/v2/ HTTP/1.1
Host:
User-Agent: Apifox/1.0.0 (https://apifox.com)
Responses
- Status
HTTP Status Code | Content Type |
---|---|
200 | JSON |
- Example
{
"status": "string",
"content": {
"markdown": "string",
"slug": "string",
"seo": {
"title": "string",
"description": "string",
"keywords": "string",
"feature_image": "string"
}
}
}