qstringआवश्यक
q
https://api.sandbase.ai/v1/api/polymarket/public-searchSearch markets, events, and profiles from Polymarket. Returns the official Polymarket API response unchanged.
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
Searches Polymarket for events that match a text query. Each event includes its markets, tags, and status. The only required input is q, a search string such as election.
curl -X POST "https://api.sandbase.ai/v1/api/polymarket/public-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "election"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | q |
ascending | boolean | No | ascending |
cache | boolean | No | cache |
events_status | string | No | events_status |
events_tag | array | No | events_tag |
exclude_tag_id | array | No | exclude_tag_id |
keep_closed_markets | integer | No | keep_closed_markets |
limit_per_type | integer | No | limit_per_type |
optimized | boolean | No | optimized |
page | integer | No | page |
recurrence | string | No | recurrence |
search_profiles | boolean | No | search_profiles |
search_tags | boolean | No | search_tags |
sort | string | No | sort |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"events": [
{
"active": true,
"archived": false,
"closed": true,
"closedTime": "2023-11-08T07:31:57Z",
"commentCount": 17,
"commentsEnabled": false,
"competitive": 0,
"createdAt": "2023-11-06T15:52:14.553Z",
"creationDate": "2023-11-06T16:29:08.874Z",
"cyom": false,
"deploying": false,
"description": "This market will resolve to \"Presley\" if Brandon Presley (D) wins the 2023 Missi…"
}
],
"pagination": {
"hasMore": true,
"totalResults": 4713
}
}
| Field | Meaning |
|---|---|
events[].title | Display name of the event, for example the election being bet on. |
events[].slug / events[].ticker | Text identifier for the event. Use the slug to look up the event on its own. |
events[].id | Event ID as a string. |
events[].active / events[].closed / events[].archived | Status flags for the event. A closed event has ended trading, and closedTime shows when it closed. |
events[].startDate / events[].endDate | Start and end dates of the event in ISO 8601 format. |
events[].description | Resolution rules and background text for the event. Long text may be cut. |
events[].markets[] | The markets inside the event. Each one has fields such as bestBid, bestAsk, acceptingOrders, and clobTokenIds. |
events[].markets[].bestBid / events[].markets[].bestAsk | Best bid and best ask price for the market. |
events[].tags[].label / events[].tags[].slug | Name and slug of each tag on the event, such as Politics or election. |
pagination.hasMore / pagination.totalResults | hasMore tells you if more results exist. totalResults is the total number of matches. |
page to move through results. Check pagination.hasMore to see if another page exists.clobTokenIds is a JSON string that holds a list of token IDs. Parse it before use.slug to Polymarket Get event by slug to fetch a single event.id to Polymarket Get event by id for the same purpose.$0.012 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
curl -X POST "https://api.sandbase.ai/v1/api/polymarket/public-search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "election"
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
qstringआवश्यकq
ascendingbooleanascending
cachebooleancache
events_statusstringevents_status
events_tagarrayevents_tag
exclude_tag_idarrayexclude_tag_id
keep_closed_marketsintegerkeep_closed_markets
limit_per_typeintegerlimit_per_type
optimizedbooleanoptimized
pageintegerpage
recurrencestringrecurrence
search_profilesbooleansearch_profiles
search_tagsbooleansearch_tags
sortstringsort
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
| API | कीमत | प्रतिक्रिया |
|---|---|---|
Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
Polymarket | $0.012 प्रति कॉल | JSON |
प्रश्न
https://api.sandbase.ai/v1/api/polymarket/public-search पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.012 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: q (string)। वैकल्पिक: ascending (boolean), cache (boolean), events_status (string), events_tag (array), exclude_tag_id (array) और keep_closed_markets (integer) और 7 और। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।
नहीं। Polymarket Search markets, events, and profiles SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Polymarket API access के लिए आवेदन करने की आवश्यकता नहीं है।