Docs / Quotes Data API / Endpoints / Retrieve an author
Retrieve an author
Not served yet. Intended to return one author with a count of their quotations.
Parameters
| Parameter | Type | Description |
|---|---|---|
id required |
string | Author slug or id. |
Request
curl https://api.softon.dev/v1/authors/marcus-aurelius \
-H "Authorization: Bearer $SOFTON_KEY"
req, _ := http.NewRequestWithContext(ctx, "GET", "https://api.softon.dev/v1/authors/marcus-aurelius", nil) req.Header.Set("Authorization", "Bearer "+os.Getenv("SOFTON_KEY")) res, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer res.Body.Close() var page struct { Data Author `json:"data"` Meta struct{ Next *string `json:"next"` } `json:"meta"` } if err := json.NewDecoder(res.Body).Decode(&page); err != nil { log.Fatal(err) }
import json, os, urllib.parse, urllib.request url = "https://api.softon.dev/v1/authors/marcus-aurelius" req = urllib.request.Request(url, headers={ "Authorization": "Bearer " + os.environ["SOFTON_KEY"], }) page = json.load(urllib.request.urlopen(req)) # page["data"] is the object; page["error"] is None on success
const url = new URL("https://api.softon.dev/v1/authors/marcus-aurelius"); const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.SOFTON_KEY}` }, }); if (!res.ok) throw new Error(`${res.status} ${await res.text()}`); const { data, meta } = await res.json();
Response
The envelope is identical on every softon.dev API: data, meta, error. Only the shape inside data changes per dataset — see the response envelope.
Nothing to show yet: this route answers 404 today, and there is no collected data to draw a sample from. When the first source lands, the example and the field table below are generated from the API's own published schema rather than written here.
Try it
Send the request to see a response.