API Reference
Complete REST API documentation for the apiJAV server plugin. All endpoints are public and require no authentication.
Base URL
Base Endpoint
https://your-server.com/wp-json/myvideo/v1
Authentication
All endpoints are fully public — no API keys or tokens required. Requests are open by default. Optional IP-based rate limiting can be configured on the server.
⚡
Rate Limiting — If the server has rate limiting enabled, excessive requests from a single IP will return HTTP 429. Contact your server administrator to whitelist your IP or raise the limit for bulk operations.
Response Headers
Paginated responses include these headers:
| Header | Description |
|---|---|
| X-WP-Total | Total number of matching posts across all pages. |
| X-WP-TotalPages | Total number of pages at the current per_page setting. |
| Access-Control-Allow-Origin | Always * — CORS is fully open. |
Endpoints
GET
/wp-json/myvideo/v1/posts
List posts with filtering & pagination
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| per_page | integer | 20 | Results per page. Max 1000. |
| page | integer | 1 | Page number. Use with X-WP-TotalPages header for pagination. |
| search | string | — | Keyword search against post title and content. |
| category | string | — | Filter by category name or numeric ID. |
| tag | string | — | Filter by tag slug or name. |
| actor | string | — | Filter by actor taxonomy slug. |
| studio | string | — | Filter by studio taxonomy slug. |
| orderby | string | date | Sort field: date, title, or views. |
| order | string | DESC | ASC or DESC. |
Example Request
URL
https://your-server.com/wp-json/myvideo/v1/posts?per_page=10&page=1&category=Uncensored
Live Test
Example Response
200 OK — Array of Post Objects
[
{
"id": 1042,
"title": "Sample Video Title",
"slug": "sample-video-title",
"date": "2024-11-15T12:00:00+09:00",
"thumbnail": "https://server.com/wp-content/uploads/thumb.jpg",
"duration": "01:23:45",
"categories": ["Uncensored", "Amateur"],
"tags": ["HD", "Blowjob"],
"actors": ["Yua Mikami"],
"studio": "Prestige",
"code": "ABP-123",
"views": 48293,
"likes": 1024,
"dislikes": 12,
"is_hd": true,
"embed_url": "https://server.com/?mvembed=TOKEN&id=1042",
"iframe_html": "<iframe src=\"...\" width=\"100%\" ...></iframe>",
"player_api": "https://server.com/wp-json/myvideo/v1/player/1042"
}
]
GET
/wp-json/myvideo/v1/posts/{id}
Get a single post by ID
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | WordPress post ID on the server. |
Example Request
URL
https://your-server.com/wp-json/myvideo/v1/posts/1042
Live Test
Response
Returns a single Post Object (same schema as the list endpoint). Returns HTTP 404 if the post doesn't exist or is not published.
GET
/wp-json/myvideo/v1/player/{id}
Get embed URL & iframe for a post
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | WordPress post ID on the server. |
🔒
Permanent Tokens — Embed URLs use permanent tokens that never expire. It is safe to store the
embed_url or iframe_html directly in your database.Example Request
URL
https://your-server.com/wp-json/myvideo/v1/player/1042
Live Test
Example Response
200 OK — Player Object
{
"post_id": 1042,
"embed_url": "https://server.com/?mvembed=abc123&id=1042",
"iframe_html": "<iframe src=\"https://server.com/?mvembed=...\" width=\"100%\" height=\"500\" frameborder=\"0\" allowfullscreen allow=\"autoplay; fullscreen; encrypted-media\" scrolling=\"no\"></iframe>",
"permanent": true
}
Code Examples
JS
JavaScript — Fetch with Pagination
JavaScript
const BASE = 'https://your-server.com/wp-json/myvideo/v1'; // Fetch page 1 with 100 results const response = await fetch( `${BASE}/posts?per_page=100&page=1&category=Uncensored` ); const total = parseInt(response.headers.get('X-WP-Total')); const totalPages = parseInt(response.headers.get('X-WP-TotalPages')); const posts = await response.json(); console.log(`Total: ${total} across ${totalPages} pages`); // Get embed URL for a specific post const player = await fetch(`${BASE}/player/1042`).then(r => r.json()); console.log(player.embed_url); // permanent — safe to store
PHP
PHP — WordPress wp_remote_get
PHP
$base = 'https://your-server.com/wp-json/myvideo/v1'; // Fetch posts $response = wp_remote_get( $base . '/posts?per_page=100&page=1' ); $posts = json_decode( wp_remote_retrieve_body( $response ), true ); $total = intval( wp_remote_retrieve_header( $response, 'x-wp-total' ) ); foreach ( $posts as $post ) { echo $post['title'] . "\n"; echo $post['embed_url'] . "\n"; // permanent embed URL } // Get player for single post $player = json_decode( wp_remote_retrieve_body( wp_remote_get( $base . '/player/1042' ) ), true ); echo $player['iframe_html']; // ready-to-output iframe
CLI
cURL — Command Line
bash
# List posts curl -s "https://your-server.com/wp-json/myvideo/v1/posts?per_page=10" \ -H "Accept: application/json" | jq . # Get total count from headers curl -sI "https://your-server.com/wp-json/myvideo/v1/posts?per_page=1" \ | grep -i "x-wp-total" # Get player embed URL curl -s "https://your-server.com/wp-json/myvideo/v1/player/1042" \ | jq .embed_url # Filter by category curl -s "https://your-server.com/wp-json/myvideo/v1/posts?category=Uncensored&per_page=100"
PY
Python — requests library
Python
import requests BASE = 'https://your-server.com/wp-json/myvideo/v1' # Fetch all pages def get_all_posts(category=None): all_posts = [] page = 1 while True: params = {'per_page': 100, 'page': page} if category: params['category'] = category r = requests.get(f'{BASE}/posts', params=params) posts = r.json() if not posts: break all_posts.extend(posts) total_pages = int(r.headers.get('X-WP-TotalPages', 1)) if page >= total_pages: break page += 1 return all_posts posts = get_all_posts('Uncensored') print(f'Total: {len(posts)} posts')
Response Schema
Post Object
| Field | Type | Description |
|---|---|---|
| id | integer | WordPress post ID on the server. |
| title | string | Post title, HTML-decoded. |
| slug | string | URL slug. |
| date | string | Publish date in ISO 8601 format. |
| thumbnail | string | Thumbnail image URL. |
| duration | string | Video duration as HH:MM:SS. |
| categories | string[] | Category names. |
| tags | string[] | Tag names. |
| actors | string[] | Actor names (custom taxonomy). |
| studio | string | Studio name (first term of custom taxonomy). |
| code | string | Video code/product ID. |
| views | integer | View count from post_views_count meta. |
| likes | integer | Like count. |
| dislikes | integer | Dislike count. |
| is_hd | boolean | true if HD quality. |
| embed_url | string | Permanent embed URL. Safe to store. |
| iframe_html | string | Ready-to-output <iframe> tag. |
| player_api | string | URL to the /player/{id} endpoint for this post. |
Player Object
| Field | Type | Description |
|---|---|---|
| post_id | integer | WordPress post ID. |
| embed_url | string | Permanent embed URL. |
| iframe_html | string | Full <iframe> tag, ready to echo. |
| permanent | boolean | Always true. Tokens never expire. |