Discover/shamela.ws API
live

shamela.ws APIshamela.ws

Access the Shamela Islamic digital library via API. Browse categories, search books by title or full text, read page content, and explore authors.

Endpoints
9
Updated
10d ago
Try it

No input parameters required.

api.parse.bot/scraper/fea100ca-ae6c-4130-8469-4b1f65d5931e/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/fea100ca-ae6c-4130-8469-4b1f65d5931e/get_categories' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 9 totalclick to expand

Get all book categories from the Shamela library homepage. Returns an array of category objects with their IDs, names, book counts, and URLs.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "data": "array of category objects, each with id, name, book_count, and url",
    "status": "string indicating success"
  },
  "sample": {
    "data": [
      {
        "id": "1",
        "url": "https://shamela.ws/category/1",
        "name": "العقيدة",
        "book_count": 807
      },
      {
        "id": "12",
        "url": "https://shamela.ws/category/12",
        "name": "القواعد الفقهية",
        "book_count": 55
      }
    ],
    "status": "success"
  }
}

About the shamela.ws API

The Shamela.ws API exposes 9 endpoints covering the full depth of one of the largest Arabic Islamic book collections online. You can retrieve category listings, fetch paginated book lists, pull structured metadata and tables of contents per book, read individual page text, and run full-text searches across the entire corpus. The get_book_page endpoint, for example, returns the actual Arabic text of any numbered page alongside the book title and author.

Browsing and Discovery

The get_categories endpoint returns all top-level categories from the Shamela library, each with an id, name, book_count, and url. Feed those category IDs into get_books_by_category to paginate through books within a category — the response includes a has_next boolean so you can walk pages until the collection is exhausted. For a broader sweep, list_all_books iterates across multiple categories up to a configurable limit, returning each book's id, title, author, category, url, and metadata in one array.

Book Details and Reading

Call get_book_details with a book_id to receive full publication metadata — author, publisher, edition details — alongside a structured toc array linking to individual sections. Once you have a section or page reference, get_book_page returns the Arabic text content for that specific page_number within the book, along with book_title and author. The get_recently_added endpoint surfaces the latest additions to the library without any parameters, returning id, title, author, and url for each entry.

Search

Two distinct search modes are available. search_books_by_name queries by title using a keyword (query in Arabic) and returns matching books with id, title, and url — useful for autocomplete-style lookups. search_books_by_content performs full-text search across the book corpus, returning paginated results where each match includes a snippet of the surrounding text, title, author, and url. Both endpoints expect Arabic-language queries.

Author Data

get_author_books accepts an author_id and returns the author's name alongside an array of all their works, each with id, title, and url. Author IDs can be obtained from book metadata returned by other endpoints — for instance, al-Bukhari's books are reachable via author ID 215.

Common use cases
  • Build an Arabic Quran and Hadith research tool using search_books_by_content to surface relevant passages with surrounding context snippets.
  • Construct a browsable category index of Islamic texts by chaining get_categories with get_books_by_category pagination.
  • Generate author bibliographies by feeding author IDs from book metadata into get_author_books.
  • Create a 'new arrivals' feed for an Islamic library app using get_recently_added.
  • Build a page-by-page reader for classical Arabic texts using get_book_page with sequential page_number increments.
  • Populate a book metadata database with titles, publication details, and tables of contents via get_book_details.
  • Implement Arabic book title autocomplete by querying search_books_by_name on user keystrokes.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Shamela.ws have an official developer API?+
Shamela.ws does not publish a documented public developer API. This Parse API provides structured programmatic access to the library's data.
What does `search_books_by_content` return beyond a list of matching books?+
Each result in the results array includes a snippet — a short excerpt of the book text containing the matched term — along with title, author, and url. Results are paginated and you can pass a page integer to walk through additional matches.
Are there any language limitations for search queries?+
Both search_books_by_name and search_books_by_content expect Arabic-language query strings. Transliterated or non-Arabic queries are unlikely to return useful results, given the library's Arabic-language corpus.
Does the API expose user annotations, reading lists, or personal library features from Shamela accounts?+
No. The API covers public catalog data: categories, book metadata, page text, author bibliographies, and search results. User account features, personal reading lists, and annotations are not exposed. You can fork this API on Parse and revise it to add endpoints targeting any publicly accessible account or community data.
Can I retrieve an entire book's text in one request?+
The API retrieves one page at a time via get_book_page, which requires both a book_id and a page_number. There is no single-call endpoint that returns a full book's text. You can fork this API on Parse and revise it to add a bulk-page retrieval endpoint if your use case requires it.
Page content last updated . Spec covers 9 endpoints from shamela.ws.
Related APIs in EducationSee all →
arxiv.org API
Search and discover academic research papers on arXiv using keywords, authors, titles, categories, and dates, then access detailed metadata for any paper. Browse the complete arXiv category taxonomy to explore research across different scientific disciplines.
kenpom.com API
Access comprehensive college basketball analytics and ratings including team efficiency stats, four factors, point distribution, and detailed team statistics from KenPom's renowned basketball evaluation system. Search teams and coaches, retrieve conference-specific ratings, and explore advanced metrics across Division I college basketball.
springer.com API
Search and retrieve metadata for millions of articles, books, and journals from Springer Nature's research library using DOI or ISBN lookups, with powerful filtering and pagination options. Get detailed information about academic publications including journal details, article metadata, and book information to power your research tools and discovery applications.
maxpreps.com API
Access high school sports data from MaxPreps. Search for schools, retrieve team rosters and schedules, look up athlete profiles, and browse national or state rankings across all sports.
amberstudent.com API
Search student accommodation listings across popular cities and access comprehensive property information including room types, pricing trends, and tenant reviews. Get detailed insights into student housing options to compare amenities, prices, and community feedback all in one place.
ieeexplore.ieee.org API
Search for scientific papers and retrieve their metadata, abstracts, references, and citations from IEEE Xplore's collection of journals and conferences. Look up author profiles, browse journals, and access paper details and full text sections all programmatically.
josaa.nic.in API
Access JoSAA (Joint Seat Allocation Authority) admission data for IITs, NITs, IIITs, and GFTIs. Retrieve opening and closing ranks by institute, program, category, quota, and round for the current counselling session as well as historical data from 2016 onwards. Also query seat matrices and full institute details.
ncaa.com API
Access live college sports scores, game schedules, detailed boxscores, play-by-play breakdowns, and team statistics across NCAA sports. Search for specific contests and retrieve comprehensive game information for any NCAA sport, division, or team.