A quick script to pull links from Instapaper
Moving on from pulling links from Tumblr, where I fling links for any articles I read...
I also put links of articles to read later in Instapaper. Somewhere I've got a post about how I use Instapaper, but I haven't excavated and reposted it yet. In short: Instapaper is nice because you can post a link to an article that you think you want to read now, but then not read it, and come back to it later and decide if you actually want to read it. Sounds silly, but gets around whatever impulse that is for reading junky super NOW articles about whatever's in the news—the sort of stuff that's often primed for Engagement moreso than Information.
Instapaper is also nice because it feels like an old(-ish) school internet tool that is useful without being flashy or pushy or annoying. It does what it does, and does it well.
In the back of my mind, I have this idea of building out a knowledge graph based on the things I read. I try to keep it in the back of my mind because I'd rather spend the time in the real world and not spend so much time making interesting but useless toys. Tumblr as a link blog and Instapaper as a place to capture article text and highlights are two aspects of that graph. Another would be the notes I have in OneNote. Another might be the feeds I subscribe to in Feedly (say, see which articles I've read, but have or have not subscribed to the RSS feed). Each artifact (which could be described by any number of the previously named things) might relate to another artifact as a citation or link or reference or author or whatever.
Where do ideas come from? Where do they go? Just something that's been banging around in my head, especially at work where there is some messy progression of results begetting ideas begetting results, and so on and so on.
Anyway. In the meanwhile, here's a quick python script that grabs articles from the "archived" folder in Instapaper.
import json
from pathlib import Path
from requests_oauthlib import OAuth1Session
def load_keys():
# Retrieve API keys from a separate location from code
# Cross-platform home directory
home = Path.home()
# Shared subpath on both Mac and PC
keyfile = home / 'OneDrive' / 'Programs' / 'instapaper' / 'instapaper_api_keys.json'
with open(keyfile, 'r') as f:
return json.load(f)
def get_oauth_token(keys):
# Step 1: Get an OAuth access token via xAuth
oauth = OAuth1Session(keys['consumer_id'], client_secret=keys['consumer_secret'])
response = oauth.post(
'https://www.instapaper.com/api/1/oauth/access_token',
data={
'x_auth_username': keys['username'],
'x_auth_password': keys['password'],
'x_auth_mode': 'client_auth',
}
)
if response.status_code != 200:
raise Exception('xAuth failed: ' + response.text)
# Parse token + secret
token_data = dict(item.split('=') for item in response.text.split('&'))
print('Authenticated!')
return token_data
def get_auth(api_keys, oauth_token):
auth = OAuth1Session(
api_keys['consumer_id'],
client_secret=api_keys['consumer_secret'],
resource_owner_key=oauth_token['oauth_token'],
resource_owner_secret=oauth_token['oauth_token_secret']
)
return auth
def fetch_bookmarks(api_keys, oauth_token, limit, folder_id=None):
auth = get_auth(api_keys, oauth_token)
resp = auth.post(
'https://www.instapaper.com/api/1/bookmarks/list',
data={
'folder_id': folder_id,
'limit': limit
}
)
resp_json = resp.json()
bookmarks = []
for item in resp_json:
if item.get('type') == 'bookmark':
bookmarks.append(item)
return bookmarks
if __name__ == '__main__':
api_keys = load_keys()
oauth_token = get_oauth_token(api_keys)
bookmarks = fetch_bookmarks(api_keys, oauth_token, limit=10, folder_id='archive')
for b in bookmarks:
print(f"{b['bookmark_id']}, {b['url']}, {b['title']}, {b['time']}")
That returns something like:
1622499199, https://www.newyorker.com/magazine/2020/12/14/the-skeletons-at-the-lake, The Skeletons at the Lake, 1770208605
1967077764, https://www.nytimes.com/2026/01/25/business/mississippi-delta-farmers-rice-prices.html, Hard Times in the Delta as Farmers Consider Letting Crops Rot, 1769352919
1967026977, https://www.polygon.com/brian-graden-south-park-interview-matt-stone-trey-parker-donald-trump/, 29 years later, the Hollywood producer behind South Park weighs in on its anti-Trump season, 1769345761
1958813273, https://www.theatlantic.com/ideas/2025/12/death-college-football-bowl-playoff/685454/, The Slow, Inevitable Death of the Bowl Game, 1768142163
1950813592, https://fortune.com/2025/12/25/cursor-ceo-michael-truell-vibe-coding-warning-generative-ai-assistant/, Cursor CEO warns vibe coding builds 'shaky foundations' and eventually 'things start to crumble’ | Fortune, 1766773591
1941006954, https://www.theringer.com/2025/11/19/tv/tv-show-coaching-trees-ranking, Which TV Show Has the Best Coaching Tree?, 1765686843
1860930300, https://english.elpais.com/culture/2025-07-20/the-bewildering-phenomenon-of-declining-quality.html, The bewildering phenomenon of declining quality, 1765190737
1939289925, https://www.salon.com/2001/09/24/cobain/, Kurt Cobain and a dream about pop - Salon.com, 1765170576
1630731970, https://slate.com/business/2023/08/sleeper-car-trains-trend-travel.html, The Bliss of Being There by Morning, 1764900144
1634972476, https://www.thecut.com/article/erykah-badu-profile.html, A Four-Hour Phone Call With Erykah Badu, 1764872740