file.php - File View API

Q

What is the file view API, file.php?

✍: FYIcenter.com

A

file.php is another simple API provided by Library Genesis to allow you to view details of a file object for a given MD5 value.

Technical information on file view API:

URL: {site_url}/file.php?md5={md5}
site_url: https://libgen.lc or other mirror sites
md5: The MD5 hash value of the file object. 
Response format: File detail in HTML document.

Note that the MD5 hash value is provided in the response of "files" object returned by json.php?object=f API.

MD5 hash values are also provided in the response of "editions" objet returned by json.php?object=e API.

Here are some examples on how to use the file.php API.

1. Get the "files" object of a given f_id. Take the MD5 hash value in the response.

fyicenter$ curl 'https://libgen.lc/json.php?object=f&ids=32216214' | python -m json.tool

{
  "32216214": {
    "editions": {
        "30969895": {
            "e_id": "32149882",
            "time_added": "2021-07-17 14:40:07",
            "time_last_modified": "2021-07-17 14:40:07"
        }
    },
    "extension": "pdf",
    "fiction_id": "0",
    "fiction_rus_id": "0",
    "file_create_date": "2000-01-01 05:00:00",
    "filesize": "216912",
    "generic": "",
    "libgen_id": "0",
    "libgen_topic": "a",
    "locator": "",
    "magz_id": "0",
    "md5": "2da991ccc4cd63d23196a5c4a63a71ef",
    "ocr": "",
    "orientation": "",
    "pages": "0",
    "paginated": "",
    "releaser": "",
    "scan_content": "",
    "scan_quality": "",
    "scan_size": "",
    "scan_type": "",
    "scanned": "",
    "scimag_archive_path": "10.2307\\25311768.pdf",
    "scimag_id": "25757210",
    "standarts_id": "0",
    "time_added": "2014-08-09 08:56:11",
    "time_last_modified": "2021-07-20 20:31:12",
    "vector": "",
    "visible": ""
  }
}

2. View file details in a browser by typing this URL: "https://libgen.lc/file.php?md5=2da991ccc4cd63d23196a5c4a63a71ef".

file.php API - View File Details
file.php API - View File Details

3. Download file details in HTML code:

fyicenter$ curl -L 'https://libgen.lc/file.php?md5=2da991ccc4cd63d23196a5c4a63a71ef'

...
<div>
<p><strong>Scimag Repository ID:</strong> 25757210</p>
</div>
<div>
<h4>Editions:</h4>
<a href="/edition.php?id=32149882">[2913 iss. 1] Alfred Stieglitz - One Hour's Sleep: ...
</div>
<div>
<strong>Filesize:</strong> <nobr>212 kB (216912 B)</nobr>
<p>
<strong>Extension:</strong> pdf<p>
<strong>Add/File Create:</strong> 2000-01-01 05:00:00</p>
<p>
<strong>Topic:</strong> Scientific Articles</p>
<p>
<strong>Path in archive:</strong> 10.2307\25311768.pdf</p>
</div>
<div>
<h4>Hashes: </h4>
<strong>MD5: </strong>
</label>2da991ccc4cd63d23196a5c4a63a71ef</div> </div>  
...

 

edition.php - Edition View API

Download API Options for "files" Objects

Library Genesis API

⇑⇑ LibGen (Library Genesis) - Frequently Asked Questions

2023-09-03, 337🔥, 0💬