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

# Takedowns List

> List takedowns for an organization using API key authentication

<Warning>
  This API requires an API key with appropriate permissions. See [API Key
  Documentation](/general/api-key) for more details.
</Warning>

<Info>
  This endpoint uses cursor-based pagination for efficient retrieval of large
  datasets. If you encounter errors related to payload size, please use the
  pagination feature as described below.
</Info>

## Pagination

To use pagination, include the `per_page` and `next_page` parameters in your request:

* `per_page <number>`: Number of takedowns to return per page (min: 1, max: 100)
* `next_page <string>`: Cursor for the next page of results

### Example implementation for pagination:

<CodeGroup>
  ```javascript JavaScript theme={null}
  async function fetchAllTakedowns() {
    let allTakedowns = [];
    let nextPage = null;
    while (true) {
      const response = await fetch(
        "https://app.chainpatrol.io/api/v2/takedowns/list",
        {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
            "X-API-KEY": "YOUR_API_KEY_HERE",
          },
          body: JSON.stringify({
            per_page: 100,
            next_page: nextPage,
            takedownStatus: ["TODO", "IN_PROGRESS"],
            livenessStatus: ["ALIVE"],
          }),
        }
      );
      const data = await response.json();
      allTakedowns = allTakedowns.concat(data.takedowns);
      nextPage = data.next_page;
      if (!nextPage) {
        break;
      }
    }
    return allTakedowns;
  }
  fetchAllTakedowns()
    .then((takedowns) => console.log("All takedowns:", takedowns))
    .catch((error) => console.error("Error fetching takedowns:", error));
  ```

  ```typescript TypeScript theme={null}
  async function fetchAllTakedowns(): Promise<any[]> {
    let allTakedowns: any[] = [];
    let nextPage: string | null = null;

    while (true) {
      const response = await fetch(
        "https://app.chainpatrol.io/api/v2/takedowns/list",
        {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
            "X-API-KEY": "YOUR_API_KEY_HERE",
          },
          body: JSON.stringify({
            per_page: 100,
            next_page: nextPage,
            takedownStatus: ["TODO", "IN_PROGRESS"],
            livenessStatus: ["ALIVE"],
          }),
        }
      );
      const data = await response.json();
      allTakedowns = allTakedowns.concat(data.takedowns);
      nextPage = data.next_page;

      if (!nextPage) {
        break;
      }
    }
    return allTakedowns;
  }

  fetchAllTakedowns()
    .then((takedowns) => console.log("All takedowns:", takedowns))
    .catch((error) => console.error("Error fetching takedowns:", error));
  ```

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

  def fetch_all_takedowns() -> list:
      all_takedowns = []
      next_page = None
      while True:
          response = requests.post(
              "https://app.chainpatrol.io/api/v2/takedowns/list",
              headers={
                  "Content-Type": "application/json",
                  "X-API-KEY": "YOUR_API_KEY_HERE",
              },
              json={
                  "per_page": 100,
                  "next_page": next_page,
                  "takedownStatus": ["TODO", "IN_PROGRESS"],
                  "livenessStatus": ["ALIVE"],
              },
          )
          data = response.json()
          all_takedowns.extend(data["takedowns"])
          next_page = data.get("next_page")
          if not next_page:
              break
      return all_takedowns

  try:
      takedowns = fetch_all_takedowns()
      print("All takedowns:", takedowns)
  except Exception as error:
      print("Error fetching takedowns:", str(error))
  ```
</CodeGroup>


## OpenAPI

````yaml POST /takedowns/list
openapi: 3.0.3
info:
  title: ChainPatrol External API - OpenAPI 3.0
  description: ChainPatrol External API documentation
  version: 2.0.0
servers:
  - url: https://app.chainpatrol.io/api/v2
security: []
tags:
  - name: asset
  - name: report
externalDocs:
  url: https://chainpatrol.com/docs
paths:
  /takedowns/list:
    post:
      tags:
        - takedowns
      summary: List takedowns
      description: List takedowns for an organization using API key authentication
      operationId: takedownsList
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                startDate:
                  type: string
                endDate:
                  type: string
                assetType:
                  type: array
                  items:
                    type: string
                    enum:
                      - URL
                      - PAGE
                      - ADDRESS
                      - DISCORD
                      - LINKEDIN
                      - TWITTER
                      - FACEBOOK
                      - YOUTUBE
                      - REDDIT
                      - TELEGRAM
                      - GOOGLE_APP_STORE
                      - APPLE_APP_STORE
                      - AMAZON_APP_STORE
                      - MICROSOFT_APP_STORE
                      - TIKTOK
                      - INSTAGRAM
                      - THREADS
                      - MEDIUM
                      - CHROME_WEB_STORE
                      - MOZILLA_ADDONS
                      - OPERA_ADDONS
                      - EMAIL
                      - PATREON
                      - OPENSEA
                      - FARCASTER
                      - IPFS
                      - GOOGLE_FORM
                      - WHATSAPP
                      - DISCORD_USER
                      - QUORA
                      - GITHUB
                      - TEACHABLE
                      - SUBSTACK
                      - DEBANK
                      - TAWK_TO
                      - JOTFORM
                      - PRIMAL
                      - BLUESKY
                      - SNAPCHAT
                      - DESO
                      - PINTEREST
                      - FLICKR
                      - GALXE
                      - VELOG
                      - NPM
                      - PYPI
                      - HEX
                      - DOCKER_HUB
                      - VOCAL_MEDIA
                      - TECKFINE
                      - TENDERLY
                      - HACKMD
                      - ETSY
                      - ZAZZLE
                      - BASENAME
                      - BILIBILI_TV
                      - VIMEO
                      - DAILYMOTION
                      - PHONE_NUMBER
                      - SLACK
                      - CALENDLY
                      - NGROK
                      - RARIBLE
                      - RUST_PACKAGE
                      - FLATHUB
                      - VIDLII
                      - VEVIOZ
                      - ISSUU
                      - SOUNDCLOUD
                      - ZAPPER
                      - REDNOTE
                      - SAMSUNG_APP_STORE
                      - HUAWEI_APP_STORE
                      - XIAOMI_APP_STORE
                      - TENCENT_APP_STORE
                      - OPPO_APP_STORE
                      - VIVO_APP_STORE
                      - F_DROID
                      - GOOGLE_AD
                      - BING_AD
                      - TWITCH
                      - BEHANCE
                      - ZORA
                      - META_AD
                      - SIGNAL
                      - DEVIANTART
                      - BANDCAMP
                      - ARCHIVE_ORG
                      - FIVE_HUNDRED_PX
                takedownStatus:
                  type: array
                  items:
                    type: string
                    enum:
                      - TODO
                      - IN_PROGRESS
                      - COMPLETED
                      - CANCELLED
                      - PENDING_RETRACTION
                      - RETRACTION_SENT
                      - RETRACTED
                      - PENDING_INPUT
                livenessStatus:
                  type: array
                  items:
                    type: string
                    enum:
                      - UNKNOWN
                      - ALIVE
                      - DEAD
                sorting:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        enum:
                          - updatedAt
                          - createdAt
                          - takedownStatus
                          - takedownUpdatedAt
                      direction:
                        type: string
                        enum:
                          - asc
                          - desc
                    required:
                      - key
                      - direction
                per_page:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 10
                next_page:
                  type: string
                  nullable: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  takedowns:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        status:
                          type: string
                          enum:
                            - TODO
                            - IN_PROGRESS
                            - COMPLETED
                            - CANCELLED
                            - PENDING_RETRACTION
                            - RETRACTION_SENT
                            - RETRACTED
                            - PENDING_INPUT
                        createdAt:
                          type: string
                        updatedAt:
                          type: string
                        asset:
                          type: object
                          properties:
                            id:
                              type: number
                            content:
                              type: string
                            type:
                              type: string
                              enum:
                                - URL
                                - PAGE
                                - ADDRESS
                                - DISCORD
                                - LINKEDIN
                                - TWITTER
                                - FACEBOOK
                                - YOUTUBE
                                - REDDIT
                                - TELEGRAM
                                - GOOGLE_APP_STORE
                                - APPLE_APP_STORE
                                - AMAZON_APP_STORE
                                - MICROSOFT_APP_STORE
                                - TIKTOK
                                - INSTAGRAM
                                - THREADS
                                - MEDIUM
                                - CHROME_WEB_STORE
                                - MOZILLA_ADDONS
                                - OPERA_ADDONS
                                - EMAIL
                                - PATREON
                                - OPENSEA
                                - FARCASTER
                                - IPFS
                                - GOOGLE_FORM
                                - WHATSAPP
                                - DISCORD_USER
                                - QUORA
                                - GITHUB
                                - TEACHABLE
                                - SUBSTACK
                                - DEBANK
                                - TAWK_TO
                                - JOTFORM
                                - PRIMAL
                                - BLUESKY
                                - SNAPCHAT
                                - DESO
                                - PINTEREST
                                - FLICKR
                                - GALXE
                                - VELOG
                                - NPM
                                - PYPI
                                - HEX
                                - DOCKER_HUB
                                - VOCAL_MEDIA
                                - TECKFINE
                                - TENDERLY
                                - HACKMD
                                - ETSY
                                - ZAZZLE
                                - BASENAME
                                - BILIBILI_TV
                                - VIMEO
                                - DAILYMOTION
                                - PHONE_NUMBER
                                - SLACK
                                - CALENDLY
                                - NGROK
                                - RARIBLE
                                - RUST_PACKAGE
                                - FLATHUB
                                - VIDLII
                                - VEVIOZ
                                - ISSUU
                                - SOUNDCLOUD
                                - ZAPPER
                                - REDNOTE
                                - SAMSUNG_APP_STORE
                                - HUAWEI_APP_STORE
                                - XIAOMI_APP_STORE
                                - TENCENT_APP_STORE
                                - OPPO_APP_STORE
                                - VIVO_APP_STORE
                                - F_DROID
                                - GOOGLE_AD
                                - BING_AD
                                - TWITCH
                                - BEHANCE
                                - ZORA
                                - META_AD
                                - SIGNAL
                                - DEVIANTART
                                - BANDCAMP
                                - ARCHIVE_ORG
                                - FIVE_HUNDRED_PX
                            livenessStatus:
                              type: string
                              nullable: true
                              enum:
                                - UNKNOWN
                                - ALIVE
                                - DEAD
                                - null
                          required:
                            - id
                            - content
                            - type
                            - livenessStatus
                        assignee:
                          type: object
                          nullable: true
                          properties:
                            id:
                              type: number
                            fullName:
                              type: string
                              nullable: true
                          required:
                            - id
                            - fullName
                        brand:
                          type: object
                          nullable: true
                          properties:
                            id:
                              type: number
                            name:
                              type: string
                            slug:
                              type: string
                              nullable: true
                          required:
                            - id
                            - name
                            - slug
                      required:
                        - id
                        - status
                        - createdAt
                        - updatedAt
                        - asset
                        - assignee
                        - brand
                  next_page:
                    type: string
                    nullable: true
                required:
                  - takedowns
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - ApiKey: []
components:
  schemas:
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your API key. This is required by most endpoints to access our API
        programatically. Reach out to us at
        [support@chainpatrol.io](mailto:support@chainpatrol.io?subject=Re:%20API%20Key%20for%20SDK&body=Company:%20%0AName:%20%0APurpose:%20)
        to get an API key for your use.

````