Get only wikitext without JSON from Wikipedia API
up vote
0
down vote
favorite
Does the Wikipedia API have some endpoint or parameter to return only the wikitext of a page or a section of a page in the HTTP response body (i.e. without the JSON around it?) In this case it could use HTTP status codes to signal an error. The point would be to simplify parsing (no JSON).
wikipedia-api
add a comment |
up vote
0
down vote
favorite
Does the Wikipedia API have some endpoint or parameter to return only the wikitext of a page or a section of a page in the HTTP response body (i.e. without the JSON around it?) In this case it could use HTTP status codes to signal an error. The point would be to simplify parsing (no JSON).
wikipedia-api
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Does the Wikipedia API have some endpoint or parameter to return only the wikitext of a page or a section of a page in the HTTP response body (i.e. without the JSON around it?) In this case it could use HTTP status codes to signal an error. The point would be to simplify parsing (no JSON).
wikipedia-api
Does the Wikipedia API have some endpoint or parameter to return only the wikitext of a page or a section of a page in the HTTP response body (i.e. without the JSON around it?) In this case it could use HTTP status codes to signal an error. The point would be to simplify parsing (no JSON).
wikipedia-api
wikipedia-api
asked Nov 4 at 13:10
Lassi
563515
563515
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Not technically part of the API but it's possible:
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw§ion=0
Awesome! And the URLs are simpler than those of the advertised API as well :)
– Lassi
Nov 12 at 17:43
Also properly returns a HTTP 404 error code in case the article is not found: en.wikipedia.org/wiki/No_such_page?action=raw
– Lassi
Nov 12 at 17:47
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Not technically part of the API but it's possible:
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw§ion=0
Awesome! And the URLs are simpler than those of the advertised API as well :)
– Lassi
Nov 12 at 17:43
Also properly returns a HTTP 404 error code in case the article is not found: en.wikipedia.org/wiki/No_such_page?action=raw
– Lassi
Nov 12 at 17:47
add a comment |
up vote
1
down vote
accepted
Not technically part of the API but it's possible:
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw§ion=0
Awesome! And the URLs are simpler than those of the advertised API as well :)
– Lassi
Nov 12 at 17:43
Also properly returns a HTTP 404 error code in case the article is not found: en.wikipedia.org/wiki/No_such_page?action=raw
– Lassi
Nov 12 at 17:47
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Not technically part of the API but it's possible:
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw§ion=0
Not technically part of the API but it's possible:
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw
https://en.wikipedia.org/wiki/Cape_York_meteorite?action=raw§ion=0
answered Nov 11 at 1:14
Tgr
20.4k86297
20.4k86297
Awesome! And the URLs are simpler than those of the advertised API as well :)
– Lassi
Nov 12 at 17:43
Also properly returns a HTTP 404 error code in case the article is not found: en.wikipedia.org/wiki/No_such_page?action=raw
– Lassi
Nov 12 at 17:47
add a comment |
Awesome! And the URLs are simpler than those of the advertised API as well :)
– Lassi
Nov 12 at 17:43
Also properly returns a HTTP 404 error code in case the article is not found: en.wikipedia.org/wiki/No_such_page?action=raw
– Lassi
Nov 12 at 17:47
Awesome! And the URLs are simpler than those of the advertised API as well :)
– Lassi
Nov 12 at 17:43
Awesome! And the URLs are simpler than those of the advertised API as well :)
– Lassi
Nov 12 at 17:43
Also properly returns a HTTP 404 error code in case the article is not found: en.wikipedia.org/wiki/No_such_page?action=raw
– Lassi
Nov 12 at 17:47
Also properly returns a HTTP 404 error code in case the article is not found: en.wikipedia.org/wiki/No_such_page?action=raw
– Lassi
Nov 12 at 17:47
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53141175%2fget-only-wikitext-without-json-from-wikipedia-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown