API Reference
Complete REST API documentation for the apiJAV server plugin — v3.4.0. All read endpoints are fully public.
https://server.apijav.com/wp-json/myvideo/v1
All GET endpoints are fully public — no API keys required by default. Optional X-API-Key header support is available for private servers.
X-API-Key: your-secret-key X-Client-Site: https://your-client-site.com
Paginated responses include these standard WordPress REST API 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 on all endpoints. |
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 term slug or name. |
| studio | string | — | Filter by studio taxonomy term slug or name. |
| orderby | string | date | Sort field: date, title, or views. |
| order | string | DESC | ASC or DESC. |
| after | string | — | ISO 8601 date. Only return posts published after this date. |
Example Request
https://server.apijav.com/wp-json/myvideo/v1/posts?per_page=10&page=1&category=Uncensored&orderby=views&order=DESC
Live Test
Example Response
[
{
"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"
}
]
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | WordPress post ID on the server. |
Example Request
https://server.apijav.com/wp-json/myvideo/v1/posts/1042
Live Test
Returns a single Post Object (same schema as the list endpoint). Returns HTTP 404 if the post doesn't exist or isn't published.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | WordPress post ID on the server. |
embed_url or iframe_html directly in your database forever.Example Request
https://server.apijav.com/wp-json/myvideo/v1/player/1042
Live Test
Example Response
{
"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
}
Used by the APIJAV client plugin to register itself for push notifications. The server will POST new post data to the registered URL whenever a new video is published.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The client site's webhook receiver URL. |
| secret | string | Yes | HMAC shared secret for payload signing. |
Example
curl -X POST "https://server.apijav.com/wp-json/myvideo/v1/webhook/register" \
-H "Content-Type: application/json" \
-d '{"url":"https://yourclient.com/wp-json/mvapic/v1/webhook","secret":"your-hmac-secret"}'
This endpoint lives on your client site (installed by the APIJAV plugin). The server calls this URL when a new video is published, and the client auto-imports it.
Request Headers from Server
| Header | Description |
|---|---|
| X-MVAPIC-Signature | HMAC-SHA256 signature of the payload body, using the shared secret. |
| Content-Type | application/json |
Payload Body
{
"action": "new_post",
"post_id": 1042,
"server_url": "https://server.apijav.com"
}
The receiver verifies the HMAC signature, fetches the full post from /posts/{post_id}, and imports it locally. Returns 403 if the receiver is disabled or the signature is invalid.
const BASE = 'https://server.apijav.com/wp-json/myvideo/v1'; // Fetch page 1 with 100 results, filtered by category const response = await fetch( `${BASE}/posts?per_page=100&page=1&category=Uncensored&orderby=views&order=DESC` ); 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`); // Filter by studio const studio = await fetch(`${BASE}/posts?studio=Prestige&per_page=20`).then(r => r.json()); // 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
$base = 'https://server.apijav.com/wp-json/myvideo/v1'; // Fetch posts filtered by studio $response = wp_remote_get( $base . '/posts?per_page=100&page=1&studio=Prestige', [ 'headers' => [ 'X-Client-Site' => home_url() ], ] ); $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'] . ' — ' . $post['studio'] . "\n"; echo $post['embed_url'] . "\n"; // permanent } // 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
# List posts (newest first) curl -s "https://server.apijav.com/wp-json/myvideo/v1/posts?per_page=10" \ -H "Accept: application/json" | jq . # Get total count from headers curl -sI "https://server.apijav.com/wp-json/myvideo/v1/posts?per_page=1" \ | grep -i "x-wp-total" # Filter by category + studio curl -s "https://server.apijav.com/wp-json/myvideo/v1/posts?category=Uncensored&studio=Prestige&per_page=100" # Sort by most viewed curl -s "https://server.apijav.com/wp-json/myvideo/v1/posts?orderby=views&order=DESC&per_page=20" # Get player embed URL curl -s "https://server.apijav.com/wp-json/myvideo/v1/player/1042" \ | jq .embed_url
import requests BASE = 'https://server.apijav.com/wp-json/myvideo/v1' # Fetch all pages for a given filter def get_all_posts(category=None, studio=None, actor=None): all_posts = [] page = 1 while True: params = {'per_page': 100, 'page': page} if category: params['category'] = category if studio: params['studio'] = studio if actor: params['actor'] = actor 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(studio='Prestige') print(f'Total: {len(posts)} posts')
| 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). Empty array if not registered. |
| studio | string | Studio name (first term of studio custom taxonomy). |
| code | string | Video code/product ID. Used for duplicate detection. |
| views | integer | View count from post_views_count meta. |
| likes | integer | Like count from likes_count meta. |
| dislikes | integer | Dislike count. |
| is_hd | boolean | true if HD quality (hd_video meta is "on"). |
| embed_url | string | Permanent embed URL. Safe to store in database. |
| iframe_html | string | Ready-to-output <iframe> tag. |
| player_api | string | URL to the /player/{id} endpoint for this post. |
| 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. |
The APIJAV client plugin registers these endpoints on your client WordPress site for internal use and webhook integration.
| Endpoint | Method | Description |
|---|---|---|
| /wp-json/mvapic/v1/webhook | POST | Receives webhook pushes from the server. Verifies HMAC signature, auto-imports post. |
⬇ apijav-v3.4.0.zip — Free Download