json.php API - Get "files" by IDs

Q

How to get "files" objects with Library Genesis API, json.php, for given file object IDs?

✍: FYIcenter.com

A

If you know the object ID of a file, you can get the file details by calling the Library Genesis API, json.php, with object=f and ids={id} parameters.

For example, the following call returns the first (ids=1) "files" object in pretty JSON format. It's a "comics" file and not associated with any "editions".

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

{
  "1": {
    "archive_dop_files_flag": "N",
    "archive_files_count": "31",
    "archive_files_pic_count": "31",
    "bookmarked": "",
    "broken": "N",
    "c2c": "",
    "cleaned": "",
    "color": "",
    "comics_id": "0",
    "commentary": "",
    "cover_exists": "1",
    "cover_info": "",
    "dpi": "400x400",
    "editable": "1",
    "extension": "cbr",
    "fiction_id": "0",
    "fiction_rus_id": "0",
    "file_create_date": "2015-05-19 23:04:13",
    "filesize": "36063270",
    "generic": "",
    "libgen_id": "0",
    "libgen_topic": "c",
    "locator": "V:\\comics\\_ENG_ORIG_PUBL\\_B\\Bongo\\Bongo Comics Free-For-All! 
      (2014)\\Bongo Comics Free-For-All! (FCBD 2015) (c2c) (GreenManGroup-DCP).cbr",
    "magz_id": "0",
    "md5": "d71da203041c872157f4df06db1687e2",
    "ocr": "",
    "orientation": "",
    "pages": "0",
    "paginated": "",
    "releaser": "",
    "scan_content": "",
    "scan_quality": "",
    "scan_size": "2048x3114",
    "scan_type": "",
    "scanned": "",
    "scimag_archive_path": "",
    "scimag_id": "0",
    "standarts_id": "0",
    "time_added": "2015-07-05 16:32:31",
    "time_last_modified": "2022-05-05 15:46:14",
    "vector": "",
    "visible": ""
  }
}  

Note that the "ids" parameter can take multiple IDs as a comma separated list. For example, the following call returns 5 "files" objects with IDs of 1, 11, 101, 1001, 10001.

fyicenter$ curl 'https://libgen.lc/json.php?object=f&ids=11,11,101,1001,10001'

 

json.php API - Get "files" by ID Range

json.php API - Get "works" Objects

Library Genesis API

⇑⇑ LibGen (Library Genesis) - Frequently Asked Questions

2022-10-11, 671🔥, 3💬