### Example Request for Getting Post Notes Source: https://www.tumblr.com/docs/en/api/v2_language=tr_TR An example of an HTTP GET request to fetch all notes for a specific post, including a timestamp for pagination. ```HTTP GET https://api.tumblr.com/v2/blog/YOUR-BLOG.tumblr.com/notes?id=1234567890000&mode=all&before_timestamp=1234567890 ``` -------------------------------- ### Retrieve Queued Posts - GET Request Example Source: https://www.tumblr.com/docs/en/api/v2_language=fr_FR This example shows how to retrieve a list of queued posts for a specified blog using a GET request. It includes common query parameters like 'offset', 'limit', and 'filter' for pagination and content formatting. ```http GET https://api.tumblr.com/v2/blog/{blog-identifier}/posts/queue?offset=0&limit=20&filter=text ``` -------------------------------- ### Retrieve Draft Posts - GET Request Example Source: https://www.tumblr.com/docs/en/api/v2_language=fr_FR This example shows how to retrieve draft posts for a specified blog using a GET request. It includes optional parameters like 'before_id' for pagination and 'filter' to specify the desired post format. ```http GET https://api.tumblr.com/v2/blog/{blog-identifier}/posts/draft?before_id=12345&filter=raw ``` -------------------------------- ### Retrieve Submission Posts - GET Request Example (cURL) Source: https://www.tumblr.com/docs/en/api/v2_language=en_US This example demonstrates how to retrieve submission posts for a blog using a GET request. It requires the blog identifier and OAuth authentication. No specific query parameters are detailed in the documentation for this endpoint. ```bash curl -X GET "https://api.tumblr.com/v2/blog/{blog-identifier}/posts/submission" \ -H "Authorization: OAuth {your_oauth_token}" ``` -------------------------------- ### Retrieve Queued Posts - GET Request Example (cURL) Source: https://www.tumblr.com/docs/en/api/v2_language=en_US This example demonstrates how to retrieve a list of queued posts for a specific blog using a GET request. It includes the base URI and common query parameters like offset, limit, and filter. Authentication is required via OAuth. ```bash curl -X GET "https://api.tumblr.com/v2/blog/{blog-identifier}/posts/queue?offset=0&limit=20&filter=text" \ -H "Authorization: OAuth {your_oauth_token}" ``` -------------------------------- ### Retrieve Draft Posts - GET Request Example (cURL) Source: https://www.tumblr.com/docs/en/api/v2_language=en_US This example shows how to retrieve draft posts for a blog using a GET request. It supports pagination via the `before_id` parameter and filtering by format using the `filter` parameter. OAuth authentication is required. ```bash curl -X GET "https://api.tumblr.com/v2/blog/{blog-identifier}/posts/draft?before_id=12345&filter=raw" \ -H "Authorization: OAuth {your_oauth_token}" ``` -------------------------------- ### Check If Followed By Blog (GET Request Example) Source: https://www.tumblr.com/docs/en/api/v2_language=nl_NL This example demonstrates how to make a GET request to the `/followed_by` endpoint to check if a specific blog is following your blog. It requires the blog identifier and a query parameter specifying the name of the blog to check. Authentication is handled via OAuth. ```http GET https://api.tumblr.com/v2/blog/YOUR-BLOG.tumblr.com/followed_by?query=staff ``` -------------------------------- ### Tumblr API GET Request Examples for /posts Source: https://www.tumblr.com/docs/en/api/v2_language=tr_TR These examples illustrate various ways to retrieve published posts from a Tumblr blog using the `/posts` endpoint. They show how to filter posts by type (e.g., text, photo), include additional information like notes, and filter by tags or timestamps. ```http https://api.tumblr.com/v2/blog/peacecorps.tumblr.com/posts/text?notes_info=true ``` ```http https://api.tumblr.com/v2/blog/pitchersandpoets.tumblr.com/posts/photo?tag=new+york+yankees ``` ```http https://api.tumblr.com/v2/blog/staff.tumblr.com/posts?before=1496289599 ``` -------------------------------- ### GET /v2/blog/{blog-identifier}/posts?id={post-id} Source: https://www.tumblr.com/docs/en/api/v2 Retrieves a specific post by its ID. This example shows how to get an 'answer' type post and its associated fields. ```APIDOC ## GET /v2/blog/{blog-identifier}/posts?id={post-id} ### Description Retrieves a specific post by its ID. This endpoint can be used to fetch various post types, including 'answer' posts. ### Method GET ### Endpoint `https://api.tumblr.com/v2/blog/{blog-identifier}/posts?id={post-id}&api_key={key}` ### Query Parameters - **id** (Number) - Required - The ID of the post to retrieve. - **api_key** (String) - Required - Your Tumblr API key. ### Response #### Success Response (200) - **asking_name** (String) - The blog that sent this ask, or answered it if it was privately answered. - **asking_url** (String) - The blog URL that sent this ask, or answered it if it was privately answered. - **question** (String) - The question being asked. - **answer** (String) - The answer given. #### Response Example ```json { "meta": { "status": 200, "msg": "OK" }, "response": { "blog": { ... }, "posts": [ { "blog_name": "david", "id": 7504154594, "id_string": "7504154594", "post_url": "https://www.davidslog.com/7504154594", "type": "answer", "date": "2011-07-11 20:24:14 GMT", "timestamp": 1310415854, "format": "html", "reblog_key": "HNvqLd5G", "tags": [], "asking_name": "aperfectfacade", "asking_url": "https://aperfectfacade.tumblr.com/", "question": "I thought Tumblr started in 2007, yet you have posts from 2006?", "answer": "

Good catch! Tumblr launched in February 2007. We were testing it for a few months before then.

\n

Tumblr Trivia: Before Tumblr, my blog (davidslog.com) was a manually edited, single page, HTML tumblelog.

" } ], "total_posts": 1 } } ``` ``` -------------------------------- ### Shuffle Queued Posts - POST Request Example (cURL) Source: https://www.tumblr.com/docs/en/api/v2_language=en_US This example illustrates how to randomly shuffle the queued posts for a blog using a POST request. It only requires the blog identifier and OAuth authentication. No request body parameters are needed. ```bash curl -X POST "https://api.tumblr.com/v2/blog/{blog-identifier}/posts/queue/shuffle" \ -H "Authorization: OAuth {your_oauth_token}" ``` -------------------------------- ### Retrieve Submission Posts API Call (GET) Source: https://www.tumblr.com/docs/en/api/v2_language=ja_JP This example shows how to make a GET request to the Tumblr API to retrieve submission posts for a given blog. Authentication is required. ```http GET https://api.tumblr.com/v2/blog/{blog-identifier}/posts/submission HTTP/1.1 Host: api.tumblr.com Authorization: OAuth {your_consumer_key} ``` -------------------------------- ### Example Response for Retrieving Blocks Source: https://www.tumblr.com/docs/en/api/v2_language=de_DE An example JSON response when successfully retrieving a list of blocked blogs. Includes metadata and the list of blocked tumblelogs with their details. ```JSON { "meta": { "status": 200, "msg": "OK" }, "response": { "blocked_tumblelogs": [ { "name": "joe", "url": "http:\/\/www.spammyjoe.com", "updated": 1308797076, "title": "Spammy Joe", "description": "Posting things you don't really care for" }, { "name": "harry", "url": "harryblog19.tumblr.com", "updated": 1808841333, "title": "The 19th Harry Blog", "description": "" }, ... ], "_links": { "next": { "href": "/v2/blog/andysblog.tumblr.com/blocks?offset=20", "method": "GET", "query_params": { "offset": 20 } } } } } ``` -------------------------------- ### Example Response for Retrieving Blocked Blogs Source: https://www.tumblr.com/docs/en/api/v2_language=zh_CN An example JSON response when successfully retrieving a list of blocked blogs. Includes metadata, a list of blocked tumblelogs with their details, and pagination links. ```JSON { "meta": { "status": 200, "msg": "OK" }, "response": { "blocked_tumblelogs": [ { "name": "joe", "url": "http:\/\/www.spammyjoe.com", "updated": 1308797076, "title": "Spammy Joe", "description": "Posting things you don't really care for" }, { "name": "harry", "url": "harryblog19.tumblr.com", "updated": 1808841333, "title": "The 19th Harry Blog", "description": "" }, ... ], "_links": { "next": { "href": "\/v2\/blog\/andysblog.tumblr.com\/blocks?offset=20", "method": "GET", "query_params": { "offset": 20 } } } } } ``` -------------------------------- ### Tumblr API: Get Filtered Tags Example Source: https://www.tumblr.com/docs/en/api/v2_language=ru_RU Demonstrates a GET request to retrieve a list of tags currently being filtered on the user's dashboard. This endpoint requires OAuth authentication. ```http GET api.tumblr.com/v2/user/filtered_tags Host: api.tumblr.com ``` -------------------------------- ### Retrieve Draft Posts API Call (GET) Source: https://www.tumblr.com/docs/en/api/v2_language=ja_JP This example illustrates a GET request to the Tumblr API for retrieving draft posts. It allows for pagination using 'before_id' and filtering by post format. ```http GET https://api.tumblr.com/v2/blog/{blog-identifier}/posts/draft?before_id={before_id}&filter={filter} HTTP/1.1 Host: api.tumblr.com Authorization: OAuth {your_consumer_key} ``` -------------------------------- ### POST /post (Legacy) Source: https://www.tumblr.com/docs/en/api/v2_language=id_ID Create a new blog post using legacy posting flows. While still available, the Neue Post Format creation route is recommended. ```APIDOC ## POST /post (Legacy) ### Description Create a new blog post using legacy posting flows. While still available, the Neue Post Format creation route is recommended. ### Method POST ### Endpoint `/post` ### Parameters #### Request Body - **type** (String) - Required - The type of post to create (e.g., `text`, `photo`, `quote`, `link`, `video`). - **body** (String) - Optional - The content of the post (for text posts). - **caption** (String) - Optional - The caption for the post (for photo, video, or link posts). - **link** (String) - Optional - The URL for a link post. - **title** (String) - Optional - The title for the post. - **tags** (Array) - Optional - An array of tags for the post. - **format** (String) - Optional - The format of the post content (e.g., `html`, `markdown`). ### Request Example ```json { "type": "text", "title": "My First Post", "body": "This is the content of my first post.", "tags": ["hello", "world"] } ``` ### Response #### Success Response (200) - **id** (Number) - The ID of the submitted post. - **id_string** (String) - The ID of the submitted post, in String format. - **post_url** (String) - The location of the post. - **slug** (String) - Short text summary to the end of the post URL. - **type** (String) - The type of post. - **date** (String) - The GMT date and time of the post. - **timestamp** (Number) - The time of the post, in seconds since the epoch. - **state** (String) - Indicates the current state of the post. - **format** (String) - Format type of post. - **reblog_key** (String) - The reblog key for the post. - **tags** (Array) - Tags applied to the post. - **short_url** (String) - Short URL for the post. - **post_author** (String) - Author of post. - **is_submission** (Boolean) - Indicates post is a submission. - **anonymous_name** (String) - Name on an anonymous submission. - **anonymous_email** (String) - Email on an anonymous submission. #### Response Example ```json { "id": 1234567890, "id_string": "1234567890", "post_url": "http://example.tumblr.com/post/1234567890/my-first-post", "slug": "my-first-post", "type": "text", "date": "2023-10-27 10:00:00 GMT", "timestamp": 1698397200, "state": "published", "format": "html", "reblog_key": "abcdef123456", "tags": ["hello", "world"], "short_url": "http://tumblr.com/xyz123", "post_author": "user123", "is_submission": false, "anonymous_name": null, "anonymous_email": null } ``` ``` -------------------------------- ### Retrieve Published Posts (Example URIs) Source: https://www.tumblr.com/docs/en/api/v2_language=nl_NL These examples showcase different ways to use the `/posts` endpoint to retrieve published posts from a blog. They illustrate how to specify post types (e.g., 'text', 'photo'), filter by tags, and retrieve posts before a certain timestamp. The method uses API Key authentication. ```http https://api.tumblr.com/v2/blog/peacecorps.tumblr.com/posts/text?notes_info=true ``` ```http https://api.tumblr.com/v2/blog/pitchersandpoets.tumblr.com/posts/photo?tag=new+york+yankees ``` ```http https://api.tumblr.com/v2/blog/staff.tumblr.com/posts?before=1496289599 ``` -------------------------------- ### Retrieve Queued Posts API Call (GET) Source: https://www.tumblr.com/docs/en/api/v2_language=ja_JP This example shows how to make a GET request to the Tumblr API to retrieve a list of queued posts for a specific blog. It includes parameters for pagination and filtering. ```http GET https://api.tumblr.com/v2/blog/{blog-identifier}/posts/queue?offset={offset}&limit={limit}&filter={filter} HTTP/1.1 Host: api.tumblr.com Authorization: OAuth {your_consumer_key} ``` -------------------------------- ### Retrieve User's Liked Posts Source: https://www.tumblr.com/docs/en/api/v2_language=fr_FR This example shows how to retrieve a list of posts that a user has liked. It supports pagination using limit, offset, before, or after parameters. Note that only one of before, after, or offset can be used at a time. ```HTTP GET https://api.tumblr.com/v2/user/likes?api_key={your_api_key}&limit=20&offset=0 ``` ```HTTP GET https://api.tumblr.com/v2/user/likes?api_key={your_api_key}&limit=10&before=1407376540 ``` ```HTTP GET https://api.tumblr.com/v2/user/likes?api_key={your_api_key}&limit=10&after=1407376540 ``` -------------------------------- ### Retrieve Draft Posts API Request (GET) Source: https://www.tumblr.com/docs/en/api/v2_language=de_DE This example shows the GET request for retrieving draft posts from the Tumblr API. It requires the blog identifier and authentication. Optional parameters like 'before_id' and 'filter' can be used to paginate and format the results. ```http GET api.tumblr.com/v2/blog/{blog-identifier}/posts/draft?before_id=0&filter=text ``` -------------------------------- ### Request specific and optional blog fields using fields parameter Source: https://www.tumblr.com/docs/en/api/v2_language=zh_CN This example shows how to request both standard and optional fields for a blog object using the `fields` query parameter. Optional fields are prefixed with '%3F' (the URL-encoded form of '?'). ```http https://api.tumblr.com/v2/blog/david/info?fields[blogs]=name,updated,%3Fis_following_you,%3Fduration_following_blog ``` -------------------------------- ### Retrieve Draft Posts API Request Example Source: https://www.tumblr.com/docs/en/api/v2_language=nl_NL This example illustrates a GET request to retrieve draft posts from a Tumblr blog. It includes the base URI and optional query parameters like 'before_id' for pagination and 'filter' to specify the output format. ```http GET https://api.tumblr.com/v2/blog/{blog-identifier}/posts/draft?before_id=0&filter=text ``` -------------------------------- ### Tumblr API GET Request Examples for Retrieving Posts Source: https://www.tumblr.com/docs/en/api/v2 These examples illustrate various ways to retrieve published posts from a Tumblr blog using the API. They demonstrate how to specify post types, filter by tags, and retrieve posts before a certain timestamp. ```http https:\/\/api.tumblr.com\/v2\/blog\/peacecorps.tumblr.com\/posts\/text?notes_info=true ``` ```http https:\/\/api.tumblr.com\/v2\/blog\/pitchersandpoets.tumblr.com\/posts\/photo?tag=new+york+yankees ``` ```http https:\/\/api.tumblr.com\/v2\/blog\/staff.tumblr.com\/posts?before=1496289599 ``` -------------------------------- ### Tumblr API v2 Text Post Example Source: https://www.tumblr.com/docs/en/api/v2_language=zh_CN An example of a GET request to the Tumblr API v2 for retrieving text posts from a specific blog. The response includes metadata and an array of post objects, each containing details like title, body, tags, and notes. ```json { "meta": { "status": 200, "msg": "OK" }, "response": { "blog": { ... }, "posts": [ { "blog_name": "citriccomics", "id": 3507845453, "id_string": "3507845453", "post_url": "https:\/\/citriccomics.tumblr.com\/post\/3507845453", "type": "text", "date": "2011-02-25 20:27:00 GMT", "timestamp": 1298665620, "state": "published", "format": "html", "reblog_key": "b0baQtsl", "tags": [ "tumblrize", "milky dog", "mini comic" ], "note_count": 14, "title": "Milky Dog", "body": "

TO READ THE REST CLICK HERE<\/a>\n\nMilky Dog was inspired by something Naomi Gee<\/a> wrote on twitter, I really liked the hash tag #milkydog<\/a> and quickly came up with a little comic about it. You can (and should) follow Naomi on twitter @ngun<\/a> I'm on twitter as well @weflewairplanes<\/a> <\/p>\n\nAlso, if you’re a Reddit user (or even if you're not) I submitted this there, if you could up vote it I'd be super grateful just CLICK HERE<\/a>" }, ... ], "total_posts": 3 } } ``` -------------------------------- ### POST /post (Legacy) Source: https://www.tumblr.com/docs/en/api/v2_language=fr_FR Create a new blog post using legacy posting flows. While still available, the Neue Post Format creation route is encouraged. ```APIDOC ## POST /post (Legacy) ### Description Create a new blog post using legacy posting flows. While still available, the Neue Post Format creation route is encouraged. ### Method POST ### Endpoint `/websites/tumblr_en/post` ### Parameters #### Request Body - **type** (String) - Required - The type of post to create (e.g., 'text', 'photo', 'quote', 'link', 'video'). - **body** (String) - Optional - The content of the post (for text posts). - **caption** (String) - Optional - The caption for the post (for photo, video, etc.). - **tags** (Array of Strings) - Optional - Tags to apply to the post. - **format** (String) - Optional - The format of the post content (e.g., 'html', 'markdown'). ### Request Example ```json { "type": "text", "body": "This is the content of my new post.", "tags": ["api", "test", "post"] } ``` ### Response #### Success Response (200) - **id** (Number) - The ID of the submitted post. - **id_string** (String) - The ID of the submitted post, in String format. - **post_url** (String) - The location of the post. - **slug** (String) - Short text summary to the end of the post URL. - **type** (String) - The type of post. - **date** (String) - The GMT date and time of the post. - **timestamp** (Number) - The time of the post, in seconds since the epoch. - **state** (String) - Indicates the current state of the post. - **format** (String) - Format type of post. - **reblog_key** (String) - The reblog key for the post. - **tags** (Array) - Tags applied to the post. - **short_url** (String) - Short url for the post. - **post_author** (String) - Author of post. - **is_submission** (Boolean) - Indicates post is a submission. - **anonymous_name** (String) - Name on an anonymous submission. - **anonymous_email** (String) - Email on an anonymous submission. #### Response Example ```json { "id": 1234567890, "id_string": "1234567890", "post_url": "http://example.tumblr.com/post/1234567890/my-new-post", "slug": "my-new-post", "type": "text", "date": "2023-10-27 10:00:00 GMT", "timestamp": 1698397200, "state": "published", "format": "html", "reblog_key": "abcdef123456", "tags": ["api", "test", "post"], "short_url": "http://tmblr.co/abcdef", "post_author": "exampleuser", "is_submission": false } ``` ``` -------------------------------- ### GET /blog/{blog-identifier}/followers Source: https://www.tumblr.com/docs/en/api/v2_language=zh_CN Retrieves a list of a blog's followers. You can control the number of results and the starting point using `limit` and `offset` parameters. ```APIDOC ## GET /blog/{blog-identifier}/followers ### Description Retrieves a list of a blog's followers. ### Method GET ### Endpoint `/v2/blog/{blog-identifier}/followers` ### Parameters #### Path Parameters - **blog-identifier** (String) - Required - Any blog identifier. See the Blog Identifiers section for more details. #### Query Parameters - **limit** (Number) - Optional - The number of results to return: 1–20, inclusive. Default is 20. - **offset** (Number) - Optional - Result to start at. Default is 0 (first follower). ### Response #### Success Response (200) - **followers** (Array) - An array of follower objects. - **total_followers** (Number) - Total number of followers. #### Response Example { "followers": [ { "name": "follower1", "url": "http://follower1.tumblr.com/" }, { "name": "follower2", "url": "http://follower2.tumblr.com/" } ], "total_followers": 100 } ``` -------------------------------- ### POST /post (Legacy) Source: https://www.tumblr.com/docs/en/api/v2 Create a new blog post using legacy posting flows. While still available, the Neue Post Format creation route is encouraged. ```APIDOC ## POST /post (Legacy) ### Description These legacy posting flows are still available, but we encourage you to use the Neue Post Format creation route. ### Method POST ### Endpoint `/post` ### Parameters #### Request Body - **type** (String) - Required - The type of post to create (e.g., `text`, `photo`, `quote`, `link`, `video`). - **body** (String) - Optional - The content of the post (for text posts). - **caption** (String) - Optional - The caption for the post (for photo, video, etc.). - **tags** (Array) - Optional - An array of tags for the post. - **format** (String) - Optional - The format of the post content (e.g., `html`, `markdown`). - **slug** (String) - Optional - A slug for the post URL. - **state** (String) - Optional - The state of the post (e.g., `published`, `draft`). - **publish_on** (String) - Optional - The date and time to publish the post (ISO 8601 format). ### Request Example ```json { "type": "text", "body": "This is my first post!", "tags": ["hello", "world"] } ``` ### Response #### Success Response (200) - **id** (Number) - The ID of the submitted post. - **id_string** (String) - The ID of the submitted post, in String format. - **post_url** (String) - The location of the post. - **slug** (String) - Short text summary to the end of the post URL. - **type** (String) - The type of post. - **date** (String) - The GMT date and time of the post. - **timestamp** (Number) - The time of the post, in seconds since the epoch. - **state** (String) - Indicates the current state of the post. - **format** (String) - Format type of post. - **reblog_key** (String) - The reblog key for the post. - **tags** (Array) - Tags applied to the post. - **short_url** (String) - Short URL for the post. - **post_author** (String) - Author of post. - **is_submission** (Boolean) - Indicates post is a submission. - **anonymous_name** (String) - Name on an anonymous submission. - **anonymous_email** (String) - Email on an anonymous submission. #### Response Example ```json { "id": 1234567890, "id_string": "1234567890", "post_url": "http://myblog.tumblr.com/post/1234567890/my-first-post", "slug": "my-first-post", "type": "text", "date": "2023-10-27 10:00:00 GMT", "timestamp": 1698397200, "state": "published", "format": "html", "reblog_key": "abcdef123456", "tags": ["hello", "world"], "short_url": "http://tmblr.co/xyzabc", "post_author": "myblog", "is_submission": false } ``` ``` -------------------------------- ### Retrieve Blog Avatar - API Request Examples Source: https://www.tumblr.com/docs/en/api/v2_language=fr_FR These examples show how to request a blog's avatar. You can specify a size (e.g., 512 pixels) or use the default size (64x64) by omitting the size parameter. ```HTTP GET https://api.tumblr.com/v2/blog/david.tumblr.com/avatar/512 ``` ```HTTP GET https://api.tumblr.com/v2/blog/david.tumblr.com/avatar ``` -------------------------------- ### Tumblr API GET Request to Retrieve Posts Source: https://www.tumblr.com/docs/en/api/v2_language=zh_CN This example shows a GET request to the Tumblr API's `/posts` endpoint. It allows retrieval of published posts from a blog, with options to filter by post type and tags, or by date. Authentication is typically done via an API key. ```http https:\/\/api.tumblr.com\/v2\/blog\/peacecorps.tumblr.com\/posts\/text?notes_info=true ``` ```http https:\/\/api.tumblr.com\/v2\/blog\/pitchersandpoets.tumblr.com\/posts\/photo?tag=new+york+yankees ``` ```http https:\/\/api.tumblr.com\/v2\/blog\/staff.tumblr.com\/posts?before=1496289599 ```