Twitter Archive
View .mdPublic endpoints for reading the tweets on a blog made from an imported Twitter archive. They need no authentication, so send them without a token.
https://micro.blog
/twitter/archive/{site_id}/recent.json
Returns the 100 most recent tweets in an imported Twitter archive, newest first, in JSON Feed format.
Example Request
curl -X GET "https://micro.blog/twitter/archive/123/recent.json"
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
offset
|
integer | Optional |
Number of tweets to skip, for loading older pages.
Example:
100
|
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
site_id
|
integer | Required |
ID of the tweets blog. Returns 404 when the ID isn’t a tweets blog.
Example:
123
|
Response
200 OK application/json
Returns a JSON Feed. Each item’s url is the tweet’s page on the archive blog, and _microblog.twitter_url is the original tweet URL.
Example Response
{
"version": "https://jsonfeed.org/version/1.1",
"title": "Micro.blog - tweets",
"home_page_url": "https://micro.blog",
"icon": "https://micro.blog/images/icons/favicon_256.png",
"favicon": "https://micro.blog/images/icons/favicon_32.png",
"_microblog": {
"about": "https://micro.blog/about/api"
},
"items": [
{
"id": "12345",
"content_html": "<p>Hello from 2012.</p>\n",
"url": "https://example-tweets.micro.blog/2012/04/26/hello.html",
"date_published": "2012-04-26T12:00:00+00:00",
"_microblog": {
"twitter_url": "https://twitter.com/example/status/1234567890"
}
}
]
}
/twitter/archive/{site_id}/search.json
Searches the tweets in an imported Twitter archive for text, returning up to 100 matches, newest first, in JSON Feed format.
Example Request
curl -X GET "https://micro.blog/twitter/archive/123/search.json?q=coffee"
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
q
|
string | Required |
Text to search for. Matches any tweet whose text contains it.
Example:
coffee
|
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
site_id
|
integer | Required |
ID of the tweets blog. Returns 404 when the ID isn’t a tweets blog.
Example:
123
|
Response
200 OK application/json
Returns a JSON Feed in the same shape as recent.json.
Example Response
{
"version": "https://jsonfeed.org/version/1.1",
"title": "Micro.blog - tweets",
"home_page_url": "https://micro.blog",
"icon": "https://micro.blog/images/icons/favicon_256.png",
"favicon": "https://micro.blog/images/icons/favicon_32.png",
"_microblog": {
"about": "https://micro.blog/about/api"
},
"items": [
{
"id": "12346",
"content_html": "<p>More coffee, please.</p>\n",
"url": "https://example-tweets.micro.blog/2013/01/15/more-coffee.html",
"date_published": "2013-01-15T09:00:00+00:00",
"_microblog": {
"twitter_url": "https://twitter.com/example/status/1234567891"
}
}
]
}
/twitter/archive/{site_id}/years.json
Returns the years that have tweets in an imported Twitter archive.
Example Request
curl -X GET "https://micro.blog/twitter/archive/123/years.json"
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
site_id
|
integer | Required |
ID of the tweets blog. Returns 404 when the ID isn’t a tweets blog.
Example:
123
|
Response
200 OK application/jsonReturns an array of years. The order isn’t guaranteed, so sort it in your app.
Example Response
[
2010,
2011,
2012
]
/twitter/archive/{site_id}/{year}/{month}.json
Returns every tweet from one month of an imported Twitter archive, newest first, in JSON Feed format.
Example Request
curl -X GET "https://micro.blog/twitter/archive/123/2012/4.json"
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
site_id
|
integer | Required |
ID of the tweets blog. Returns 404 when the ID isn’t a tweets blog.
Example:
123
|
year
|
integer | Required |
Four-digit year.
Example:
2012
|
month
|
integer | Required |
Month number, from 1 to 12.
Example:
4
|
Response
200 OK application/json
Returns a JSON Feed in the same shape as recent.json, without pagination.
Example Response
{
"version": "https://jsonfeed.org/version/1.1",
"title": "Micro.blog - tweets",
"home_page_url": "https://micro.blog",
"icon": "https://micro.blog/images/icons/favicon_256.png",
"favicon": "https://micro.blog/images/icons/favicon_32.png",
"_microblog": {
"about": "https://micro.blog/about/api"
},
"items": [
{
"id": "12345",
"content_html": "<p>Hello from 2012.</p>\n",
"url": "https://example-tweets.micro.blog/2012/04/26/hello.html",
"date_published": "2012-04-26T12:00:00+00:00",
"_microblog": {
"twitter_url": "https://twitter.com/example/status/1234567890"
}
}
]
}