query-a9f2aa16644ca598e4473e5c4113d8aa
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
Then use this results as usual in a query, in this example a simple query for the gender.
By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Use the MediaWiki API to get the articles from a specific category in a specific Wikipedia language version.
# Then use this results as usual in a query, in this example a simple query for the gender.
# By User:Ainali with the help of User:Dipsacus fullonum 2021-02
SELECT ?item ?itemLabel ?genderLabel WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "sv.wikipedia.org"; # Set the project here
wikibase:api "Generator";
mwapi:generator "categorymembers"; # Selects the content from a category
mwapi:gcmtitle "Category:Födda 2001";. # Specifies the category (Born in 2001)
?item wikibase:apiOutputItem mwapi:item.
}
FILTER BOUND (?item) # Safeguard to not get a timeout from unbound items when using ?item below
?item wdt:P21 ?gender . # Example retrieval of a value
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,sv". }
}
Query found at
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/en
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/es
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/fr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/hy
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/ja
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/nl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/sv
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/tr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/uk
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced/zh