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

# /bitbucket/repositories/pullrequests

> List pull requests of a Bitbucket repository by 'workspace/repo' or repository URL

**Price:** 10 credits per 50 results

**⚠️ Common errors:** 412: Repository not found



## OpenAPI

````yaml /openapi/developer-data.json post /api/bitbucket/repositories/pullrequests
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/bitbucket/repositories/pullrequests:
    post:
      tags:
        - /bitbucket
      summary: /bitbucket/repositories/pullrequests
      description: >-
        List pull requests of a Bitbucket repository by 'workspace/repo' or
        repository URL


        **Price:** 10 credits per 50 results


        **⚠️ Common errors:** 412: Repository not found
      operationId: __api_bitbucket_repositories_pullrequests_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BitbucketRepositoriesPullRequestsPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BitbucketPullRequest'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BitbucketRepositoriesPullRequestsPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        repo:
          type: string
          minLength: 1
        state:
          $ref: '#/components/schemas/BitbucketPullStateEnum'
          default: OPEN
        count:
          type: integer
          minimum: 1
        query:
          anyOf:
            - type: string
            - type: 'null'
        sort:
          $ref: '#/components/schemas/BitbucketPullSortEnum'
          default: '-updated_on'
      type: object
      required:
        - repo
        - count
    BitbucketPullRequest:
      properties:
        '@type':
          type: string
          default: BitbucketPullRequest
        id:
          type: integer
        pull_title:
          type: string
          default: ''
        text:
          anyOf:
            - type: string
            - type: 'null'
        state:
          type: string
          default: ''
        is_draft:
          type: boolean
          default: false
        comment_count:
          type: integer
          default: 0
        task_count:
          type: integer
          default: 0
        close_source_branch:
          type: boolean
          default: false
        created_at:
          type: string
          default: ''
        updated_at:
          type: string
          default: ''
        author:
          anyOf:
            - $ref: '#/components/schemas/BitbucketAccount'
            - type: 'null'
        closed_by:
          anyOf:
            - $ref: '#/components/schemas/BitbucketAccount'
            - type: 'null'
        merge_commit_hash:
          anyOf:
            - type: string
            - type: 'null'
        reason:
          type: string
          default: ''
        source_branch:
          type: string
          default: ''
        source_commit_hash:
          type: string
          default: ''
        source_repository_alias:
          anyOf:
            - type: string
            - type: 'null'
        destination_branch:
          type: string
          default: ''
        destination_commit_hash:
          type: string
          default: ''
        destination_repository_alias:
          anyOf:
            - type: string
            - type: 'null'
        reviewers:
          items:
            $ref: '#/components/schemas/BitbucketAccount'
          type: array
          default: []
        participants:
          items:
            $ref: '#/components/schemas/BitbucketParticipant'
          type: array
          default: []
        web_url:
          type: string
          default: ''
      type: object
      required:
        - id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    BitbucketPullStateEnum:
      type: string
      enum:
        - OPEN
        - MERGED
        - DECLINED
        - SUPERSEDED
    BitbucketPullSortEnum:
      type: string
      enum:
        - '-updated_on'
        - updated_on
        - '-created_on'
        - created_on
    BitbucketAccount:
      properties:
        '@type':
          type: string
          default: BitbucketAccount
        uuid:
          type: string
          default: ''
        display_name:
          type: string
          default: ''
        nickname:
          anyOf:
            - type: string
            - type: 'null'
        account_id:
          anyOf:
            - type: string
            - type: 'null'
        account_type:
          type: string
          default: ''
        account_status:
          anyOf:
            - type: string
            - type: 'null'
        is_staff:
          type: boolean
          default: false
        location:
          anyOf:
            - type: string
            - type: 'null'
        created_at:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        web_url:
          type: string
          default: ''
      type: object
    BitbucketParticipant:
      properties:
        '@type':
          type: string
          default: BitbucketParticipant
        user:
          anyOf:
            - $ref: '#/components/schemas/BitbucketAccount'
            - type: 'null'
        role:
          type: string
          default: ''
        approved:
          type: boolean
          default: false
        state:
          anyOf:
            - type: string
            - type: 'null'
        participated_at:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````