Search the CAByS catalog by free-text query
const url = 'https://api.emite.cr/v1/cabys/search?q=consultor%C3%ADa';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.emite.cr/v1/cabys/search?q=consultor%C3%ADa' \ --header 'Authorization: Bearer <token>'Searches the copy of the CAByS catalog (BCCR) that EmiteCR ships, without calling Hacienda. A query of 1 to 12 digits matches the start of the code; any other query matches descriptions that contain every word of it, ignoring case and accents (words like «surtido», «combo» or «paquete» bring the surtido codes first). Results come in code order, at most top. A code missing from this copy (published very recently) is still valid: check it with GET /v1/cabys/:codigo, which asks Hacienda.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
consultoríaSearch query (min 2 chars).
Max results (1-50, default 20).
Responses
Section titled “Responses”object
Catalog entries that match the query, at most top. The search runs on the copy of the catalog EmiteCR ships for discovery, so a code published very recently can be missing; GET /v1/cabys/:codigo checks any code against Hacienda.
object
13-digit CAByS code.
Description of the good or service as the CAByS catalog publishes it (Spanish).
IVA rate (%) of the code: as Hacienda publishes it now in GET /v1/cabys/:codigo, and as EmiteCR's bundled copy of the catalog has it in search results.
Example
{ "items": [ { "codigo": "8399000000000", "descripcion": "Servicios de consultoría en gestión empresarial", "impuesto": 13 } ]}Missing/short query or top out of range.