SciSpace
SciSpace · Ações GPT
GPT Store API
This is an API for a research paper backend. You can use this API to search for papers and get insights.
POST /api/v2/gpt/vector-search/Vector search in papersGet the vector search results when a search term is applied. This is used for the Global search.
POST /api/v2/gpt/papers/context/Get Context for PapersGet the context for the list of papers to add a column to the GPT search table.
Esquema API original
{
"openapi": "3.1.0",
"info": {
"version": "2.0.0",
"title": "GPT Store API",
"termsOfService": "https://example.com/terms/",
"contact": {
"email": "contact@example.com",
"url": "http://example.com/contact"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-logo": {
"url": "https://redocly.github.io/openapi-template/logo.png"
},
"description": "This is an API for a research paper backend. You can use this API to search for papers and get insights.\n"
},
"servers": [
{
"url": "https://scispace.com"
}
],
"paths": {
"/api/v2/gpt/vector-search/": {
"post": {
"security": [
{
"api_key_auth": []
}
],
"tags": [
"Search"
],
"summary": "Vector search in papers",
"description": "Get the vector search results when a search term is applied. This is used for the Global search.",
"x-openai-isConsequential": false,
"operationId": "vectorSearch",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"search_term": {
"type": "string",
"description": "The search term to apply."
},
"sort": {
"type": "string",
"description": "The sort order to apply. For time based sorting use newest_first and oldest_first",
"enum": [
"relevance",
"newest_first",
"oldest_first"
]
},
"filter_info": {
"type": "object",
"description": "Filters to be applied on search",
"properties": {
"year": {
"type": "string",
"description": "papers published between specific years"
},
"publication_type": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"page_info": {
"type": "object",
"description": "API pagination details. The pagination follows zero-based indexing. This means the first page is indexed as 0.",
"properties": {
"page": {
"type": "integer",
"description": "Page number to retrieve starting from zero"
},
"page_size": {
"type": "integer",
"description": "Number of entities required per page"
}
}
}
},
"required": [
"search_term",
"sort",
"filter_info",
"page_info"
]
},
"examples": {
"example 1": {
"summary": "Sample request on a query with no filters",
"value": {
"search_term": "How to increase immunity in men ?",
"sort": "relevance",
"filter_info": {},
"page_info": {
"page": 0,
"page_size": 5
}
}
},
"example 2": {
"summary": "Sample request on a query with filters",
"value": {
"search_term": "Papers on IC engines published between 2020 and 2023 ?",
"sort": "relevance",
"filter_info": {
"has_pdf": true,
"is_oa": true,
"year": "2020,2023",
"publication_type": []
},
"page_info": {
"page": 0,
"page_size": 5
}
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/Success"
}
}
}
},
"/api/v2/gpt/papers/context/": {
"post": {
"security": [
{
"api_key_auth": []
}
],
"tags": [
"Paper Info"
],
"summary": "Get Context for Papers",
"description": "Get the context for the list of papers to add a column to the GPT search table.\n",
"x-openai-isConsequential": false,
"operationId": "getContextForPapers",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Request"
},
"examples": {
"200": {
"summary": "Example of fetching context for papers",
"description": "This is the example to fetch context for the list of papers.\n",
"value": {
"question": "What are Potential Biases",
"entity_full_slugs": [
"effect-of-vitamin-d-on-cognitive-function-and-white-matter-2jho07ez4v",
"cognitive-intraindividual-variability-and-white-matter-5az9sa8t9h"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Response"
},
"examples": {
"200": {
"summary": "Success response for fetching context for papers",
"description": "This is the success response for fetching context for the list of papers.\n",
"value": {
"data": [
{
"type": "object",
"paper_slug": "cognitive-intraindividual-variability-and-white-matter-5az9sa8t9h",
"context": [
"The intraindividual variability (IIV) of cognitive performance has been shown to increase with aging. While brain research has generally focused on mean performance, little is known about neural correlates of cognitive IIV. Nevertheless, some studies suggest that IIV relates more strongly than mean level of performance to the quality of white matter (WM). Our study aims to explore the relation between WM integrity and cognitive IIV by combining functional (fMRI) and structural (diffusion tensor imaging, DTI) imaging. Twelve young adults (aged 18–30 years) and thirteen older adults (61–82 years) underwent a battery of neuropsychological tasks, along with fMRI and DTI imaging. Their behavioral data were analyzed and correlated with the imaging data at WM regions of interest defined on the basis of (1) the fMRI-activated areas and (2) the Johns Hopkins University (JHU) WM tractography atlas. For both methods, fractional anisotropy, along with the mean, radial, and axial diffusivity parameters, was computed. In accord with previous studies, our results showed that the DTI parameters were more related to IIV than to mean performance. Results also indicated that age differences in the DTI parameters were more pronounced in the regions activated primarily by young adults during a choice reaction-time task than in those also activated in older adults."
]
},
{
"type": "object",
"paper_slug": "effect-of-vitamin-d-on-cognitive-function-and-white-matter-2jho07ez4v",
"context": [
"Aim To examine the effect of vitamin D level on cognitive function and white matter hyperintensity (WMH) in patients with mild Alzheimer's disease (AD). Methods We recruited patients with mild AD, and carried out clinical interviews, neuropsychological assessments, laboratory tests and brain magnetic resonance imaging. Results In total, 146 patients"
]
}
]
}
}
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"api_key_auth": {
"type": "apiKey",
"in": "header",
"name": "Authorization"
}
},
"schemas": {
"Journal": {
"type": "object",
"title": "Journal",
"properties": {
"display_name": {
"description": "The display name of the journal.",
"type": "string"
},
"official_page": {
"description": "The official page of the journal.",
"type": "string"
},
"issn": {
"description": "The ISSN of the journal.",
"type": "string"
},
"alias": {
"description": "The alias of the journal.",
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"description": "The unique ID of the journal.",
"type": "integer"
},
"slug": {
"description": "The slug of the journal.",
"type": "string"
},
"unique_id": {
"description": "The unique ID of the journal.",
"type": "string"
},
"full_slug": {
"description": "The full slug of the journal.",
"type": "string"
}
}
},
"Author": {
"type": "object",
"title": "Author",
"properties": {
"display_name": {
"description": "The display name of the author.",
"type": "string"
},
"id": {
"description": "The unique ID of the author.",
"type": "integer"
},
"slug": {
"description": "The slug of the author.",
"type": "string"
},
"unique_id": {
"description": "The unique ID of the author.",
"type": "string"
},
"full_slug": {
"description": "The full slug of the author.",
"type": "string"
}
}
},
"Request": {
"type": "object",
"title": "Get Context For a question on List of Papers",
"properties": {
"question": {
"type": "string",
"description": "The question for the column asked by the user.\n"
},
"entity_full_slugs": {
"type": "array",
"items": {
"type": "string"
},
"description": "The full slugs of the papers."
}
},
"required": [
"question",
"entity_full_slugs"
]
},
"Response": {
"type": "object",
"title": "Generic Response to get context for a list of papers",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"paper_slug": {
"type": "string",
"description": "The full slug of the paper."
},
"context": {
"type": "array",
"items": {
"type": "string"
},
"description": "The context for the paper."
}
}
},
"description": "The context data for the papers. You should take into consideration the original language in which the user asked the question while consuming this endpoint. The context data is always in english, so you should translate this response to the original language of the user question and generate the final response in the same language in which user asked the question.\n"
}
}
}
},
"responses": {
"Success": {
"description": "Vector Search Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"description": "Total number of search results"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique ID of the paper."
},
"title": {
"type": "string",
"description": "The title of the paper."
},
"is_archived": {
"type": "boolean",
"description": "Whether the paper is archived."
},
"full_slug": {
"type": "string",
"description": "The full slug of the paper."
},
"journal": {
"$ref": "#/components/schemas/Journal"
},
"conference_series": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"description": "The display name of the conference series."
},
"official_page": {
"type": "string",
"description": "The official page of the conference series."
},
"id": {
"type": "integer",
"description": "The unique ID of the conference series."
},
"slug": {
"type": "string",
"description": "The slug of the conference series."
},
"unique_id": {
"type": "string",
"description": "The unique ID of the conference series."
},
"full_slug": {
"type": "string",
"description": "The full slug of the conference series."
}
}
},
"date": {
"type": "string",
"description": "The date of the paper."
},
"is_oa": {
"type": "boolean",
"description": "Whether the paper is open access."
},
"publication_type": {
"type": "string",
"description": "The publication type of the paper."
},
"doi": {
"type": "string",
"description": "The DOI of the paper."
},
"abstract": {
"type": "string",
"description": "The abstract of the paper."
},
"authors": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"description": "Total number of authors"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Author"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}