---
title: "Convert Legacy Search queries to Platform queries"
method: POST
path: "/v3/global/search/convert"
tags: ["Global Data"]
---

# Convert Legacy Search queries to Platform queries

`POST /v3/global/search/convert`

Convert Censys Search Language queries used in Legacy Search into Censys Query Language (CenQL) queries for use in the Platform.<br><br>Reference the [documentation on CenQL](https://docs.censys.com/docs/censys-query-language) for more information about query syntax.

## Query parameters

- `organization_id` string, uuid, required — The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.

## Headers

- `X-Organization-ID` string, uuid — The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. Note: The header parameter is supported for atypical use cases; we recommend always providing this field via the query parameter.

## Request body

- SearchConvertQueryInputBody
  - `queries` string[], nullable, required — A list of Censys Search Language queries to convert. Limited to 100 queries.

## Response `200`

OK

- ResponseEnvelopeListSearchConvertQueryResponse
  - `result` SearchConvertQueryResponse[], nullable
    - `alternative_queries` AlternativeQuery[], nullable — Alternative queries that may be used. For example, a query that includes web results in addition to host results.
      - `query` string, required — An alternative query that may be used.
      - `targets` string[], nullable, required — The types of Platform data records (host, cert, and web) that can be targeted by the alternative query.
    - `comments` string[], nullable — Comments about the query conversion.
    - `converted_query` string — The original query, converted to CenQL syntax. This may be empty if unable to translate the query.
    - `errors` ConvertQueryError[], nullable, required — The error messages if the query could not be converted.
      - `message` string, required — The error message if the query could not be converted.
    - `original_query` string, required — The original Censys Search Language query.
    - `targets` string[], nullable, required — The types of Platform data records (host, cert, and web) that can be targeted by the converted query. Note: Does not include targets that could be returned due to full-document search. This may be empty if the query is a match-all for full-document search query.

## Other responses

- `400` — Bad request
- `401` — Request does not contain a valid Authorization token
- `403` — User does not have permission to access this data
- `500` — Internal server error

---

[API](https://skmtc.net/censys/apis/censys-platform-api.md) · [All operations](https://skmtc.net/censys/apis/censys-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/censys/censys-platform-api/revisions/261c916bf05b/schema)
