Skip to content

Inspect Endpoint ​

The primary endpoint for media URL inspection. Supports profile-based projection, field selection, and expansion controls.

POST/api/v1/inspect

Analyzes a public URL to detect its MIME type, category, metadata, and streamability without fully downloading it.

Request ​

Body Parameters ​

FieldTypeRequiredDescription
urlstringYes
webhookUrlstringNoOptional webhook URL to receive asynchronous completion events.

Query Parameters ​

ParameterValuesDefaultDescription
profilefast, standard, fullstandardProjection profile controlling payload visibility
fieldsComma-separated namespace namesAllGraphQL-style field projection
expandembedHtml, rawHeadersNoneInclude normally-hidden fields
debugtrue, falsefalseEnable debug mode (required for some expansions)

Example Request ​

bash
curl -X POST "https://api.urlmediainspector.dev/api/v1/inspect?profile=full" \\
  -H "Content-Type: application/json" \\
  -d '{"url": "https://youtu.be/GLTTI1NFHus?si=okdNMy6_p0VSqZJG"}'

Response Envelope ​

Every response follows a consistent envelope structure. The envelope separates lifecycle truth, processing state, data payload, enrichment provenance, and projection metadata into distinct semantic layers.

jsonc
{
  "success": true,
  "responseSource": "fresh",       // "fresh" | "cache" | "inflight"
  "cached": false,
  "processing": {
    "status": "complete",           // "partial" | "complete"
    "completion": 1,                // 0.0 → 1.0
    "enrichmentsPending": false,
    "completedStages": ["semantic", "mediaFormat", "oembed"],
    "pendingStages": []
  },
  "data": { /* profile-projected payload */ },
  "enrichmentSources": { /* immutable provenance */ },
  "projection": { "profile": "full", "hiddenFields": [] }
}

HTTP Status Codes ​

StatusDescriptionWhen
200Inspection completeFAST, FULL, or cached STANDARD
202Enrichments processingSTANDARD on heavy media
400Invalid URL or bad requestError condition
403SSRF protection blocked the requestError condition
500Internal server errorError condition

Data Namespaces ​

The data block contains profile-projected namespaces. See Response Envelope for full namespace documentation.

NamespacePresenceDescription
identityAlwaysURL, final URL, canonical URL, MIME
semanticAlwaysKind, semantic type, title
playbackAlwaysStrategy, component, stream/download
metadataAlwaysFile info + category sub-object
providerProvider onlyName, confidence, detection method
previewProfile-dependentThumbnails, placeholders, palette
diagnosticsFULL onlyPerformance timings

Job Status ​

GET/api/v1/job/{id}

Retrieve the status of an asynchronous enrichment job. Job IDs are returned in 202 Accepted responses when STANDARD profile encounters heavy media.

Path Parameters ​

ParameterTypeDescription
idstringJob ID from the inspect response

Response ​

jsonc
{
  "job": {
    "id": "job_abc123",
    "status": "processing"   // "processing" | "complete"
  }
}

Infrastructure Documentation — Behavior-Driven, Schema-Governed