How to Use the GPTs Store Search API
The GPTs Store Search API is an interface for accessing GPTs data sharing, making it easy to search and retrieve relevant information within the GPTs Store. Whether you’re looking for specific types of GPTs, this API can assist you in quickly finding the information you need. It supports vector queries and has already vectorized the “title” and “description” fields for efficient searching. This article will guide you on how to use this API for keyword search and pagination.
Step 1: Obtain the API Access Code First, you’ll need to obtain the code to access the GPTs Store Search API.
You can use the following code to make API calls:
# Insert code here to access the GPTs Store Search API
POST https://api-py.gpt-stores.com/extra_data
{
"title": "copy",
"pageNum": "1",
"pageSize": 10
}
This is an interface that supports vector queries and includes two key parameters:
- title: This is the keyword you want to search for. In the code example above, we used the keyword “copy” as an example.
- pageNum: This is the page number of results you wish to retrieve. In the code example above, we used page number 1 as an example.
- pageSize: This is the number of results to be returned per page. In the code example above, we set it to return 10 results per page.
Step 2: Make API Calls and Retrieve Results Once you have prepared your API request with the specified parameters, you can send it to the API endpoint and wait for the response. The API will return a list of results containing the information related to your search keyword.
Here is an example API response:
{
"extra_data": [
{
"id": "257",
"title": "Copywriter",
"post_name": "copywriter",
"author": "",
"author_link": "",
"content": "Enter any URL and get sales copywriting suggestions for the page! - by Orren Prunckun",
"download_link": "https://chat.openai.com/g/g-rJ8laM2qH",
"cdn_featured_image": "https://pub-57126c955b3a48758c46f64859b40c2b.r2.dev/gpts-store-img/icon.png"
},
{
"id": "236",
"title": "Video Finder",
"post_name": "video-finder",
"author": "",
"author_link": "",
"content": "Find videos from famous website",
"download_link": "https://chat.openai.com/g/g-jNQg2cLJz",
"cdn_featured_image": "https://pub-57126c955b3a48758c46f64859b40c2b.r2.dev/gpts-store-img/DALL%C2%B7E%202023-11-07%2015.36.46%20-%20Create%20an%20icon%20representing%20a%20YouTube%20finder%20feature.%20The%20icon%20should%20be%20bold%20and%20simple%2C%20with%20a%20magnifying%20glass%20integrated%20into%20the%20classic%20YouTube%20.png"
},
]
}
The API response contains a set of related results, each of which includes the following information:
- id: A unique identifier for the result.
- title: The title of the result.
- post_name: The name of the result. to show more detail info , you can do go the link: https://gpt-stores.com/+${post_name}
- author: Information about the author.
- author_link: The author’s link.
- content: The content of the result.
- download_link: The GPTs Link in ChatGPT.
- cdn_featured_image: The featured image link for the result (if applicable).
You can extract and use this information from the API response as needed to fulfill your search requirements.
By following the steps outlined above, you can easily use the GPTs Store Search API to search and retrieve relevant content, making it suitable for integration into your projects. If you have any questions or need further assistance, please feel free to contact our support team.