> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refmatter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Look up an account

> Costs 1 credit for a live page or the first serving of a stored account page with a row; empty pages, errors and repeats within maxAge are free.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/accounts/lookup
openapi: 3.1.0
info:
  title: Refmatter API
  version: 0.1.0
  description: >-
    Public social data API: one request turns a TikTok, Instagram, YouTube or
    Meta Ad Library link into structured data; import it to keep verified media,
    a transcript and provenance.
servers:
  - url: https://api.refmatter.com
security:
  - bearerApiKey: []
tags:
  - name: workspaces
    x-group: Workspaces
    description: Manage workspaces and review their usage.
  - name: imports
    x-group: Imports
    description: Start imports from source URLs and check their progress.
  - name: urls
    x-group: URLs
    description: Identify the platform and object represented by a social URL.
  - name: items
    x-group: Items
    description: List and look up items from supported platforms.
  - name: accounts
    x-group: Accounts
    description: Look up accounts and retrieve their current data.
  - name: comments
    x-group: Comments
    description: List comments for supported items.
  - name: search
    x-group: Search
    description: Search supported platforms for items or accounts.
  - name: references
    x-group: References
    description: Manage saved references and their transcripts and media.
  - name: media
    x-group: Media
    description: Create short-lived access to stored media.
  - name: sourceRoutes
    x-group: Sources
    description: List the supported platforms and objects with their limits.
paths:
  /v1/accounts/lookup:
    get:
      tags:
        - accounts
      summary: Look up an account
      description: >-
        Costs 1 credit for a live page or the first serving of a stored account
        page with a row; empty pages, errors and repeats within maxAge are free.
      operationId: accountsLookup
      parameters:
        - name: url
          in: query
          required: false
          description: Absolute HTTP(S) YouTube, Instagram or TikTok account URL
          schema:
            type: string
            format: uri
            maxLength: 2048
        - name: platform
          in: query
          required: false
          description: The account platform when using handle or id
          schema:
            enum:
              - youtube
              - instagram
              - tiktok
        - name: handle
          in: query
          required: false
          description: Account handle, with or without @
          schema:
            type: string
            minLength: 1
            maxLength: 31
        - name: id
          in: query
          required: false
          description: 24-character YouTube channel id; YouTube only
          schema:
            type: string
            pattern: ^UC[A-Za-z0-9_-]{22}$
        - name: maxAge
          in: query
          required: false
          description: >-
            How fresh a stored page may be: 0 or minutes, hours or days up to
            1d; default 1h
          schema:
            type: string
            pattern: ^(0|[1-9][0-9]{0,5}[mhd])$
            default: 1h
      responses:
        '200':
          description: The account as it was observed
          headers:
            Refmatter-Credits-Charged:
              description: Credits this response charged the workspace
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: Credits the workspace has left after this response
              schema:
                type: integer
            Server-Timing:
              description: Lookup phase durations
              schema:
                type: string
            Cache-Control:
              description: A lookup answer is never stored by a cache on the way
              schema:
                type: string
                const: no-store
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '400':
          description: Invalid request
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Authentication required
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '402':
          description: The workspace has no credits left
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Action not permitted
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Resource not found
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '410':
          description: Source content removed
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Request cannot be fulfilled by the current source contract
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limited
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
            Retry-After:
              description: Whole seconds until another attempt is likely to succeed
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Internal error
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '502':
          description: Source failed or changed
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '503':
          description: Service or dependency unavailable
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '504':
          description: Source timed out
          headers:
            Refmatter-Credits-Charged:
              description: >-
                Credits this response charged the workspace: 0, as every error
                is free
              schema:
                type: integer
                minimum: 0
            Refmatter-Credits-Remaining:
              description: >-
                Credits the workspace has left; absent when the request named no
                workspace
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - bearerApiKey: []
components:
  schemas:
    Account:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        object:
          type: string
          const: account
        id:
          type: string
          pattern: ^(youtube|tiktok|instagram|meta_ad_library):[A-Za-z0-9._-]{1,128}$
        platform:
          type: string
          enum:
            - youtube
            - tiktok
            - instagram
            - meta_ad_library
        handle:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 256
            - type: 'null'
        name:
          anyOf:
            - type: string
              minLength: 0
              maxLength: 500
            - type: 'null'
        description:
          anyOf:
            - type: string
              minLength: 0
              maxLength: 5000
            - type: 'null'
        url:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 2048
            - type: 'null'
        avatar:
          maxItems: 64
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                minLength: 1
                maxLength: 2048
              width:
                anyOf:
                  - type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  - type: 'null'
              height:
                anyOf:
                  - type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  - type: 'null'
              expiresAt:
                anyOf:
                  - type: string
                    pattern: >-
                      ^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$
                  - type: 'null'
            required:
              - url
              - width
              - height
              - expiresAt
            additionalProperties: false
        banner:
          maxItems: 64
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                minLength: 1
                maxLength: 2048
              width:
                anyOf:
                  - type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  - type: 'null'
              height:
                anyOf:
                  - type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  - type: 'null'
              expiresAt:
                anyOf:
                  - type: string
                    pattern: >-
                      ^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$
                  - type: 'null'
            required:
              - url
              - width
              - height
              - expiresAt
            additionalProperties: false
        verified:
          type:
            - boolean
            - 'null'
        stats:
          type: object
          properties:
            followers:
              anyOf:
                - type: integer
                  minimum: 0
                  maximum: 9007199254740991
                - type: 'null'
            following:
              anyOf:
                - type: integer
                  minimum: 0
                  maximum: 9007199254740991
                - type: 'null'
            items:
              anyOf:
                - type: integer
                  minimum: 0
                  maximum: 9007199254740991
                - type: 'null'
            views:
              anyOf:
                - type: integer
                  minimum: 0
                  maximum: 9007199254740991
                - type: 'null'
          required:
            - followers
            - following
            - items
            - views
          additionalProperties: false
        links:
          maxItems: 32
          type: array
          items:
            type: object
            properties:
              title:
                anyOf:
                  - type: string
                    minLength: 0
                    maxLength: 500
                  - type: 'null'
              url:
                type: string
                minLength: 1
                maxLength: 2048
            required:
              - title
              - url
            additionalProperties: false
        country:
          anyOf:
            - type: string
              minLength: 0
              maxLength: 100
            - type: 'null'
        joinedAt:
          anyOf:
            - type: string
              pattern: ^\d{4}-\d{2}-\d{2}$
            - type: 'null'
        unavailableFields:
          maxItems: 13
          type: array
          items:
            type: string
            enum:
              - handle
              - name
              - description
              - url
              - avatar
              - banner
              - verified
              - stats.followers
              - stats.following
              - stats.items
              - stats.views
              - country
              - joinedAt
        youtube:
          anyOf:
            - type: object
              properties:
                followersApproximate:
                  type:
                    - boolean
                    - 'null'
              required:
                - followersApproximate
              additionalProperties: false
            - type: 'null'
        tiktok:
          anyOf:
            - type: object
              properties:
                likes:
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    - type: 'null'
                private:
                  type:
                    - boolean
                    - 'null'
              required:
                - likes
                - private
              additionalProperties: false
            - type: 'null'
        instagram:
          anyOf:
            - type: object
              properties:
                private:
                  type:
                    - boolean
                    - 'null'
              required:
                - private
              additionalProperties: false
            - type: 'null'
        meta_ad_library:
          type: 'null'
        observedAt:
          type: string
          pattern: >-
            ^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$
        cached:
          type: boolean
        usage:
          type: object
          properties:
            creditsCharged:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            lines:
              maxItems: 8
              type: array
              items:
                type: object
                properties:
                  part:
                    type: string
                    enum:
                      - fetch
                  credits:
                    type: integer
                    minimum: 1
                    maximum: 9007199254740991
                required:
                  - part
                  - credits
                additionalProperties: false
          required:
            - creditsCharged
            - lines
          additionalProperties: false
      required:
        - object
        - id
        - platform
        - handle
        - name
        - description
        - url
        - avatar
        - banner
        - verified
        - stats
        - links
        - country
        - joinedAt
        - unavailableFields
        - youtube
        - tiktok
        - instagram
        - meta_ad_library
        - observedAt
        - cached
        - usage
      additionalProperties: false
    ErrorEnvelope:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - invalid_input
                - unauthenticated
                - invalid_credential
                - credential_conflict
                - forbidden
                - policy_blocked
                - route_disabled
                - route_degraded
                - not_found
                - bootstrap_conflict
                - last_owner_conflict
                - revision_conflict
                - idempotency_conflict
                - unavailable_private
                - unavailable_restricted
                - unavailable_removed
                - unsupported_object
                - unsupported_media
                - insufficient_credits
                - limit_exceeded
                - rate_limited
                - source_changed
                - network_timeout
                - network_transport
                - media_invalid
                - storage_unavailable
                - retry_exhausted
                - internal_error
            message:
              type: string
              minLength: 1
              maxLength: 240
            retryable:
              type: boolean
            requestId:
              type: string
              minLength: 8
              maxLength: 128
              pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$
            details:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type:
                  - string
                  - number
                  - boolean
          required:
            - code
            - message
            - retryable
            - requestId
            - details
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    bearerApiKey:
      type: http
      scheme: bearer

````