Skip to content

/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

ParameterExampleDescription
query32dee2a89374a722The ID of your query.
html<h1>Best Trail Running Shoes...</h1>HTML content to import.
titleBest Trail Running Shoes in 2024(Optional) <title> of the article. Overwrites the title found in HTML or imported via URL.
descriptionDiscover the top trail running shoes...(Optional) Meta description. Overwrites the one found in HTML or imported via URL.
urlhttps://example.com/blog/trail-running-shoesURL NeuronWriter will try to auto-import and parse content from.
idmain-content(Optional) When auto-importing from a URL, the id of the HTML container holding the content.
classarticle-content(Optional) When auto-importing from a URL, the class of the HTML container holding the content.

Response

KeyExampleDescription
statusokImport status.
content_score25The 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}