[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-489341-105":59,"doc-detail-489341-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","r4r-template-based-rest-api-framework-for-rdf-knowledge-graphs","R4R - Template-based REST API Framework for RDF Knowledge Graphs","","R4R is an open source framework for publishing RDF knowledge graphs through customizable REST APIs backed by SPARQL queries. It addresses limitations of existing REST wrappers that rely on rigid configuration files or ontology-driven approaches by using web standards and REST principles to expose web resources from a hierarchical file-system organization. Key features include individual and nested resources, paginated queries, optional fields, web authentication, query parameters, and sorting lists.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/r4r-template-based-rest-api-framework-for-rdf-knowledge-graphs/489341/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/r4r-template-based-rest-api-framework-for-rdf-knowledge-graphs/489341.png","ImageObject",300,407,{"name":92,"@type":93},"Lucas Martin","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-24","2026-10-01",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",14,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What problem does R4R address for knowledge graph access?","Question",{"text":113,"@type":114},"R4R addresses the mismatch between REST API resource structures and knowledge graph querying needs, especially when existing approaches impose content-based or structural constraints and are difficult for non-experts to use.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How does R4R generate REST APIs from SPARQL?",{"text":118,"@type":114},"R4R deploys a web service that uses SPARQL queries to retrieve information, and it provides templates so that API resources can be composed and organized through a hierarchical directory structure.",{"name":120,"@type":111,"acceptedAnswer":121},"What key features does R4R offer in its REST interface?",{"text":122,"@type":114},"R4R supports individual and nested resources, paginated queries, optional fields, web authentication, query parameters, and sorting lists.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},489341,1793030982,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":24,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145,"preview_page_count":19,"preview_urls":146},8796095360427,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","R4R: Template-based REST API Framework for RDF Knowledge Graphs  \nCarlos Badenes-Olmedo [0000􀀀0002􀀀2753􀀀9917], Paola  \nEspinoza-Arias [0000􀀀0002􀀀3938􀀀2064], and Oscar Corcho [0000􀀀0002􀀀9260􀀀0753]  \nOntology Engineering Group, Universidad Polit􀀓ecnica de Madrid Boadilla del Monte, Spain  \nfcbadenes, pespinoza, ocorchog@fi .upm .es  \nAbstract. Knowledge graphs (KGs) are increasingly being used to make structured information available on the Web, by means of REST APIsand/or SPARQL endpoints. In many cases, these REST APIs are generated on top of the SPARQL endpoints, using existing technology approaches that are based on proprietary con􀀌guration 􀀌les or ontologies to create the APIs. These approaches may impose content-based or structural constraints when composing Web resources. To relax these constraints we propose R4R, a more 􀀍exible solution based on Web standards and REST principles that creates and publishes customizable APIs exposing Web resources from SPARQL queries organized in 􀀌le system directories. R4R features include individual and nested resources, paginated queries, optional 􀀌elds, web authentication, query parameters and sorting lists.  \nResource type: Software  \nLicense: Apache License 2.0  \nDOI: [https://doi.org/10.5281/zenodo.3543320](https://doi.org/10.5281/zenodo.3543320)  \n[Keywords:](Keywords: API)[ API](Keywords: API) · Knowledge Graph · REST · SPARQL  \n1 Introduction  \nKnowledge graphs (KGs) are drawing increasing attention from both academia and industry for representing, sharing and using knowledge in applications [7, 3] . They may be made available as RDF-based datasets, including a SPARQL endpoint (e.g., DBpedia), and/or via REST APIs (e.g., Google Knowledge Graph) . In both cases, KGs share many commonalities from the data representation point of view (both use triples to represent facts), but they are radically di􀀋erent in terms of query capabilities: SPARQL provides a more expressive query language than what can be normally done with a REST API, but it can be a barrier for non-expert users. Web APIs usually present data according to REpresentative State Transfer (REST) architecture principles mapping [HTTP](HTTP) verbs (POST, GET, PUT, DELETE) to CRUD operations (Create, Read, Update, Delete) .  \nCopyright © 2021 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0)  \nFig. 1. Step-by-step processing of a request in R4R  \nHowever, API resources do not necessarily match to KG resources. A public procurement-focused API and a technology-focused API may present, in a different way, the information retrieved from the same KG about companies. One more focused on merit and the other on innovations.  \nIn this demo we present R4R, an open source framework that facilitates the publication of a KG via a REST API over [HTTP. Our](HTTP. Our) approach proposes a fully customizable de􀀌nition of resources, both naming and content (and even nesting), through a hierarchical organization of data (Figure 1) . It deploys a web service based on SPARQL queries to retrieve the information and provides templates to compose resources that are organized in folders in a system directory. Finally, we describe a motivating example where R4R is used to enhance KG access.  \n2 KG data consumption via Web API  \nSeveral approaches are available to provide Web developers with mechanisms to ease KG data consumption without dealing with the complexity of Semantic Web standards and technologies, namely SPARQL. Some of these approaches have been focused on the provision of Web APIs that allow developers to interact with KG data. There are tools [1][5] that generate Web APIs from set of SPARQL queries but require setting up programming environments or use 􀀌xed structures for resources. Others [4] proposed a SPARQL Transformer to providespeci􀀌c JSON structures from the SPARQL queries but this prevents validating SPARQL queries from any SPARQL endpoint, or [2] creates a Web se","cbCaiiRMqf1Nfszw","https://ap.wps.com/l/cbCaiiRMqf1Nfszw","pdf",629997,"English","# Introduction\n## KG data consumption via Web API\n# R4R","[{\"question\":\"What problem does R4R address for knowledge graph access?\",\"answer\":\"R4R addresses the mismatch between REST API resource structures and knowledge graph querying needs, especially when existing approaches impose content-based or structural constraints and are difficult for non-experts to use.\"},{\"question\":\"How does R4R generate REST APIs from SPARQL?\",\"answer\":\"R4R deploys a web service that uses SPARQL queries to retrieve information, and it provides templates so that API resources can be composed and organized through a hierarchical directory structure.\"},{\"question\":\"What key features does R4R offer in its REST interface?\",\"answer\":\"R4R supports individual and nested resources, paginated queries, optional fields, web authentication, query parameters, and sorting lists.\"}]","R4R - Template-based REST API Framework for RDF Knowledge Graphs | PDF",1790822333,13,[147,151,155,159],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/69b71ef2fa4c4355bdaf85a1d9f40206.webp",983,1272,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/7501f92c046727f03bc9167c1fede42d.webp",982,1270,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/dcc496bce87c50dd3878b0d4ff726f63.webp",981,1269,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/8d2f0f1bf2b7feed372048c608021a2f.webp",980,1268]