4
0

patrick.net api


 invite response                
2022 Dec 9, 4:36pm   8,044 views  22 comments

by Patrick   ➕follow (60)   💰tip   ignore  

I've created a basic patrick.net api.

First, you must create an account via the browser and email loop. There is no api for that. If you already have an account, you're all set there.

Then, you get your user id, hashed password, and key like this:


curl -X POST https://patrick.net/post_login \
--data-urlencode email='me@email.com ' \
--data-urlencode password='supersecret' \
--header "Accept: application/json"


The response will be like this:

{
"patricknetuser": 135861,
"patricknetpass": "f517f69dc60fd1f25a24e31e791fca34",
"key": "ce019db42c81608fd4fb093c781ecccd"
}


Then most of the functions on the site will return json instead of html if you hit them with an "Accept: application/json" header like this:


curl 'https://patrick.net/accept_comment?key=ce019db42c81608fd4fb093c781ecccd' \
-H 'Accept: application/json' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Cookie: patricknetuser=135861; patricknetpass=f517f69dc60fd1f25a24e31e791fca34' \
--data-raw 'comment_content=testing+the+api&comment_post_id=1345899'


Please let me know if you might use this api and I'll document it better and fill in more of the routes. I have api-ified most of the routes, the most notable exception being image upload, which does not work via the api yet.

If you're familiar with the browser dev tools, you can look at the network requests and just add 'Accept: application/json' and most of them should work as an api.

Please regard the api so far as UNSTABLE and don't build anything too important on it. Any part could change at any time.

Comments 1 - 22 of 22        Search these comments

1   Hircus   2022 Dec 10, 6:19pm  

The login call seems to work and I get back the expected json.

If I call the homepage, I get back json.
curl 'https://patrick.net/?key='$pkey \
-H 'Accept: application/json' \
-H "Cookie: patricknetuser=$puser; patricknetpass=$ppass"


But if I try to get my own comments, I get back html.
curl 'https://patrick.net/comments?a=Hircus&start=2720&key='$pkey \
-H 'Accept: application/json' \
-H "Cookie: patricknetuser=$puser; patricknetpass=$ppass"


Is this url apiified? I tried borking the credentials on purpose via nulling the patricknetuser, and got back json "please log in" message.
2   Patrick   2022 Dec 10, 7:06pm  

@Hircus You are right, I missed that one.

Should be fixed now. Please try again.
3   Hircus   2022 Dec 10, 7:21pm  

Works :)
4   Hircus   2022 Dec 14, 11:13am  

Same problem for threads - I get back html

curl -i 'https://patrick.net/user/Hircus?page=1&order=new&key='$pkey \
-H 'Accept: application/json' \
-H "Cookie: patricknetuser=$puser; patricknetpass=$ppass"
5   Patrick   2022 Dec 14, 11:48am  

You're right. OK, fixed now. Let me know if not.
6   Hircus   2022 Dec 14, 11:52am  

That fixed it
7   Glock-n-Load   2025 Jan 18, 5:03pm  

@patrick, what is this api for? What’s it’s purpose?
8   Patrick   2025 Jan 18, 9:19pm  

@Glock-n-Load

It's so that people can write programs to interact with patrick.net. So you could use it to, say, automatically post a stock price to a certain thread every day.

Or you could write a patrick.net app that people could use instead of a browser.

Or a different website could embed this site as a forum.
9   Glock-n-Load   2025 Jan 18, 9:59pm  

Is anyone using it?
10   SunnyvaleCA   2025 Jan 19, 3:01am  

Maybe write something to have Grok automatically digest all comments and start writing some of its own!
11   Patrick   2025 Jan 19, 9:48am  

Glock-n-Load says

Is anyone using it?


I don't think so.
12   GNL   2025 Jan 19, 5:11pm  

Patrick says

Glock-n-Load says


Is anyone using it?


I don't think so.

I used perplexity to look at what the costs are to create an api. Anywhere from $20,000 to $150-$200K? Really?
13   Patrick   2025 Jan 19, 5:58pm  

Lol, took me two hours maybe.
14   FortwayeAsFuckJoeBiden   2025 Jan 19, 6:00pm  

Patrick says


Lol, took me two hours maybe.


you can be a millionaire, just call all the customers of that company and offer lower rate lol

no Rajesh’s, so quality work offered.
15   Glock-n-Load   2025 Jan 19, 6:49pm  

Would either of you like to create one for this company…

https://www.autoreelapp.com/#product

They use generative ai to create very real looking videos out of photographs. The user uploads images and the company creates a video with them in a very short period of time.

Look at the windows of the example. See how real it looks as the view through the windows adjust to the movements and different angles. This would be amazing for my company.
16   FortwayeAsFuckJoeBiden   2025 Jan 19, 6:56pm  

are they looking for a solution to a problem?
17   Glock-n-Load   2025 Jan 19, 7:15pm  

FortwayeAsFuckJoeBiden says

Patrick says



Lol, took me two hours maybe.


you can be a millionaire, just call all the customers of that company and offer lower rate lol

no Rajesh’s, so quality work offered.

I believe perplexity is a search engine that uses ai.
18   Glock-n-Load   2025 Jan 19, 7:21pm  

FortwayeAsFuckJoeBiden says


are they looking for a solution to a problem?

I’m trying to be bold. This company says it doesn’t have an api but I’m willing to pay for it. Laughable probably but I try these things anyway. Never know someone else’s position/situation.

I want my clients (Realtors) to be able access to this ai solution for photos my company delivers to them so they don’t need to hire a videographer at $500/video. Instead, they could gain access and only pay maybe $50 or so. Eazy peazy for me if I can get some love.
19   Glock-n-Load   2025 Jan 19, 7:34pm  

I see that an api is not required to be do this? It can be done in other ways?
20   Patrick   2025 Jan 19, 7:45pm  

The alternative is to scrape a site's html with robots. The problem with that is that the scrapers will break when the html breaks.

And API is a stable interface to a website, one that doesn't change as the site's appearance changes.
21   Patrick   2025 Jan 19, 7:54pm  

Glock-n-Load says

Would either of you like to create one for this company…

https://www.autoreelapp.com/#product


No one outside of the company that owns autoreelapp.com can make a stable API for that site.

If you attempt to do it, the API will break when the site changes.
22   Glock-n-Load   2025 Jan 19, 7:59pm  

Thank you Patrick.

Please register to comment:

api   best comments   contact   latest images   memes   one year ago   random   suggestions   gaiste