Wikipedia

--- API Help Home / Index --- ?action=help

query --- search

--- API Help query search --- ?action=help&modules=query%2Bsearch



XML --- https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Sri Lanka&srinfo=totalhits|suggestion|rewrittenquery&srprop=snippet|categorysnippet|sectiontitle|size|titlesnippet|wordcount|timestamp&format=xml&srlimit=10&sroffset=0

XMLFM --- https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Sri Lanka&srinfo=totalhits|suggestion|rewrittenquery&srprop=snippet|categorysnippet|sectiontitle|size|titlesnippet|wordcount|timestamp&format=xmlfm&srlimit=10&sroffset=0
JSON --- https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Sri Lanka&srinfo=totalhits|suggestion|rewrittenquery&srprop=snippet|categorysnippet|sectiontitle|size|titlesnippet|wordcount|timestamp&format=json&srlimit=10&sroffset=0


Search:
Offset:
PerPage:

OK



--- EXAMPLES --- TEST LINKS ---



SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [totalhits] => 88762
        )

)




------------------- 1 -------------------

Sri Lanka


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => Sri Lanka
            [pageid] => 26750
            [size] => 260158
            [wordcount] => 22119
            [snippet] => question marks, boxes, or other symbols. Sri Lanka, officially the Democratic Socialist Republic of Sri Lanka, formerly known as Ceylon, is an island country
            [timestamp] => 2025-12-31T19:31:10Z
            [titlesnippet] => Sri Lanka
            [categorysnippet] => Sri Lanka
        )

)



------------------- 2 -------------------

History of Sri Lanka


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => History of Sri Lanka
            [pageid] => 27411
            [size] => 128292
            [wordcount] => 13935
            [snippet] => history of Sri Lanka covers Sri Lanka and its surrounding regions of South Asia, Southeast Asia and the Indian Ocean. Prehistoric Sri Lanka goes back 125
            [timestamp] => 2025-12-25T13:41:58Z
            [titlesnippet] => History of Sri Lanka
            [categorysnippet] => History of Sri Lanka
            [sectiontitle] => Prehistoric Sri Lanka
        )

)



------------------- 3 -------------------

Sri Lankan Tamils


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => Sri Lankan Tamils
            [pageid] => 4096004
            [size] => 128380
            [wordcount] => 12976
            [snippet] => Sri Lankan Tamils (Tamil: இலங்கை தமிழர், ilankai tamiḻar or ஈழத் தமிழர், īḻat tamiḻar), also known as Ceylon Tamils or Eelam Tamils, are Tamils native
            [timestamp] => 2025-12-27T05:09:50Z
            [titlesnippet] => Sri Lankan Tamils
            [categorysnippet] => Sri Lankan Tamil people
        )

)



------------------- 4 -------------------

Sri Lanka national cricket team


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => Sri Lanka national cricket team
            [pageid] => 397246
            [size] => 125561
            [wordcount] => 6180
            [snippet] => The Sri Lanka men's national cricket team, (Sinhala: ශ්‍රී ලංකා ජාතික ක්‍රිකට් කණ්ඩායම, romanized: Shri Lanka Jathika Crikat Kandayama; Tamil: இலங்கை
            [timestamp] => 2025-12-31T20:10:06Z
            [titlesnippet] => Sri Lanka national cricket team
            [categorysnippet] => National sports teams of Sri Lanka
        )

)



------------------- 5 -------------------

Flag of Sri Lanka


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => Flag of Sri Lanka
            [pageid] => 459322
            [size] => 15144
            [wordcount] => 1084
            [snippet] => The flag of Sri Lanka (Sinhala: ශ්‍රී ලංකාවේ ජාතික ධජය, romanized: Sri Lankave jathika kodiya; Tamil: இலங்கையின் தேசியக்கொடி, romanized: Ilankaiyin teciyakkoṭi)
            [timestamp] => 2025-12-19T06:23:02Z
            [titlesnippet] => Flag of Sri Lanka
            [categorysnippet] => Flags of Sri Lanka
            [sectiontitle] => Monarchical Sri Lanka
        )

)



------------------- 6 -------------------

Economy of Sri Lanka


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => Economy of Sri Lanka
            [pageid] => 27415
            [size] => 114761
            [wordcount] => 10884
            [snippet] => The mixed economy of Sri Lanka was valued at LKR 29.89 trillion (around $99 billion) in 2024 by gross domestic product (GDP) and $342.6 billion by purchasing
            [timestamp] => 2025-12-26T06:38:08Z
            [titlesnippet] => Economy of Sri Lanka
            [categorysnippet] => Economy of Sri Lanka
            [sectiontitle] => Largest trading partners with Sri Lanka
        )

)



------------------- 7 -------------------

Telephone numbers in Sri Lanka


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => Telephone numbers in Sri Lanka
            [pageid] => 12765886
            [size] => 10988
            [wordcount] => 242
            [snippet] => Special Services in Sri Lanka Short Codes in 19XX Range for Government Organizations 4 Digits Short Codes for Services in Sri Lanka Short Codes in 13XX
            [timestamp] => 2025-12-25T01:55:17Z
            [titlesnippet] => Telephone numbers in Sri Lanka
            [categorysnippet] => Sri Lanka communications-related lists
            [sectiontitle] => Dialling into Sri Lanka
        )

)



------------------- 8 -------------------

Provinces of Sri Lanka


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => Provinces of Sri Lanka
            [pageid] => 689475
            [size] => 16508
            [wordcount] => 943
            [snippet] => romanized: Mākāṇam) are the first level administrative divisions of Sri Lanka. Currently, Sri Lanka is divided into 9 provinces. Each province is further divided
            [timestamp] => 2025-08-14T18:53:32Z
            [titlesnippet] => Provinces of Sri Lanka
            [categorysnippet] => Subdivisions of Sri Lanka
            [sectiontitle] => Sri Lanka
        )

)



------------------- 9 -------------------

Buddhism in Sri Lanka


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => Buddhism in Sri Lanka
            [pageid] => 1164480
            [size] => 80494
            [wordcount] => 9567
            [snippet] => largest and official religion of Sri Lanka, practiced by 70.1% of the population as of 2012. Practitioners of Sri Lankan Buddhism can be found amongst the
            [timestamp] => 2025-12-21T04:09:07Z
            [titlesnippet] => Buddhism in Sri Lanka
            [categorysnippet] => Buddhism in Sri Lanka
            [sectiontitle] => Sri Lanka since 1948
        )

)



------------------- 10 -------------------

Sri Lanka Armed Forces


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [ns] => 0
            [title] => Sri Lanka Armed Forces
            [pageid] => 23408142
            [size] => 63060
            [wordcount] => 5718
            [snippet] => The Sri Lanka Armed Forces is the overall unified military of the Democratic Socialist Republic of Sri Lanka encompassing the Sri Lanka Army, the Sri Lanka
            [timestamp] => 2025-12-03T10:52:05Z
            [titlesnippet] => Sri Lanka Armed Forces
            [categorysnippet] => Military of Sri Lanka
            [sectiontitle] => Republic of Sri Lanka
        )

)




- - - - - - - - - - -


SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [batchcomplete] => 
        )

    [continue] => SimpleXMLElement Object
        (
            [@attributes] => Array
                (
                    [sroffset] => 10
                    [continue] => -||
                )

        )

    [query] => SimpleXMLElement Object
        (
            [searchinfo] => SimpleXMLElement Object
                (
                    [@attributes] => Array
                        (
                            [totalhits] => 88762
                        )

                )

            [search] => SimpleXMLElement Object
                (
                    [p] => Array
                        (
                            [0] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => Sri Lanka
                                            [pageid] => 26750
                                            [size] => 260158
                                            [wordcount] => 22119
                                            [snippet] => question marks, boxes, or other symbols. Sri Lanka, officially the Democratic Socialist Republic of Sri Lanka, formerly known as Ceylon, is an island country
                                            [timestamp] => 2025-12-31T19:31:10Z
                                            [titlesnippet] => Sri Lanka
                                            [categorysnippet] => Sri Lanka
                                        )

                                )

                            [1] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => History of Sri Lanka
                                            [pageid] => 27411
                                            [size] => 128292
                                            [wordcount] => 13935
                                            [snippet] => history of Sri Lanka covers Sri Lanka and its surrounding regions of South Asia, Southeast Asia and the Indian Ocean. Prehistoric Sri Lanka goes back 125
                                            [timestamp] => 2025-12-25T13:41:58Z
                                            [titlesnippet] => History of Sri Lanka
                                            [categorysnippet] => History of Sri Lanka
                                            [sectiontitle] => Prehistoric Sri Lanka
                                        )

                                )

                            [2] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => Sri Lankan Tamils
                                            [pageid] => 4096004
                                            [size] => 128380
                                            [wordcount] => 12976
                                            [snippet] => Sri Lankan Tamils (Tamil: இலங்கை தமிழர், ilankai tamiḻar or ஈழத் தமிழர், īḻat tamiḻar), also known as Ceylon Tamils or Eelam Tamils, are Tamils native
                                            [timestamp] => 2025-12-27T05:09:50Z
                                            [titlesnippet] => Sri Lankan Tamils
                                            [categorysnippet] => Sri Lankan Tamil people
                                        )

                                )

                            [3] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => Sri Lanka national cricket team
                                            [pageid] => 397246
                                            [size] => 125561
                                            [wordcount] => 6180
                                            [snippet] => The Sri Lanka men's national cricket team, (Sinhala: ශ්‍රී ලංකා ජාතික ක්‍රිකට් කණ්ඩායම, romanized: Shri Lanka Jathika Crikat Kandayama; Tamil: இலங்கை
                                            [timestamp] => 2025-12-31T20:10:06Z
                                            [titlesnippet] => Sri Lanka national cricket team
                                            [categorysnippet] => National sports teams of Sri Lanka
                                        )

                                )

                            [4] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => Flag of Sri Lanka
                                            [pageid] => 459322
                                            [size] => 15144
                                            [wordcount] => 1084
                                            [snippet] => The flag of Sri Lanka (Sinhala: ශ්‍රී ලංකාවේ ජාතික ධජය, romanized: Sri Lankave jathika kodiya; Tamil: இலங்கையின் தேசியக்கொடி, romanized: Ilankaiyin teciyakkoṭi)
                                            [timestamp] => 2025-12-19T06:23:02Z
                                            [titlesnippet] => Flag of Sri Lanka
                                            [categorysnippet] => Flags of Sri Lanka
                                            [sectiontitle] => Monarchical Sri Lanka
                                        )

                                )

                            [5] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => Economy of Sri Lanka
                                            [pageid] => 27415
                                            [size] => 114761
                                            [wordcount] => 10884
                                            [snippet] => The mixed economy of Sri Lanka was valued at LKR 29.89 trillion (around $99 billion) in 2024 by gross domestic product (GDP) and $342.6 billion by purchasing
                                            [timestamp] => 2025-12-26T06:38:08Z
                                            [titlesnippet] => Economy of Sri Lanka
                                            [categorysnippet] => Economy of Sri Lanka
                                            [sectiontitle] => Largest trading partners with Sri Lanka
                                        )

                                )

                            [6] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => Telephone numbers in Sri Lanka
                                            [pageid] => 12765886
                                            [size] => 10988
                                            [wordcount] => 242
                                            [snippet] => Special Services in Sri Lanka Short Codes in 19XX Range for Government Organizations 4 Digits Short Codes for Services in Sri Lanka Short Codes in 13XX
                                            [timestamp] => 2025-12-25T01:55:17Z
                                            [titlesnippet] => Telephone numbers in Sri Lanka
                                            [categorysnippet] => Sri Lanka communications-related lists
                                            [sectiontitle] => Dialling into Sri Lanka
                                        )

                                )

                            [7] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => Provinces of Sri Lanka
                                            [pageid] => 689475
                                            [size] => 16508
                                            [wordcount] => 943
                                            [snippet] => romanized: Mākāṇam) are the first level administrative divisions of Sri Lanka. Currently, Sri Lanka is divided into 9 provinces. Each province is further divided
                                            [timestamp] => 2025-08-14T18:53:32Z
                                            [titlesnippet] => Provinces of Sri Lanka
                                            [categorysnippet] => Subdivisions of Sri Lanka
                                            [sectiontitle] => Sri Lanka
                                        )

                                )

                            [8] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => Buddhism in Sri Lanka
                                            [pageid] => 1164480
                                            [size] => 80494
                                            [wordcount] => 9567
                                            [snippet] => largest and official religion of Sri Lanka, practiced by 70.1% of the population as of 2012. Practitioners of Sri Lankan Buddhism can be found amongst the
                                            [timestamp] => 2025-12-21T04:09:07Z
                                            [titlesnippet] => Buddhism in Sri Lanka
                                            [categorysnippet] => Buddhism in Sri Lanka
                                            [sectiontitle] => Sri Lanka since 1948
                                        )

                                )

                            [9] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [ns] => 0
                                            [title] => Sri Lanka Armed Forces
                                            [pageid] => 23408142
                                            [size] => 63060
                                            [wordcount] => 5718
                                            [snippet] => The Sri Lanka Armed Forces is the overall unified military of the Democratic Socialist Republic of Sri Lanka encompassing the Sri Lanka Army, the Sri Lanka
                                            [timestamp] => 2025-12-03T10:52:05Z
                                            [titlesnippet] => Sri Lanka Armed Forces
                                            [categorysnippet] => Military of Sri Lanka
                                            [sectiontitle] => Republic of Sri Lanka
                                        )

                                )

                        )

                )

        )

)