# GitLab project merge request API

Get GitLab Merge Request data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as iid, output, path, and retrieve structured data including project-local merge request number, author GitLab username, draft merge request indicator, reported mergeability status, and merge conflict indicator to review proposed changes, audit review discussions, and track merge outcomes.

Documentation: https://openany.si/market/apis/gitlab/gitlab-project-merge-request-api/?offering=78f6425c-81f5-4d84-857a-2138005236a9
API ID: 78f6425c-81f5-4d84-857a-2138005236a9
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/gitlab/v1/project/merge-request
Page update time: 2026-12-03T02:38:48.984Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:38:31.721Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "GitLab project merge request API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Project path (namespace/project), link or numeric id."
        },
        "iid": {
          "type": "string",
          "description": "Merge request number (as in /-/merge_requests/1), or pass its link as url."
        },
        "include": {
          "type": "string",
          "description": "Comma-separated: changes (file diffs), approvals."
        },
        "notes": {
          "type": "string",
          "description": "comments (default), activity (system notes such as label or status changes) or all.",
          "enum": [
            "comments",
            "activity",
            "all"
          ]
        },
        "limit": {
          "type": "integer",
          "description": "Items per page (default 50, max 100)."
        },
        "cursor": {
          "type": "string",
          "description": "Pass `next_cursor` back for more comments (later pages carry only the comments)."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "Native CSV/NDJSON record selector; it has no effect on this JSON-only product."
        }
      },
      "required": [
        "path",
        "iid"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "assignees": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "avatar": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        }
      }
    },
    "author": {
      "type": "object",
      "properties": {
        "avatar": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "blocking_discussions_resolved": {
      "type": "boolean"
    },
    "cached": {
      "type": "boolean"
    },
    "changes_count": {
      "type": "null"
    },
    "closed_at": {
      "type": "null"
    },
    "closed_by": {
      "type": "null"
    },
    "confidential": {
      "type": "null"
    },
    "created_at": {
      "type": "string"
    },
    "credits_used": {
      "type": "integer"
    },
    "description": {
      "type": "string"
    },
    "diff_refs": {
      "type": "null"
    },
    "discussion_locked": {
      "type": "null"
    },
    "downvotes": {
      "type": "integer"
    },
    "draft": {
      "type": "boolean"
    },
    "first_contribution": {
      "type": "boolean"
    },
    "has_conflicts": {
      "type": "boolean"
    },
    "id": {
      "type": "integer"
    },
    "iid": {
      "type": "integer"
    },
    "labels": {
      "type": "array",
      "items": {}
    },
    "merge_commit_sha": {
      "type": "null"
    },
    "merge_error": {
      "type": "null"
    },
    "merge_status": {
      "type": "string"
    },
    "merged_at": {
      "type": "null"
    },
    "merged_by": {
      "type": "null"
    },
    "milestone": {
      "type": "null"
    },
    "pipeline": {
      "type": "null"
    },
    "project": {
      "type": "string"
    },
    "reference": {
      "type": "string"
    },
    "reviewers": {
      "type": "array",
      "items": {}
    },
    "sha": {
      "type": "string"
    },
    "source_branch": {
      "type": "string"
    },
    "squash": {
      "type": "boolean"
    },
    "squash_commit_sha": {
      "type": "null"
    },
    "state": {
      "type": "string"
    },
    "target_branch": {
      "type": "string"
    },
    "time_stats": {
      "type": "object",
      "properties": {
        "estimate": {
          "type": "null"
        },
        "estimate_seconds": {
          "type": "integer"
        },
        "spent": {
          "type": "null"
        },
        "spent_seconds": {
          "type": "integer"
        }
      }
    },
    "title": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    },
    "upvotes": {
      "type": "integer"
    },
    "url": {
      "type": "string"
    },
    "user_notes_count": {
      "type": "integer"
    },
    "…": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/gitlab/v1/project/merge-request?iid=1&output=json&path=gitlab-org%2Fgitlab-runner' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "assignees": [
    {
      "avatar": "https://secure.gravatar.com/avatar/4675c8e590e767232977b9b245d70da790b2b6fd9ea0870515cf951fc2ac8ccb?s=80&d=identicon",
      "name": "Kamil Trzciński",
      "url": "https://gitlab.com/ayufan",
      "username": "ayufan"
    }
  ],
  "author": {
    "avatar": "https://gitlab.com/uploads/-/system/user/avatar/3585/avatar.png?v=1790899621",
    "name": "Achilleas Pipinellis",
    "url": "https://gitlab.com/axil",
    "username": "axil"
  },
  "blocking_discussions_resolved": true,
  "cached": false,
  "changes_count": null,
  "closed_at": null,
  "closed_by": null,
  "confidential": null,
  "created_at": "2015-05-02T06:38:50.094Z",
  "credits_used": 1,
  "description": "* Categorize documentation files in own namespace\r\n* Use tables in advanced configuration\r\n* Drop numbered lists from examples and install f…",
  "diff_refs": null,
  "discussion_locked": null,
  "downvotes": 0,
  "draft": false,
  "first_contribution": false,
  "has_conflicts": false,
  "id": 75920,
  "iid": 1,
  "labels": [],
  "merge_commit_sha": null,
  "merge_error": null,
  "merge_status": "not_open",
  "merged_at": null,
  "merged_by": null,
  "milestone": null,
  "pipeline": null,
  "project": "gitlab-org/gitlab-runner",
  "reference": "gitlab-org/gitlab-runner!1",
  "reviewers": [],
  "sha": "f85f7408dd1c932b28ee7ccb792d957545227c7f",
  "source_branch": "documentation_clean_up",
  "squash": false,
  "squash_commit_sha": null,
  "state": "merged",
  "target_branch": "master",
  "time_stats": {
    "estimate": null,
    "estimate_seconds": 0,
    "spent": null,
    "spent_seconds": 0
  },
  "title": "Documentation clean-up.",
  "updated_at": "2026-10-18T13:09:11.811Z",
  "upvotes": 0,
  "url": "https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1",
  "user_notes_count": 8,
  "…": "8 more fields"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- apish: https://openany.si/market/apis/gitlab/gitlab-project-merge-request-api/?offering=78f6425c-81f5-4d84-857a-2138005236a9

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
