Skip to content

Ao3.js

AO3.js logo

Scrapes data from ao3.org and beyond. Now with Types™.

Cause this is a test. You can find the full library and readme on the AO3.js GitHub repo.

AO3.js is a Node.js library for fetching Archive of Our Own data from your own JavaScript (or TypeScript!) server or command line tool. It provides an easy-to-use interface for retrieving information like tags, works, series, and more, from any AO3-compatible archive.

MethodDescriptionParametersReturn Type
getTagRetrieves details for a specific AO3 tag.{ tagName: string } - Name of the tag.Promise<Tag>
getTagNameByIdGets tag name based on its ID.{ tagId: string } - Tag ID to look up.Promise<string>
getWorkFetches metadata for an AO3 work.{ workId: string, chapterId?: string } - The work ID, with optional chapter ID.Promise<WorkSummary> | Promise<LockedWorkSummary>
getWorkWithChaptersFetches a work and its chapter list.{ workId: string } - The ID of the work.Promise<{ title: string; authors: Author[] | Anonymous; workId: string; chapters: Chapter[] }>
getSeriesRetrieves details for a specific series.{ seriesId: string } - The ID of the series.Promise<Series>
getUserFetches profile information for a user.{ username: string } - Username of the user to fetch.Promise<User>
setFetcherSets a custom fetch function for requests.{ fetcher: typeof fetch } - Custom fetch function.void