Querying without a keyphrase

The most basic request you can send Sitecore Search is a query without a key phrase. You only require the mandatory objects to request content.

For the data model, see the Search and Recommendation API reference.

The following code sample shows how to create a simple request:

{
    "widget": {
        "items": [
            {
                "rfk_id": "rfkid_7",
                "entity": "content",
                "search": {
                    "content": {}
                }
            }
        ]
    },
    "context": {
        "locale": {
            "country": "us",
            "language": "en"
        }
    }
}

The following is the response to the query:

{
    "widgets": [
        {
            "rfk_id": "rfkid_7",
            "entity": "content",
            "content": [
                {
                    "description": "July 22, 2021As we should all know by now...",
                    "id": "https___www_sitecore_com_company_news-events_news_2021_07_how-managers-can-support-employees-with-their-mental-health",
                    "source_id": "388218",
                    "subtitle": null,
                    "title": "B2B Marketing: How managers can support employees with their mental health",
                    "type": "news",
                    "url": "https://www.sitecore.com/company/news-events/news/2021/07/how-managers-can-support-employees-with-their-mental-health"
                },
                {
                    "description": "June 10, 2022Following two tumultuous years, consumers are returning to their pre-pandemic ways...",
                    "id": "https___www_sitecore_com_company_news-events_news_2022_06_brand-loyalty-declines-as-consumers-push-for-transparency",
                    "source_id": "388218",
                    "subtitle": null,
                    "title": "Street Fight Magazine: Report: Brand Loyalty Declines as Consumers Push for Transparency",
                    "type": "news",
                    "url": "https://www.sitecore.com/company/news-events/news/2022/06/brand-loyalty-declines-as-consumers-push-for-transparency"
                }
                ...
            ],
            "total_item": 5858,
            "limit": 10,
            "offset": 0
        }
    ],
    "dt": 21,
    "ts": 1669435830588
}
Important

Requests specifying source return the following status codes:

Status code returned

Description

200

When the source is initialized or has completed an indexing run successfully. Does not require the source to index any items.

500

When the source is not initialized.

If you have suggestions for improving this article, let us know!