Appearance
/import-content
Updates the editor content via API for a given query. Works on any query, not only API-created ones.
You either import raw HTML, or send a URL that NeuronWriter will auto-import and parse content from. One of the two must be provided.
- Method: POST
- Endpoint:
https://app.neuronwriter.com/neuron-api/0.5/writer/import-content
Parameters
| Parameter | Example | Description |
|---|---|---|
query | 32dee2a89374a722 | The ID of your query. |
html | <h1>Best Trail Running Shoes...</h1> | HTML content to import. |
title | Best Trail Running Shoes in 2024 | (Optional) <title> of the article. Overwrites the title found in HTML or imported via URL. |
description | Discover the top trail running shoes... | (Optional) Meta description. Overwrites the one found in HTML or imported via URL. |
url | https://example.com/blog/trail-running-shoes | URL NeuronWriter will try to auto-import and parse content from. |
id | main-content | (Optional) When auto-importing from a URL, the id of the HTML container holding the content. |
class | article-content | (Optional) When auto-importing from a URL, the class of the HTML container holding the content. |
Response
| Key | Example | Description |
|---|---|---|
status | ok | Import status. |
content_score | 25 | The scored content quality after import. |
An error may be provided if the import failed (for example a URL that could not be fetched).
Example (Python)
python
import json, requests
API_ENDPOINT = 'https://app.neuronwriter.com/neuron-api/0.5/writer'
API_KEY = '<your-neuron-api-key>'
headers = {"X-API-KEY": API_KEY, "Accept": "application/json", "Content-Type": "application/json"}
payload = json.dumps({
"query": "f67d0dac14a35a86",
"html": "<h1>Best Trail Running Shoes in 2024: A Complete Guide</h1><p>As a trail runner, choosing the right pair...</p>",
"title": "Best Trail Running Shoes in 2024: A Complete Guide",
"description": "Discover the top trail running shoes of 2024, including models from Altra, Hoka, Nike, and more.",
})
response = requests.post(API_ENDPOINT + "/import-content", headers=headers, data=payload)
print(response.json())
# {"status": "ok", "content_score": 25}