{"id":36687744,"url":"https://github.com/goark/aozora-api","last_synced_at":"2026-01-12T11:16:19.420Z","repository":{"id":39375546,"uuid":"201236154","full_name":"goark/aozora-api","owner":"goark","description":"APIs for Aozora-bunko RESTful Service by Golang","archived":false,"fork":false,"pushed_at":"2022-03-20T07:24:15.000Z","size":121,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T09:57:20.321Z","etag":null,"topics":["aozora-bunko","aozorahack","api-rest","api-wrapper","golang","golang-package"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-08T10:34:44.000Z","updated_at":"2024-01-14T20:50:56.000Z","dependencies_parsed_at":"2022-09-10T04:04:13.636Z","dependency_job_id":null,"html_url":"https://github.com/goark/aozora-api","commit_stats":null,"previous_names":["spiegel-im-spiegel/aozora-api"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/goark/aozora-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Faozora-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Faozora-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Faozora-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Faozora-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goark","download_url":"https://codeload.github.com/goark/aozora-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Faozora-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aozora-bunko","aozorahack","api-rest","api-wrapper","golang","golang-package"],"created_at":"2026-01-12T11:16:18.530Z","updated_at":"2026-01-12T11:16:19.414Z","avatar_url":"https://github.com/goark.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [aozora-api] -- APIs for Aozora-bunko RESTful Service by Golang\n\n[![check vulns](https://github.com/goark/aozora-api/workflows/vulns/badge.svg)](https://github.com/goark/aozora-api/actions)\n[![lint status](https://github.com/goark/aozora-api/workflows/lint/badge.svg)](https://github.com/goark/aozora-api/actions)\n[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/goark/aozora-api/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/goark/aozora-api.svg)](https://github.com/goark/aozora-api/releases/latest)\n\nThis package is required Go 1.16 or later.\n\n**Migrated repository to [github.com/goark/aozora-api][aozora-api]**\n\n## Usage of package\n\n### Import Package\n\n```go\nimport \"github.com/goark/aozora-api\"\n```\n\n### Search for Aozora-bunko Books Data\n\n```go\nbooks, err := aozora.DefaultClient().SearchBooks(\n    aozora.WithBookTitle(\"/天に積む宝/\"),\n    aozora.WithBookAuthor(\"富田倫生\"),\n)\n```\n\n### Lookup Aozora-bunko Book Data\n\n```go\nbook, err := aozora.DefaultClient().LookupBook(59489)\n```\n\n### Search for Aozora-bunko Persons Data\n\n```go\npersons, err := aozora.DefaultClient().SearchPersons(\n    aozora.WithPersonName(\"富田倫生\"),\n)\n```\n\n### Lookup Aozora-bunko Person Data\n\n```go\nperson, err := aozora.DefaultClient().LookupPerson(55)\n```\n\n### Search for Aozora-bunko Workers Data\n\n```go\nworkers, err := aozora.DefaultClient().SearchWorkers(\n    aozora.WithWorkerName(\"雪森\"),\n)\n```\n\n### Lookup Aozora-bunko Worker Data\n\n```go\nworker, err := aozora.DefaultClient().LookupWorker(845)\n```\n\n### Lookup Ranking data of Aozora-bunko\n\n```go\ntm, err := time.Parse(\"2006-01\", \"2019-01\")\nranking, err := aozora.DefaultClient().Ranking(tm)\n```\n\n## Entities for Aozora-bunko\n\n### Book type\n\n```go\n//Author is entity class of author and translator info.\ntype Author struct {\n    PersonID  int    `json:\"person_id\"`\n    LastName  string `json:\"last_name\"`\n    FirstName string `json:\"first_name\"`\n}\n\n//Book is entity class of book info.\ntype Book struct {\n    BookID                      int      `json:\"book_id\"`\n    Title                       string   `json:\"title\"`\n    TitleYomi                   string   `json:\"title_yomi\"`\n    TitleSort                   string   `json:\"title_sort\"`\n    Subtitle                    string   `json:\"subtitle\"`\n    SubtitleYomi                string   `json:\"subtitle_yomi\"`\n    OriginalTitle               string   `json:\"original_title\"`\n    FirstAppearance             string   `json:\"first_appearance\"`\n    NDCCode                     string   `json:\"ndc_code\"`\n    FontKanaType                string   `json:\"font_kana_type\"`\n    Copyright                   bool     `json:\"copyright\"`\n    ReleaseDate                 Date     `json:\"release_date\"`\n    LastModified                Date     `json:\"last_modified\"`\n    CardURL                     string   `json:\"card_url\"`\n    BaseBook1                   string   `json:\"base_book_1\"`\n    BaseBookPublisher1          string   `json:\"base_book_1_publisher\"`\n    BaseBookFirstEdition1       string   `json:\"base_book_1_1st_edition\"`\n    BaseBookEditionInput1       string   `json:\"base_book_1_edition_input\"`\n    BaseBookEditionProofing1    string   `json:\"base_book_1_edition_proofing\"`\n    BaseBookParent1             string   `json:\"base_book_1_parent\"`\n    BaseBookParentPublisher1    string   `json:\"base_book_1_parent_publisher\"`\n    BaseBookParentFirstEdition1 string   `json:\"base_book_1_parent_1st_edition\"`\n    BaseBook2                   string   `json:\"base_book_2\"`\n    BaseBookPublisher2          string   `json:\"base_book_2_publisher\"`\n    BaseBookFirstEdition2       string   `json:\"base_book_2_1st_edition\"`\n    BaseBookEditionInput2       string   `json:\"base_book_2_edition_input\"`\n    BaseBookEditionProofing2    string   `json:\"base_book_2_edition_proofing\"`\n    BaseBookParent2             string   `json:\"base_book_2_parent\"`\n    BaseBookParentPublisher2    string   `json:\"base_book_2_parent_publisher\"`\n    BaseBookParentFirstEdition2 string   `json:\"base_book_2_parent_1st_edition\"`\n    Input                       string   `json:\"input\"`\n    Proofing                    string   `json:\"proofing\"`\n    TextURL                     string   `json:\"text_url\"`\n    TextLastModified            Date     `json:\"text_last_modified\"`\n    TextEncoding                string   `json:\"text_encoding\"`\n    TextCharset                 string   `json:\"text_charset\"`\n    TextUpdated                 int      `json:\"text_updated\"`\n    HTMLURL                     string   `json:\"html_url\"`\n    HTMLLastModified            Date     `json:\"html_last_modified\"`\n    HTMLEncoding                string   `json:\"html_encoding\"`\n    HTMLCharset                 string   `json:\"html_charset\"`\n    HTMLUpdated                 int      `json:\"html_updated\"`\n    Translators                 []Author `json:\"translators\"`\n    Authors                     []Author `json:\"authors\"`\n}\n```\n\n### Person type\n\n```go\n//Person is entity class of person info.\ntype Person struct {\n    PersonID        int    `json:\"person_id\"`\n    LastName        string `json:\"last_name\"`\n    FirstName       string `json:\"first_name\"`\n    LastNameYomi    string `json:\"last_name_yomi\"`\n    FirstNameYomi   string `json:\"first_name_yomi\"`\n    LastNameSort    string `json:\"last_name_sort\"`\n    FirstNameSort   string `json:\"first_name_sort\"`\n    LastNameRoman   string `json:\"last_name_roman\"`\n    FirstNameRoman  string `json:\"first_name_roman\"`\n    DateOfBirth     Date   `json:\"date_of_birth\"`\n    DateOfDeath     Date   `json:\"date_of_death\"`\n    AuthorCopyright bool   `json:\"author_copyright\"`\n}\n```\n\n### Worker type\n\n```go\n//Worker is entity class of worker info.\ntype Worker struct {\n    WorkerID int    `json:\"id\"`\n    Name     string `json:\"name\"`\n}\n```\n\n### Ranking type\n\n```go\n//Ranking is entity class of ranking info.\ntype Ranking []struct {\n    BookID  int      `json:\"book_id\"`\n    Access  int      `json:\"access\"`\n    Title   string   `json:\"title\"`\n    Authors []string `json:\"authors\"`\n}\n```\n\n## Command Line Interface (Sample Code)\n\n### Install and Build\n\n```\n$ go get github.com/goark/aozora-api/cli/aozora-bunko\n```\n\n### Search for Aozora-bunko Books Data\n\n```\n$ aozora-bunko search books -t \"/天に積む宝/\" -a \"富田倫生\"\n```\n\n### Lookup Aozora-bunko Book Data\n\n```\n$ aozora-bunko lookup book 59489\n```\n\n### Search for Aozora-bunko Persons Data\n\n```\n$ aozora-bunko search persons -n \"富田倫生\"\n```\n\n### Lookup Aozora-bunko Person Data\n\n```\n$ aozora-bunko lookup person 55\n```\n\n### Search for Aozora-bunko Workers Data\n\n```\n$ aozora-bunko search workers -n \"雪森\"\n```\n\n### Lookup Aozora-bunko Worker Data\n\n```\n$ aozora-bunko lookup worker 845\n```\n\n### Lookup Ranking data of Aozora-bunko\n\n```\n$ aozora-bunko ranking 2019-01\n```\n\n## Reference\n\n- [aozorahack/pubserver2: Pubserver](https://github.com/aozorahack/pubserver2)\n- [aozorahack/aozora-cli](https://github.com/aozorahack/aozora-cli) : CLI by Python\n\n[aozora-api]: https://github.com/goark/aozora-api \"goark/aozora-api: APIs for Aozora-bunko RESTful Service by Golang\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoark%2Faozora-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoark%2Faozora-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoark%2Faozora-api/lists"}