Tumblr blog and latest posts
A public Tumblr blog: name, title, description, avatar, header image, top tags, creation date, and its latest posts (about 10-20). Pass next_cursor back as cursor for older posts (those come from the blog's own pages and carry id, link, date, summary, text, images and tags, without note counts). Each post: id, link and short link, date, type, summary, text, images, videos, links, audio, tags, notes, likes, reblogs, replies, NSFW flag and the reblog trail. Optional filters: tag reads the blog's own tag page; type, before, after and limit narrow the posts returned. Each post also has reblog_trail (each earlier post in the reblog chain with blog, post id, link, date, text and media), reblogged_from_post and reblogged_root (blog, post id, link).
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
blog | string | Blog name (e.g. staff) or blog link. Example: staff |
url | string | A blog link (tumblr.com/<name> or <name>.tumblr.com), instead of blog. |
cursor | string | Pass next_cursor from the previous response for older posts (null when there are no more). |
tag | string | Only the blog's posts with this tag (not with cursor). |
type | text | photo | video | quote | link | audio | chat | answer | Only posts of this type. |
before | string | Only posts before this time (YYYY-MM-DD, ISO time or unix time). |
after | string | Only posts at or after this time (YYYY-MM-DD, ISO time or unix time). |
limit | integer | At most this many posts (1-50). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/tumblr/v1/blog?blog=staff" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/tumblr/v1/blog",
params={"blog": "staff"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/tumblr/v1/blog");
url.searchParams.set("blog", "staff");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).