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

# Get Extractor

> Retrieve details of a specific extractor by ID.

Get detailed information about a specific extractor including its configuration, pricing, and edit permissions.

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token authentication. Example: `Bearer YOUR_API_KEY`
</ParamField>

### Path Parameters

<ParamField path="extractor_id" type="string" required>
  The unique identifier (UUID) of the extractor
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.doctly.ai/api/v1/e/987fcdeb-a654-3210-9876-543210987654 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  extractor_id = "987fcdeb-a654-3210-9876-543210987654"
  headers = {"Authorization": "Bearer YOUR_API_KEY"}

  response = requests.get(
      f"https://api.doctly.ai/api/v1/e/{extractor_id}",
      headers=headers
  )

  extractor = response.json()
  print(f"Name: {extractor['name']}")
  print(f"Slug: {extractor['slug']}")
  print(f"Cost: {extractor['cost_credits']} credits {extractor['cost_type'].lower()}")
  ```

  ```javascript JavaScript theme={null}
  const extractorId = '987fcdeb-a654-3210-9876-543210987654';

  const response = await fetch(
    `https://api.doctly.ai/api/v1/e/${extractorId}`,
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const extractor = await response.json();
  console.log(`Name: ${extractor.name}`);
  console.log(`Slug: ${extractor.slug}`);
  ```
</CodeGroup>

## Response

<Expandable title="Extractor Object">
  <ResponseField name="id" type="string">
    Unique identifier (UUID) for the extractor
  </ResponseField>

  <ResponseField name="name" type="string">
    Display name of the extractor
  </ResponseField>

  <ResponseField name="slug" type="string">
    URL-friendly identifier used in API paths (e.g., `invoice-extractor`)
  </ResponseField>

  <ResponseField name="description" type="string">
    Description of what the extractor does and what documents it's designed for
  </ResponseField>

  <ResponseField name="cost_type" type="string">
    Pricing model: `PER_PAGE` or `PER_DOCUMENT`
  </ResponseField>

  <ResponseField name="cost_credits" type="integer">
    Number of credits charged per page or per document
  </ResponseField>
</Expandable>

## Example Responses

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "id": "987fcdeb-a654-3210-9876-543210987654",
    "name": "Invoice Extractor",
    "slug": "invoice-extractor",
    "description": "Extract invoice details including vendor information, line items, subtotals, taxes, and grand totals from PDF invoices.",
    "cost_type": "PER_PAGE",
    "cost_credits": 5
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "detail": "Extractor not found or you do not have access to it."
  }
  ```

  ```json 422 Unprocessable Entity theme={null}
  {
    "detail": [
      {
        "loc": ["path", "extractor_id"],
        "msg": "value is not a valid uuid",
        "type": "type_error.uuid"
      }
    ]
  }
  ```
</ResponseExample>

## Using the Extractor

Once you have the extractor details, use the `slug` to run it:

<CodeGroup>
  ```python Python theme={null}
  import requests

  # Get extractor details
  extractor_id = "987fcdeb-a654-3210-9876-543210987654"
  headers = {"Authorization": "Bearer YOUR_API_KEY"}

  extractor = requests.get(
      f"https://api.doctly.ai/api/v1/e/{extractor_id}",
      headers=headers
  ).json()

  # Run the extractor using its slug
  slug = extractor["slug"]
  with open("invoice.pdf", "rb") as f:
      files = {"file": ("invoice.pdf", f, "application/pdf")}
      response = requests.post(
          f"https://api.doctly.ai/api/v1/e/{slug}",
          headers=headers,
          files=files
      )

  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const headers = { 'Authorization': 'Bearer YOUR_API_KEY' };

  // Get extractor details
  const extractorId = '987fcdeb-a654-3210-9876-543210987654';
  const extractor = await fetch(
    `https://api.doctly.ai/api/v1/e/${extractorId}`,
    { headers }
  ).then(r => r.json());

  // Run the extractor using its slug
  const formData = new FormData();
  formData.append('file', fileInput.files[0]);

  const result = await fetch(
    `https://api.doctly.ai/api/v1/e/${extractor.slug}`,
    {
      method: 'POST',
      headers,
      body: formData
    }
  ).then(r => r.json());

  console.log(result);
  ```
</CodeGroup>


## OpenAPI

````yaml GET /e/{extractor_id}
openapi: 3.1.0
info:
  title: Doctly API
  description: >-
    The Doctly API enables you to programmatically convert PDF documents to
    Markdown and extract structured data using custom extractors.
  version: 1.0.0
  contact:
    email: support@doctly.ai
servers:
  - url: https://api.doctly.ai/api/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /e/{extractor_id}:
    get:
      tags:
        - Extractors
      summary: Get Extractor
      description: Retrieve details of a specific extractor
      operationId: getExtractor
      parameters:
        - name: extractor_id
          in: path
          required: true
          description: Extractor ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Extractor details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractorPublic'
        '404':
          description: Extractor not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ExtractorPublic:
      type: object
      required:
        - id
        - name
        - slug
        - cost_type
        - cost_credits
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
        description:
          type: string
          nullable: true
        cost_type:
          type: string
          enum:
            - PER_PAGE
            - PER_DOCUMENT
        cost_credits:
          type: integer
    Error:
      type: object
      properties:
        detail:
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                properties:
                  loc:
                    type: array
                    items:
                      type: string
                  msg:
                    type: string
                  type:
                    type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication using Bearer token

````