<div class="content__inner">
<h2>Search posts</h2>
<p>
Please use this <strong>(<?php echo cl_link("mobile_api/search_posts"); ?>)</strong> API to access posts searching endpoint
</p>
<br>
<h4 class="table-title">Get parameters</h4>
<table class="table table-bordered">
<thead>
<tr>
<th width="15%">Field</th>
<th width="25%">Value</th>
<th width="45%">Remarks</th>
</tr>
</thead>
<tbody>
<tr>
<td>query</td>
<td>Search keywords</td>
<td>
E.g. `how to get followers`
</td>
</tr>
<tr>
<td>offset</td>
<td>Last post offset ID</td>
<td>
This is only needed when loading posts of the pagination system.
</td>
</tr>
<tr>
<td>session_id (Optional)</td>
<td>Access token ID</td>
<td>
E.g. de25cc16eb00960f076...
</td>
</tr>
<tr>
<td>page_size</td>
<td>Total post limit for each request</td>
<td>
Recommended: 20
</td>
</tr>
</tbody>
</table>
<h4 class="table-title">Success response</h4>
<div class="code-holder">
<div class="code-holder-inner">
<pre><code class="json">{
"code": 200,
"message": "Results found",
"data": [
{
"id": 72,
"user_id": 7,
"text": "how to get more twitter followers",
"type": "text",
"replys_count": "0",
"reposts_count": "0",
"likes_count": "0",
"status": "active",
"thread_id": 0,
"target": "publication",
"og_data": "",
"time": "3 minutes ago",
"advertising": false,
"time_raw": "1605783333",
"og_text": "how to get more twitter followers",
"og_image": "statics/img/logo.png",
"url": "http://colibri.loc/thread/72",
"can_delete": false,
"media": [],
"is_owner": false,
"has_liked": false,
"has_saved": false,
"has_reposted": false,
"reply_to":[],
"owner":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"offset_id": 72
}
]
}
</code></pre>
</div>
</div>
<h4 class="table-title">Error responses</h4>
<div class="code-holder">
<div class="code-holder-inner">
<pre><code class="json">{
"code": 204,
"message": "No data found",
"data": []
}
{
"code": 400,
"message": "The search term is invalid or missing",
"data": []
}
</code></pre>
</div>
</div>
</div>