> ## Documentation Index
> Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Import from Post URLs — Private

> Import specific TikTok, YouTube, or Instagram post URLs into your Private Video Library.

<Info>
  **Product**: Visual Search
  **Use case**: Upload videos and images, auto-index them, then search by natural language, image, or transcript phrase
  **Host**: `https://api.memories.ai/serve/api/v1`
  **Auth**: `Authorization: sk-mavi-...` (no `Bearer` prefix)
</Info>

Import up to **50 post URLs** in one request into your **Private Video Library** — searchable by your account only. All URLs must be from the same platform.

Related endpoints: [Import from Post URLs — Public](/visual-search/upload-from-post-urls-public) (shared library) · [Import from Creator Profile](/visual-search/upload-from-creator-profile) · [Import from Hashtag](/visual-search/upload-from-hashtag).

**Example URLs:**

```
TikTok:    https://www.tiktok.com/@cutshall73/video/7543017294226558221
Instagram: https://www.instagram.com/p/DNu8_Fs4mSd/
YouTube:   https://www.youtube.com/shorts/T2ThsydNQaM
```

## Prerequisites

* You have [created a memories.ai API key](/visual-search/create-your-key).

## Request Example

```python theme={null}
import requests

headers = {"Authorization": "sk-mavi-..."}
payload = {
    "video_urls": [
        "https://www.tiktok.com/@cutshall73/video/7543017294226558221",
        "https://www.tiktok.com/@abcnews/video/7543794552365124919"
    ],
    "folder_id": 671631448308117504,
    "callback_url": "https://your.app/callback",
    "quality": "1080"
}
response = requests.post(
    "https://api.memories.ai/serve/api/v1/scraper_url",
    json=payload,
    headers=headers
)
print(response.json())
```

## Parameters

<ParamField body="video_urls" type="array" required>
  List of post URLs to import. Combined with `tiktok_post_urls` (if provided), the total must not exceed **50 URLs**. All URLs must be from the same platform.
</ParamField>

<ParamField body="tiktok_post_urls" type="array">
  Additional TikTok post URLs. Merged server-side with `video_urls` before processing. Counts toward the 50-URL cap.
</ParamField>

<ParamField body="folder_id" type="integer">
  Optional. Target folder for the uploaded video(s). Omit (or pass `-1`) to store in your account's **Default folder** (created automatically on first use). Pass a folder id from [List Folders](/visual-search/list-folders) or [Create Folder](/visual-search/create-folder) to store in that folder — it must belong to your account, otherwise the request is rejected.
</ParamField>

<ParamField body="callback_url" type="string">
  URL to receive POST notifications on task progress and per-video indexing completion. The server also accepts the alias `callback` — pick one and stick with it per project.
</ParamField>

<ParamField body="quality" type="string" default="720">
  Target resolution. One of `"360"`, `"480"`, `"720"`, `"1080"`, `"1440"`, `"2160"`. For YouTube, the actual resolution will be ≤ the requested value based on source availability. For TikTok and Instagram, videos are scraped at their original resolution.
</ParamField>

## Response Example

```json theme={null}
{
    "code": "0000",
    "msg": "success",
    "data": {
        "taskId": "31b0fccb-d6f9-4135-922d-1e8828499812"
    },
    "success": true,
    "failed": false
}
```

## Response Fields

<ResponseField name="code" type="string">Business status code. `0000` indicates success.</ResponseField>
<ResponseField name="msg" type="string">Human-readable status message.</ResponseField>
<ResponseField name="data.taskId" type="string">Unique identifier for the import task. Use with [Get Task Status](/visual-search/get-task-status) to check progress, or match against callback notifications.</ResponseField>

## Next Steps

Poll [Get Task Status](/visual-search/get-task-status) with the returned `taskId` until each derived video's `status` reaches `PARSE`. Empty `data.videos` covers both "still downloading" and "task\_id not found" — combine with a client-side timeout. `FAIL` is common for DRM-protected YouTube content.

## Notes & Limits

* **Rate limiting**: See [Rate limits](/visual-search/rate-limits).
* **Billing**: Each request deducts credits. YouTube URLs consume additional credits.
* **Same-origin constraint**: All URLs in one request must be from the same platform — mixed-platform batches are rejected.
* **YouTube**: Indexing may be slower than TikTok or Instagram due to scraper capacity.


## OpenAPI

````yaml POST /serve/api/v1/scraper_url
openapi: 3.1.0
info:
  title: Memories Platform API (Docs Mapping)
  version: v1
  description: OpenAPI mapping used by Mintlify Try it for the platform docs.
servers:
  - url: https://api.memories.ai
security:
  - ApiKeyAuth: []
paths:
  /serve/api/v1/scraper_url:
    post:
      summary: Upload Video from Platform URL
      operationId: upload_video_from_platform_url
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadVideoFromPlatformUrlRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScraperTaskResponse'
components:
  schemas:
    UploadVideoFromPlatformUrlRequest:
      type: object
      properties:
        video_urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 50
          example:
            - https://www.tiktok.com/@cutshall73/video/7543017294226558221
            - https://www.tiktok.com/@abcnews/video/7543794552365124919
          description: >-
            Platform video URLs. Merged with tiktok_post_urls; combined list
            must be non-empty and <= 50. All URLs must be from the same
            platform.
        tiktok_post_urls:
          type: array
          items:
            type: string
            format: uri
          description: >-
            Optional TikTok post URLs. Server merges these into video_urls
            before processing. Counts toward the 50-URL cap.
        callback_url:
          type: string
          format: uri
          example: https://your.app/callback
          description: >-
            Callback URL for task-complete and per-video indexing-complete
            notifications.
        quality:
          type: string
          enum:
            - '360'
            - '480'
            - '720'
            - '1080'
            - '1440'
            - '2160'
          default: '360'
          example: '1080'
          description: >-
            Target video resolution. Must be one of 360/480/720/1080/1440/2160
            (string).
        folder_id:
          type: integer
          description: >-
            Optional target folder for the upload. Omit or pass -1 for the
            account's Default folder (auto-created on first use). A positive id
            must belong to your account.
          example: 671631448308117500
      required:
        - video_urls
    ScraperTaskResponse:
      type: object
      properties:
        code:
          type: string
          example: '0000'
          description: Business status code. 0000 indicates success.
        msg:
          type: string
          example: success
        data:
          type: object
          properties:
            taskId:
              type: string
              example: 31b0fccb-d6f9-4135-922d-1e8828499812
              description: Unique identifier of the scraping task.
          example:
            taskId: 31b0fccb-d6f9-4135-922d-1e8828499812
        success:
          type: boolean
          example: true
        failed:
          type: boolean
          example: false
      example:
        code: '0000'
        msg: success
        data:
          taskId: 31b0fccb-d6f9-4135-922d-1e8828499812
        success: true
        failed: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````