Appearance
/get-content
Retrieves the last content revision saved for a given query. Works on any query, not only API-created ones. You can choose between manually saved revisions (default) or all revisions including autosaves.
- Method: POST
- Endpoint:
https://app.neuronwriter.com/neuron-api/0.5/writer/get-content
Parameters
| Parameter | Example | Description |
|---|---|---|
query | 32dee2a89374a722 | The ID of your query. |
revision_type | all | Whether autosave revisions should be considered. Default is manual revisions only. |
Response
| Key | Description |
|---|---|
content | Content in HTML format. |
title | Title. |
description | Meta description. |
created | Revision date. |
type | Revision type (manual or autosave). |
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": "79ca6b6b45fb9d67"})
response = requests.post(API_ENDPOINT + "/get-content", headers=headers, data=payload)
r = response.json()
print("Title:", r['title'])
print("Description:", r['description'])
print("HTML content:", r['content'])