3

So I am able to get questions with specific tags, but still not able to get questions which have specific text and a specific tag.

For example if I want to get all the questions with text "api" in the title and they are tagged with , what should be the best API call I should use?

2

You can use the /search method with tagged and intitle

For example: http://api.stackexchange.com/2.2/search?order=desc&sort=activity&tagged=rest&intitle=api&site=stackoverflow will search for questions on Stack Overflow with api in the title and that are tagged with rest.

The first two items I get when running this are:

{
  "items": [
    {
      "tags": [
        "rest",
        "parse.com",
        "ionic-framework",
        "ionic"
      ],
      "owner": {
        "reputation": 6,
        "user_id": 4837160,
        "user_type": "registered",
        "profile_image": "http://graph.facebook.com/904033919647840/picture?type=large",
        "display_name": "Karlis Filipsons",
        "link": "http://stackoverflow.com/users/4837160/karlis-filipsons"
      },
      "is_answered": false,
      "view_count": 6,
      "answer_count": 1,
      "score": 1,
      "last_activity_date": 1437768678,
      "creation_date": 1437768321,
      "question_id": 31618910,
      "link": "http://stackoverflow.com/questions/31618910/error-100-parse-restful-api-with-ionic",
      "title": "error 100 parse restful api with ionic"
    },
    {
      "tags": [
        "c#",
        "rest",
        "asp.net-web-api2"
      ],
      "owner": {
        "reputation": 815,
        "user_id": 2138140,
        "user_type": "registered",
        "accept_rate": 69,
        "profile_image": "https://www.gravatar.com/avatar/87864744baac20a9b317e01519a85b9b?s=128&d=identicon&r=PG",
        "display_name": "Kyle",
        "link": "http://stackoverflow.com/users/2138140/kyle"
      },
      "is_answered": false,
      "view_count": 34,
      "answer_count": 3,
      "score": 0,
      "last_activity_date": 1437766414,
      "creation_date": 1437754963,
      "last_edit_date": 1437755987,
      "question_id": 31615391,
      "link": "http://stackoverflow.com/questions/31615391/one-function-of-a-rest-api-doesnt-work-but-the-rest-do",
      "title": "One function of a REST API doesn't work but the rest do"
    },
    ...

For more advanced searches, use /search/advanced which basically replicates the on-site search function.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .