Tool Others F95 API

Jun 17, 2019
56
54
Browsing through the various threads of this section, I realized that there are no APIs (Application Programming Interfaces) to obtain the data on the platform. Since I already had to develop some APIs for the Game Manager I was developing I decided to share them to help other coders.

The APIs were written and designed to be used with Javascript/Node JS/Electron with support for to get thread and user information. They use HTTP requests with to get HTML pages (without scripts, JQuery, etc ...) which are processed with and CSS selectors to get the required data.

Specifically, through these APIs it is possible to obtain information on games, mods, animations, comics, assets and users, it is also possible to search for threads and artifacts by simulating a "standard" search, one through "Latest updates" and a mixed one. It also supports two-factor authentication and the use of CAPTCHA.

The package has Typescript declaration and can be installed via with npm i --save [@]millenniumearl/f95api.

The code is available on . Feel free to open issue or PR!
 
Last edited:
Jun 17, 2019
56
54
I am a completely new to anything like this, how do I get started using this API?
Hi!

The library is designed to be used on JS node (mainly for Electron as I use it for my manager), you can install it using a package manager as NPM.

When you mean "new" you mean that you are new with software programming in general?
 
May 23, 2018
71
251
Hi!

The library is designed to be used on JS node (mainly for Electron as I use it for my manager), you can install it using a package manager as NPM.

When you mean "new" you mean that you are new with software programming in general?
Yes in general. Switched to linux and the lack of support for some things along with an ever want to make my own things pushed me here, might as well get started somewhere.
 
Jun 17, 2019
56
54
Yes in general. Switched to linux and the lack of support for some things along with an ever want to make my own things pushed me here, might as well get started somewhere.
Ok, I don't think this is the right thread but I will try to explain step-by-step:
  1. Install an IDE to develop, to be safe I recommend
  2. Since this library works with JS node, install it from
  3. To start creating a simple application you can follow
  4. You can install with the following command in the VSCode console​
npm i --save [@]millenniumearl/f95api@latest
Remove the square brackets at @

Pro tip: You can test this library with RunKit (progress will not be saved and it could not work as intended)
 
  • Like
Reactions: AlicetheDeviant

SameAsAlways

Newbie
Aug 23, 2018
15
4
Thx for sharing! I am writing my own HGames Manger similar to yours, but written with Avalonia/C# and have scrappers for JastUSA and DlSite. Thought I could make one for F95 too, but the only thing I could use without login info is the latest_data.php script which you also use in your api.

The data available in the json would be sufficient, but I have not found a way to narrow down the filters enough to find exactly the wanted game. It would be ideal to search with the thread_id, but this seems not to be possible. Do you have any suggestions for me?
 
Jun 17, 2019
56
54
Wow, I didn't know anything like Avalonia!

The data available in the json would be sufficient, but I have not found a way to narrow down the filters enough to find exactly the wanted game. It would be ideal to search with the thread_id, but this seems not to be possible. Do you have any suggestions for me?
It's a while I don't put my hands on this library so I'm going to memory:
  • If you already have the name of the game you are looking for you can try to use the appropriate field
  • You can't use the thread_id to search for games on the Latest Updates page but you can use it to create an ad hoc URL and open the game page directly (if this ID exists)
 

SameAsAlways

Newbie
Aug 23, 2018
15
4
Thanks for the answer! I wanted to prevent scrapping the game threads "by hand" since handwritten stuff is always not very easy to analyze into something well structured, but I guess I can define some rules and try making the best out of it.

Avalonia is easy to learn if you already know WPF or something similar. Also, it is multiplatform, if that is a concern^^
 
  • Like
Reactions: MillenniumEarl

-Hypno

New Member
Sep 1, 2017
4
11
Thanks for your awesome API !

I've been using it for a few months now.
But suddenly, I've got a weird bug saying
You are already logged in. Please click here to return to the forum list.
when I'm trying to authenticate on F95. Yet, when testing the rest of my code, the API says I am not connected.

I didn't do anything special, but to be sure, I restarted an empty project and tried again with only basic code such as :
JavaScript:
import { login } from "@milleniumearl/f95api";
require('dotenv').config();

async function authenticateToF95() {
    const logger = await login(process.env.F95_USERNAME, process.env.F95_PASSWORD);

    if(logger.success) {
        console.log(`Connected as ${process.env.F95_USERNAME}`);
    } else {
        console.log(`[Code ${logger.code}] ${logger.message}`);
    }
}

authenticateToF95();
I'm using Typescript 4.8.2 but I also tried with NodeJS and got the same result.

The most surprising part is that I tested it on npm runkit with the exact same code and it worked!

I can't figure out what's wrong. Do you have any idea ?
 

Nox29

Newbie
Feb 26, 2023
24
6
Hi
This might be a stupid question, but is there a way to use the API with a Java application?

I had something similar to YAM in mind, only that I wanted to make a manager not only for F95zone or Games, but for all sorts of "content" from different websites and different types of media.

My problem is, I have little spare time and I mostly know how to use Java. I already made a sort of skeleton of my envisioned application including a MSQL DB and JavaFX UI, mostly because I work on an application exactly like that for my job as well so its shared work. The only thing missing now would be this API.

Is there a way I could use this API similar to any other online API with Java?
 

Nox29

Newbie
Feb 26, 2023
24
6
Hi
This might be a stupid question, but is there a way to use the API with a Java application?

I had something similar to YAM in mind, only that I wanted to make a manager not only for F95zone or Games, but for all sorts of "content" from different websites and different types of media.

My problem is, I have little spare time and I mostly know how to use Java. I already made a sort of skeleton of my envisioned application including a MSQL DB and JavaFX UI, mostly because I work on an application exactly like that for my job as well so its shared work. The only thing missing now would be this API.

Is there a way I could use this API similar to any other online API with Java?
Quick update, I´m making a Java API for this website now, shouldn't take that long.