{"openapi":"3.0.1","info":{"title":"Research Butler","description":"An API to search arXiv Scholar and return the first 10 results.","version":"v1.0"},"paths":{"/google_search/{query}":{"get":{"operationId":"get_google_search_results","summary":"Get pubmed results","description":"Retrieves search results from Google Custom Search based on the query parameter.","parameters":[{"in":"path","name":"query","schema":{"type":"string"},"required":true,"description":"The search query to use when fetching results from Google Custom Search."},{"in":"query","name":"page","schema":{"type":"integer","default":1,"minimum":1},"required":false,"description":"The page number to fetch results for, with each page containing up to 5 results."},{"in":"query","name":"num","schema":{"type":"integer","default":1,"minimum":1,"maximum":5},"required":false,"description":"The page number to fetch results for, with each page containing up to 8 results."},{"in":"query","name":"start_date","schema":{"type":"string","format":"date"},"required":false,"description":"The start date for the date range filter in the format YYYYMMDD."},{"in":"query","name":"end_date","schema":{"type":"string","format":"date"},"required":false,"description":"The end date for the date range filter in the format YYYYMMDD."}],"responses":{"200":{"description":"Search results retrieved successfully","content":{"application/json":{"schema":{"type":"object","description":"The search results in JSON format.","properties":{"assistant":{"type":"string","description":"Assistant's message about the total results found."},"Data":{"type":"object","description":"The raw data retrieved from the Google Custom Search API."},"assistant_message":{"type":"string","description":"Assistant's message guiding the user to ask for more results."},"current_page":{"type":"integer","description":"The current page number of the search results."},"total_results":{"type":"integer","description":"The total number of search results found."},"results":{"type":"array","items":{"type":"object","description":"An array of search result items.","properties":{"index":{"type":"integer","description":"The index of the search result item."},"title":{"type":"string","description":"The title of the search result item."},"link":{"type":"string","description":"The link to the search result item."},"snippet":{"type":"string","description":"A snippet of the search result item."}}}}}}}}},"500":{"description":"Server error, e.g., the server encountered a situation it doesn't know how to handle, such as an unexpected exception."}}}},"/get_full_abstract_pdf":{"post":{"operationId":"read_pdf","summary":"get PDF from a given URL and extract . use this for arxiv abstract abstraction. example https://arxiv.org/abs/2005.10488v1 is https://arxiv.org/pdf/2005.10488v1.pdf Let the user specify which part of the PDF they want extracted. In the next step.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pdf_url":{"type":"string","format":"uri","description":"The URL of the PDF to be read."}},"required":["pdf_url"],"example":{"pdf_url":"https://example.com/sample.pdf"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"},"description":"The text content extracted from the PDF."}}},"example":{"data":["This is a paragraph from the PDF.","This is another paragraph from the PDF."]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"example":{"error":"Invalid PDF URL provided."}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"example":{"error":"Failed to read the PDF."}}}}}}},"/get_full_abstract":{"post":{"operationId":"get_full_abstract","summary":"do not use this route with arxiv only pubmed. for arxiv use read_pdf route. get the full abstract from one of the links from the search also activate the get pdf function. If this is activated by the compare function, we just want to summmarize and compare .","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the website to be scraped."}},"required":["url"],"example":{"url":"https://example.com"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"},"description":"The text content scraped from the website."}}},"example":{"data":["This is a paragraph from the website.","This is another paragraph from the website."]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"example":{"error":"Invalid URL provided."}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"example":{"error":"Failed to scrape the website."}}}}}}},"/compare":{"post":{"operationId":"compare_url","summary":"dont use this method with arxiv scrape the url passed in by the user, . if its pubmed use get_full_abstract method. if its arxiv or a pdf use read_pdf. do not scrape url with arxiv. only pubmed. then summarize both and do a compare.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the website to be scraped."}},"required":["url"],"example":{"url":"https://example.com"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"},"description":"The text content scraped from the website."}}},"example":{"data":["This is a paragraph from the website.","This is another paragraph from the website."]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"example":{"error":"Invalid URL provided."}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"example":{"error":"Failed to scrape the website."}}}}}}},"/compare_external_pdf":{"post":{"operationId":"compare_url_pdf","summary":"active the get read_pdf method then compare findings with a specified previous link if the user has one (activate full abstract for that link) ","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the website to be scraped."}},"required":["url"],"example":{"url":"https://example.com"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"},"description":"The text content scraped from the website."}}},"example":{"data":["This is a paragraph from the website.","This is another paragraph from the website."]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"example":{"error":"Invalid URL provided."}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"example":{"error":"Failed to scrape the website."}}}}}}},"/Step1_make_pdf/{query}":{"get":{"operationId":"generate_data","summary":"Retrieve data from any previous items and make neat before the next method which makes pdf.","parameters":[{"in":"path","name":"query","schema":{"type":"string"},"required":true,"description":"The query and data are fetched."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}}},"example":{"data":[]}}}}}}}},"/Step2_make_pdf":{"post":{"operationId":"save_to_s3_pdf","summary":"Convert data to PDF document using ReportLab and save to S3.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}}},"example":{"data":["item1","item2","item3"]}}}}},"parameters":[{"in":"query","name":"include_headers","schema":{"type":"boolean","default":true},"description":"Whether to include headers in the generated PDF document."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}},"example":{"url":"https://s3.example.com/uploaded_data.pdf"}}}}}}},"/scholar/{query}":{"get":{"operationId":"get_arXiv_results","summary":"Fetch the first 10 results from arXiv based on a query","parameters":[{"name":"query","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"abstract":{"type":"string"}}}}}}},"500":{"description":"Internal Server Error"}}}}},"servers":[{"url":"https://plugin.anygpt.ai"}]}