Skip to main content
Experience faster, smarter testing with BrowserStack AI Agents. See what your workflow’s been missing. Explore now!
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Global search

Global search finds items across every project you can access, so you can look up a test case without knowing which project holds it first. Test case search is the first variant. It is backed by the same index as the in-product global search in Test Management. It returns matching test cases from anywhere in your account.

Note: Results include only items from projects you have permission to access.

GET /api/v2/test-cases/search

This endpoint searches test cases across every project you can access. It matches the search term against five fields: title, identifier, steps, preconditions, and description. So a query of login returns every test case that contains that word in any of those fields, no matter which project holds it. Text matches are partial and case-insensitive. An identifier such as TC-145 matches when it is exact.

The search term must be at least three characters. The API removes whitespace around the term before it counts the characters.

Results are paginated with a fixed page size of 30. Use the page parameter to move through pages. The info object reports the current page, the total match count, and the previous and next page numbers.

To limit results to a creation window, pass the created_between parameter with a start timestamp and an end timestamp.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
"https://test-management.browserstack.com/api/v2/test-cases/search?q=login&page=1"
  • q* String

    Search term. Matches against the test case title, identifier, steps, preconditions, and description. Text matches are partial and case-insensitive. An identifier such as TC-145 matches when it is exact. Must be at least three characters after surrounding whitespace is removed.

  • page Integer

    Page number to return, starting at 1. Defaults to 1. The page size is fixed at 30 results and cannot be changed.

  • created_between Array

    Limits results to test cases created within a date range. Pass exactly two ISO 8601 timestamps as created_between[]=<START>&created_between[]=<END>.

To filter by a creation date range, add two created_between[] values to the query.

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
"https://test-management.browserstack.com/api/v2/test-cases/search?q=login&page=1&created_between[]=2026-04-05T00:00:00.000Z&created_between[]=2026-05-05T23:59:59.999Z"

Response Attributes 200 OK json

Response

{
  "success": true,
  "test_cases": [
    {
      "identifier": "TC-145",
      "name": "Checking the login functionality",
      "group_id": 1,
      "folder_id": 21,
      "owner": "alice@browserstack.com",
      "project": {
        "identifier": "PR-10",
        "name": "Checkout flows"
      }
    }
  ],
  "info": {
    "page": 1,
    "page_size": 30,
    "count": 150,
    "prev": null,
    "next": 2
  }
}
  • success Boolean

    Indicates whether the API call was successful.

  • test_cases Array

    Test cases that match the search term. Contains at most 30 items per page.

    β–Ά SHOW VALUES
    • identifier String

      Public identifier of the test case. For example, TC-145.

    • name String

      Title of the test case.

    • group_id Integer

      Identifier of the BrowserStack group that the test case belongs to.

    • folder_id Integer

      Identifier of the folder that contains the test case.

    • owner String

      Email of the test case owner. Returns null when no user is assigned.

    • project Object

      Project that contains the test case. Returns null when the project cannot be resolved.

      β–Ά SHOW VALUES
      • identifier String

        Public identifier of the project. For example, PR-10.

      • name String

        Name of the project.

  • info Object

    Pagination details for the response.

    β–Ά SHOW VALUES
    • page Integer

      The current page being viewed displays a list of test cases.

    • page_size Integer

      Number of test cases in the page.

    • count Integer

      Total number of records across all pages.

    • prev Integer

      Previous page number.

    • next Integer

      Next page number.

Error responses

The API returns standard HTTP status codes. For the full list, refer to Response status codes.

Status code When it occurs
400 The q parameter is shorter than three characters, or a filter value is malformed.
401 Authentication failed. Check your username and access key.
403 You do not have permission to search test cases.
500 An unexpected server error occurred. Retry the request.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Download Copy Check Circle