Skip to main content
Version: 2019-05-29 (Current)

Universal search

Searches a scope of data based on input parameters. Use this endpoint to perform full-text search and filtered queries across charges, customers, disputes, recipients, and other resources.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Required - 1 fieldRequired Parameters
โ–ผ
`scope`STRING(required)
Data type to search. Determines which resource type is searched and what filters are available.
Example:"charge"
Values:audit, charge, charge_schedule, customer, dispute, event, link, linked_account, log_entry, receipt, recipient, refund, sub_merchant, transfer, transfer_schedule, transaction
Recommended - 4 fieldsRecommended Parameters
โ–ผ
`query`STRING(optional)
Search query text for full-text search. Searches across IDs, descriptions, metadata, emails, and names depending on scope.
Example:"john@example.com"
`filters`OBJECT(optional)
Search filters to narrow results. Available filters depend on the scope. Common filters include status, amount, created date ranges.
Example:{"created":"2019/01/01..2019/12/31"}
`order`STRING(optional)
Results ordering based on creation time.
Example:"chronological"
Values:chronological, reverse_chronological
Default:"chronological"
`page`INTEGER(optional)
Page number for pagination (1-indexed).
Example:1
Default:1
Additional - 1 fieldAdditional Parameters

Responsesโ€‹

200

Successful search

Returns a search object containing paginated results in the data array.

Response structure:
  • object - String value "search"
  • data - Array of objects matching the scope (reverse chronological by default)
  • page - Current page number
  • per_page - Records per page
  • total - Total records matching query
  • total_pages - Total number of pages
  • filters - Applied search filters
  • query - Search query used
  • scope - Resource type searched
  • location - API endpoint path
  • order - Results ordering applied
Note on pagination:
  • Uses page and per_page (different from standard list endpoints)
  • Results delivered in reverse chronological order by default
  • Supports up to 100 results per page

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • Missing required scope parameter
  • Invalid scope value
  • Malformed filters object
  • Invalid date format in filters

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

Code samplesโ€‹

curl https://api.omise.co/search \
-X GET \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-d "scope=charge" \
-d "query=thb" \
-d "filters[created]=2019/01/01..2019/12/31"

Error and result codesโ€‹

Common Filter Patternsโ€‹

Filter SyntaxDescriptionExample
field=valueExact matchstatus=successful
field=val1..val2Rangeamount=1000..5000
field=date..dateDate rangecreated=2019/01/01..2019/12/31
field=true/falseBooleancaptured=true

Available Filters by Scopeโ€‹

Charge scope:

  • status - successful, failed, pending, expired
  • amount - Exact amount or range (1000..5000)
  • captured - true/false
  • created - Date range (2019/01/01..2019/12/31)

Customer scope:

  • created - Date range

Dispute scope:

  • status - open, pending, won, lost
  • created - Date range

Recipient scope:

  • active - true/false
  • verified - true/false

Try it outโ€‹

Required - 1 fields
โ–ผ
Recommended - 4 fields
Additional - 1 fields